[VMware vSAN 7.0] 4.2.3 unmark flash memory devices used as capacity devices using ESXCLI

Keywords: Vmware server Virtual Machine vsphere vsan

[VMware vSAN 7.0] 4.2.3 use ESXCLI to unmark flash devices used as capacity devices - we have hardware and software solutions

1. Server virtualization cluster scheme The column contains this content
81 articles 11 subscription

catalogue

 

1. Introduction to vsan

1.1 vSAN concept

1.1.1 features of vsan

1.2 vSAN terms and definitions

1.3 vSAN and traditional storage

1.4 building vSAN clusters

1.5 vSAN deployment options

1.6 integration with other VMware software

1.7 limitations of vsan

 

2. Requirements for enabling vSAN

2.1 hardware requirements for vsan

2.2 cluster requirements for vsan

2.3 software requirements for vsan

2.4 network requirements for vsan

2.5 license requirements

 

3. Design and optimize vSAN cluster

3.1 vSAN storage component design and sizing

3.1.1 planning capacity in vSAN

3.1.2 design considerations of flash cache device in vsan

3.1.3 design considerations of flash memory capacity equipment in vsan

3.1.4 considerations for disk design in vsan

3.1.5 design considerations of storage controller in vsan

3.2 design and optimize vSAN hosts

3.3 design considerations of vsan cluster

3.4 design vSAN network

3.4.1 create static routes for vSAN network connections

3.5 best practices for vsan network connectivity

3.6. Design and optimize vSAN fault domain

3.7 using boot devices and vSAN

3.8 persistent logging in vsan cluster

 

4. Prepare a new or existing cluster for vSAN

4.1 select or verify the compatibility of storage devices

4.2 preparation for storage

4.2.1 preparation of storage equipment

4.2.2 marking flash memory devices as capacity devices using ESXCLI

4.2.3 unmark flash memory devices used as capacity devices using ESXCLI

4.2.4 use RVC to mark flash memory device as capacity device

4.3 providing memory for vSAN

4.4 preparing hosts for vSAN

4.5 compatibility between vsan and vCenter Server

4.6 preparing the storage controller

4.7 configuring vSAN network

4.8 considerations for vSAN licenses

 

5. Create vSAN cluster

5.1 features of vsan cluster

5.2 before creating a vSAN cluster

5.3 configuring and expanding vSAN clusters using the quick start feature

5.3.1 configuring a vSAN cluster using the quick start feature

5.4 manually enabling vSAN

5.4.1 setting up VMkernel network for vSAN

5.4.2 create vSAN cluster

5.4.3 configuring vSAN clusters using vSphere Client

5.4.4 editing vSAN settings

5.4.5 enabling vSAN on an existing cluster

5.5 configuring license settings for vSAN clusters

5.6 viewing vSAN data storage

5.7 using vSAN and vSphere HA

5.8 deploying vSAN using vCenter Server

5.9 disable vSAN

5.10 shut down and restart vSAN cluster

 

6. Extend the data store to two sites using extended clusters

6.1 introduction to extended cluster

6.2 considerations for extended cluster design

6.3 best practices for using extended clusters

6.4 extended cluster network design

6.5 dual node vSAN cluster

6.6 configure extended cluster or dual node cluster with quick start function

6.7 manually configure vSAN extension cluster

6.8 change preferred fault domain

6.9 change witness host

6.10 deploy vSAN witness equipment

6.10.1 set vSAN network on the witness equipment

6.10.2 configure the management network on the witness equipment

6.11 configure network interface for witness traffic

6.12 converting extended clusters to standard vSAN clusters

6.13 assigning a dual node cluster to a shared witness host

6.14 reassign shared witness hosts to dual node clusters

We have more IT solutions

 

Flash devices used as capacity devices can be unmarked so that they can be used for caching.

process

  1. To unmark a flash device that has been marked as capacity, run   esxcli vsan storage tag remove -d <device name> -t capacityFlash   Command. For example, esxcli vsan storage tag remove -t capacityFlash -d mpx.vmhba1:C0:T4:L0   Command, where   mpx.vmhba1:C0:T4:L0   Is the device name.
  2. Verify that the flash device has been unmarked.
    1. In the output, determine the of the device   IsCapacityFlash   Property is set to   0

Example: command output

You can run   vdq -q -d <device name>   Command to verify   IsCapacityFlash   Properties. For example, run   vdq -q -d mpx.vmhba1:C0:T4:L0   The command returns the following output.

[ \{ "Name" : "mpx.vmhba1:C0:T4:L0", "VSANUUID" : "", "State" : "Eligible for use by VSAN", "ChecksumSupport": "0", "Reason" : "None", "IsSSD" : "1", "IsCapacityFlash": "0", "IsPDL" : "0", \},

 

ESXi basic commands

     
  1. vmware -v # Look at your version of esx
  2. VMware ESXi 5.0.0 build-469512
  3. esxcfg-info -a # Show all ESX related information
  4. esxcfg-info -w # Displays hardware information on the esx
  5. service mgmt-vmware restart # Restart the vmware service
  6. esxcfg-vmknic -l # View host IP address
  7. esxcli hardware cpu list # cpu information Brand, Core Speed,
  8. esxcli hardware cpu global get # cpu information (CPU Cores)
  9. esxcli hardware memory get # Memory information memory Physical Memory
  10. esxcli hardware platform get # Hardware model, supplier and other information, host model, Product Name, Vendor Name
  11. esxcli hardware clock get # current time
  12. esxcli system version get # View the ESXi host version number and build number
  13. esxcli system maintenanceMode set --enable yes # Put the ESXi host into maintenance mode
  14. esxcli system maintenanceMode set --enable no # Exit the ESXi host from maintenance mode
  15. esxcli system settings advanced list -d # Lists the advanced setting options that have been changed on the ESXi host
  16. esxcli system settings kernel list -d # List the changed kernel settings on the ESXi host
  17. esxcli system snmp get | hash | set | test # List, test, and change SNMP settings
  18. esxcli vm process list # Use esxcli to list the world I of VMs on ESXi server
  19. esxcli vm process kill -t soft -w WorldI # Kill VM with esxcli command
  20. vim-cmd hostsvc/hostsummary # View host summary information
  21. vim-cmd vmsvc/get.datastores # View host storage space information
  22. vim-cmd vmsvc/getallvms # List all virtual machines
  23. vim-cmd vmsvc/power.getstate VMI # View the specified VMI virtual state
  24. vim-cmd vmsvc/power.shutdown VMI # Shut down the virtual machine
  25. vim-cmd vmsvc/power.off VMI # If the virtual machine is not shut down, use the poweroff command
  26. vim-cmd vmsvc/get.config VMI # View virtual machine configuration information
  27. esxcli software vib install -d /vmfs/volumes/datastore/patches/xxx.zip # Install updated patches and drivers for ESXi hosts
  28. esxcli network nic list # Lists the status of all NICs on the current ESXi host
  29. esxcli network vm list # Lists the network information for the virtual machine
  30. esxcli storage nmp device list # Sort out the equipment satp and psp information under the current NMP management
  31. esxcli storage core device vaai status get # Lists the VI status registered to the PS device
  32. esxcli storage nmp satp set --default-psp VMW_PSP_RR --satp xxxx # Use the esxcli command to change the default psp to Round Robin

 

esxcli information query

esxcli command help information

ssh log in to the VMware ESX server console and query the virtual machine information with the esxcli command. The output format supports normal, xml, csv and keyvalue.

Esxcli is a tool written in python (/ sbin/esxcli.py).

'''use the -- formatter=xml option to output the results in xml format, which is more convenient for program parsing.' '

     
  1. esxcli --help
  2. Usage: esxcli [options] {namespace}+ {cmd} [cmd options]
  3. Options:
  4. --formatter= ORMTTER
  5. Override the formatter to use for a given command. vailable formatter: xml, csv, keyvalue
  6. --debug Enable debug or internal use options
  7. --version isplay version information for the script
  8. -?, --help isplay usage information for the script
  9. vailable Namespaces:
  10. esxcli Commands that operate on the esxcli system itself allowing users to get additional information.
  11. fcoe VMware COE commands.
  12. hardware VMKernel hardware properties and commands for configuring hardware.
  13. iscsi VMware iSCSI commands.
  14. network Operations that pertain to the maintenance of networking on an ESX host. This includes a wide variety of commands to
  15. manipulate virtual networking components (vswitch, portgroup, etc) as well as local host IP, NS and general host networking
  16. settings.
  17. software Manage the ESXi software image and packages
  18. storage VMware storage commands.
  19. system VMKernel system properties and commands for configuring properties of the kernel core system.
  20. vm small number of operations that allow a user to Control Virtual Machine operations.

Viewing performance information: esxtop

     
  1. 9: 31: 31am up 35 days 7: 49, 379 worlds, 16 VMs, 32 vCPUs; CPU load average: 0. 02, 0. 05, 0. 05
  2. PCPU USE(%): 1. 1 1. 1 1. 4 2. 2 3. 5 1. 8 1. 6 1. 6 0. 6 0. 8 0. 8 0. 5 1. 7 1. 6 1. 5 1. 4 VG: 1. 4
  3. PCPU UTIL(%): 3. 7 3. 9 5. 0 7. 3 11 6. 0 5. 4 5. 3 2. 3 2. 7 2. 9 1. 9 5. 4 5. 2 4. 7 4. 6 VG: 4. 9
  4. I GI NME NWL %USE %RUN %SYS %WIT %VMWIT %RY %ILE %OVRLP %CSTP %MLMT %SWPWT
  5. 1 1 idle 16 1518. 25 1600. 00 0. 00 0. 00 - 1600. 00 0. 00 2. 29 0. 00 0. 00 0. 00
  6. 1627 1627 ESET NO 32_ 192. 6 4. 88 14. 37 0. 07 578. 65 0. 00 0. 53 183. 72 0. 02 0. 00 0. 00 0. 00
  7. 1379 1379 TEST 2. 0_ 192. 168. 6 4. 24 11. 40 0. 10 581. 75 0. 00 0. 40 187. 16 0. 03 0. 00 0. 00 0. 00
  8. 1558 1558 [XMX_TEST]SP_1 6 2.56 7.45 0.11 585.88 0.00 0.26 190.68 0.03 0.00 0.00 0.00
  9. 1555 1555 [XMX_PreProd] 6 2.54 7.17 0.15 585.86 0.00 0.54 190.48 0.03 0.02 0.00 0.00
  10. 9669 9669 GEI__EMO_19 6 1.92 5.48 0.08 587.60 0.00 0.46 192.46 0.02 0.00 0.00 0.00
  11. 1682712 1682712 esxtop.1880935 1 1.18 3.54 0.00 95.39 - 0.00 0.00 0.00 0.00 0.00 0.00
  12. 1193230 1193230 slave1_1 6 1.02 2.86 0.06 590.45 0.00 0.28 195.30 0.01 0.00 0.00 0.00
  • Shut down the virtual machine through the k command in ESXTOP:

  1. ssh log in to the ESXi host and run esxtop

  2. Press the c key to switch to cpu mode

  3. Press Shift+v to display only the virtual machine processes on the current page

  4. Add the Leader World I column in the current display and find the Leader World I of the virtual machine to be shut down

  5. Press the k key, enter the Leader World I to shut down the virtual machine in the prompt mode, and press enter.

     
  1. Hard disk volume information
  2. df -h # View system disk volume capacity
  3. ilesystem Size Used vailable Use% Mounted on
  4. VMS-5 1. 6T 1. 5T 123. 7G 93 % /vmfs/volumes/datastore1
  5. vfat 4. 0G 25. 2M 4. 0G 1 % /vmfs/volumes/4ee1d386-965ba574-1fd5-1cc1de17e90e
  6. vfat 249. 7M 127. 4M 122. 3M 51 % /vmfs/volumes/63850576-c5821586-5fce-4343bbbeb921
  7. vfat 249. 7M 8. 0K 249. 7M 0 % /vmfs/volumes/93d3e977-2a99c33b-6c07-1e461ce7a96e
  8. vfat 285. 8M 176. 2M 109. 6M 62 % /vmfs/volumes/4ee1d37e-1aa9294c-21f6-1cc1de17e90e
     
  1. esxcli storage filesystem list # Volume information
  2. Mount Point Volume Name UUI Mounted Type Size ree
  3. ------------------------------------------------- ----------- ----------------------------------- ------- ------ ------------- ------------
  4. /vmfs/volumes/4ee1d386-5b79612c-d9b1-1cc1de17e90e datastore1 4ee1d386-5b79612c-d9b1-1cc1de17e90e true VMS-5 1794491023360 132805296128
  5. /vmfs/volumes/4ee1d386-965ba574-1fd5-1cc1de17e90e 4ee1d386-965ba574-1fd5-1cc1de17e90e true vfat 4293591040 4267048960
  6. /vmfs/volumes/63850576-c5821586-5fce-4343bbbeb921 63850576 -c5821586-5fce-4343bbbeb921 true vfat 261853184 128225280
  7. /vmfs/volumes/93d3e977-2a99c33b-6c07-1e461ce7a96e 93d3e977-2a99c33b-6c07-1e461ce7a96e true vfat 261853184 261844992
  8. /vmfs/volumes/4ee1d37e-1aa9294c-21f6-1cc1de17e90e 4ee1d37e-1aa9294c-21f6-1cc1de17e90e true vfat 299712512 114974720
  9. esxcli storage vmfs extent list # Storage volumes used by virtual machines?
  10. Volume Name VMS UUI Extent Number evice Name Partition
  11. ----------- ----------------------------------- ------------- ------------------------------------ ---------
  12. datastore1 4ee1d386-5b79612c-d9b1-1cc1de17e90e 0 naa.600508b1001030374542413430300400 3
     
  1. View network information
  2. esxcli network ip interface ipv4 get
  3. Name IPv4 ddress IPv4 Netmask IPv4 Broadcast ddress Type HCP NS
  4. ---- ------------- ------------- -------------- ------------ --------
  5. vmk0 192.168 .0 .150 255.255 .255 .0 192.168 .0 .255 STTIC false
  6. esxcfg-vmknic -l
  7. Interface Port Group/VPort IP amily IP ddress Netmask Broadcast MC ddress MTU TSO MSS Enabled Type
  8. vmk0 Management Network IPv4 192.168 .0 .150 255.255 .255 .0 192.168 .0 .255 1c:c1:de:17:e9:0c 1500 65535 true STTIC
  9. esxcfg-route
  10. VMkernel default gateway is 192.168 .0 .253
     
  1. View network interface
  2. esxcli network nic list
  3. Name PCI evice river Link Speed uplex MC ddress MTU escription
  4. ------ ------------- ------ ---- ----- ------ ----------------- ---- -------------------------------------------------------------
  5. vmnic0 0000 :004 :00.0 bnx2 Up 1000 ull 00 :9c :02 :9b :25 :2c 1500 Broadcom Corporation Broadcom NetXtreme II BCM5709 1000Base-T
  6. vmnic1 0000 :004 :00.1 bnx2 Up 1000 ull 00 :9c :02 :9b :25 :2e 1500 Broadcom Corporation Broadcom NetXtreme II BCM5709 1000Base-T
  7. vmnic2 0000 :005 :00.0 bnx2 Up 1000 ull 00 :9c :02 :9b :25 :30 1500 Broadcom Corporation Broadcom NetXtreme II BCM5709 1000Base-T
  8. vmnic3 0000 :005 :00.1 bnx2 Up 1000 ull 00 :9c :02 :9b :25 :32 1500 Broadcom Corporation Broadcom NetXtreme II BCM5709 1000Base-T

View vswitch interface information

     
  1. esxcli network vswitch standard list
  2. vSwitch0 # Virtual switch 0
  3. Name: vSwitch0
  4. Class: etherswitch
  5. Num Ports: 128
  6. Used Ports: 13
  7. Configured Ports: 128
  8. MTU: 1500
  9. CP Status: listen
  10. Beacon Enabled: false
  11. Beacon Interval: 1
  12. Beacon Threshold: 3
  13. Beacon Required By:
  14. Uplinks: vmnic2, vmnic1, vmnic0 # Corresponding physical network port
  15. Portgroups: VM Network, Management Network # remarks
  16. vSwitch1
  17. Name: vSwitch1 # Virtual switch 1
  18. Class: etherswitch
  19. Num Ports: 128
  20. Used Ports: 10
  21. Configured Ports: 128
  22. MTU: 1500
  23. CP Status: listen
  24. Beacon Enabled: false
  25. Beacon Interval: 1
  26. Beacon Threshold: 3
  27. Beacon Required By:
  28. Uplinks: vmnic3 # Corresponding physical network port
  29. Portgroups: Vlan190 # remarks

List of currently running virtual machines

     
  1. esxcli vm process list
  2. slave1_192. 168. 0222
  3. World I: 1331403
  4. Process I: 0
  5. VMX Cartel I: 1331402
  6. UUI: 56 4d b 4 20 0a 16 b 9 50- 1c bd fc 7c 7b dd d 5 84
  7. isplay Name: slave 1_ 192. 168. 0222
  8. Config ile: /vmfs/volumes/ 4ee 1d 386- 5b 79612c-d 9b 1- 1cc 1de 17e 90e/slave 1_ 192. 168. 0222/slave 1_ 192. 168. 0222.vmx
  9. TEST_192. 0168. 0. 13
  10. World I: 1651806
  11. Process I: 0
  12. VMX Cartel I: 1651805
  13. UUI: 56 4d 0a 52 6e d 2 61 7a-a 5 84 1b e 5 35 da d 1 62
  14. isplay Name: TEST_ 192. 0168. 0. 13
  15. Config ile: /vmfs/volumes/ 4ee 1d 386- 5b 79612c-d 9b 1- 1cc 1de 17e 90e/TEST_ 192. 0168. 0. 15/TEST_ 192. 0168. 0. 15.vmx
  16. TEST2. 0_ 192.168.0.200
  17. World I: 5602
  18. Process I: 0
  19. VMX Cartel I: 5601
  20. UUI: 56 4d 71 65 d 5 83 a 1 4c- 9d 7e 4a 9e f 4 9d e 3 21
  21. isplay Name: TEST 2. 0_ 192.168.0.200
  22. Config ile: /vmfs/volumes/ 4ee 1d 386- 5b 79612c-d 9b 1- 1cc 1de 17e 90e/TEST 2. 0_ 192.168.0.200/TEST 2. 0_ 192.168.0.200.vmx

vim-cmd

     
  1. vim-cmd help
  2. Commands available under /:
  3. hbrsvc / internalsvc/ solo / vmsvc/
  4. hostsvc / proxysvc/ vimsvc/ help
  5. List all virtual machines
  6. vim-cmd vmsvc/getallvms
  7. View the specified virtual machine network
  8. vim-cmd vmsvc/get.networks 101
  9. View the specified virtual machine summary information
  10. Configuration of the virtual machine:
  11. name:test_192 .168 .0 .70
  12. CPUx2, RM: 4096MB, ISK:SCSI ( 0: 0) 40GB
  13. network adapter 1: E1000,VM Network,MC address: 00: 0 c: 29: d8: 3 b:e0
  14. Guest Installed in the system VMware Tools After, you can query in the summary information hostName,ipddress Information, if not installed, the value is<unset>.
  15. vim-cmd vmsvc/get.summary 101

View the specified virtual machine device information

It includes network card model, MC address and other information.

vim-cmd vmsvc/device.getdevices 101
     

View the specified virtual machine configuration

vim-cmd vmsvc/get.config 101
     

 

Posted by Stray_Bullet on Fri, 15 Oct 2021 01:23:00 -0700