VMWARE Commands
VMWARE Commands
o obtain LUN multipathing information from the ESX/ESXi host command line:
The command esxcli nmp device list lists of LUN multipathing information:
To change the multipath policy information from the ESX/ESXi host command line:
where <naa_id> is the NAA ID of the device and <path_policy> is one of the PSP options listed above.
For example, to change the above device path policy to Round Robin:
Where:
<path> is the particular path to be enabled/disabled
<device> is the NAA ID of the device
<state> is active or off
proc/scsi/qlaxxx/1
[root@esx
~]# esxcfg-rescan vmhba2
*Error:
Unable to scan adapters for VMFS*
esxcfg-advcfg -s 1 /VMFS3/FailVolumeOpenIfAPD
Some QnA:
A: I’m not sure – but I don’t THINK that this bug would occur for devices owned by PowerPath/VE (since it replaces the
bulk of the NMP stack in those cases) – but I need to validate that. This highlights to me at least how important
these little things (in this case path state detection) are in entire storage stack.
In any case, thought people would find it useful to know about this, and it is a bug being tracked for resolution.
Hope it helps one customer!
f virtual machines are not responding on an ESX/ESXi 4.0 host, determine if an all-paths-down condition exists, by
executing:
or
where:
<device naa> is the Network Addressing Authority (NAA) unique address for the full storage device
<device mpx> is the identifier if a NAA ID is not available
esxcfg-advcfg -s 1 /VMFS3/FailVolumeOpenIfAPD
To disable and reset to the default value without requiring downtime, execute:
esxcfg-advcfg -s 0 /VMFS3/FailVolumeOpenIfAPD
esxcfg-advcfg -g /VMFS3/FailVolumeOpenIfAPD
#esxcfg-scsidevs -l
#esxcfg-scsidevs -l
Other commands
NETWORKING
esxcfg-vmknic
esxcfg-route
esxcfg-firewall
esxcfg-vswif
esxcfg-vswitch
esxcfg-nics
STORAGE
esxcfg-dumppart
esxcfg-mpath
esxcfg-nas
esxcfg-swiscsi
esxcfg-vmhbadevs
VMware SysInfo
esxcfg-info –a | more
Login to ESX Server using ssh client and enter vmware-cmd command it displays the syntax of the full command.
How to get the list of VM’s from ESX Console
Ex : vmware-cmd -l
Note: It displays the complete path of the VM and .vmx file details.
/vmfs/volumes/4abb234abasdk2h34/vm20031/vm20031.vmx
/vmfs/volumes/4abb234abasdk2h34/vm20032/vm20032.vmx
/vmfs/volumes/4abb234abasdk2h34/vm20033/vm20033.vmx
To extend vmdk
#vmkfstools –x 20GB /vmfs/vol/storage1/vm.vmdk
V2V
Extpart.exe
Diskpart.exe
# Df
#vdf –h shows vmfs volumes and devices also shows
VM Restore command
#/usr/sbin/vmres.pl in old version now use vcbrestore
#/usr/sbin/vmware-authd
#/usr/sbin/vmware-autopoweron
#/usr/sbin/vmware-vim-cmd
#/usr/sbin/vmware-hostd
#/usr/sbin/vmware-hostd-support
#/usr/sbin/vmware-vimdump
#/usr/sbin/vmware-webAccess
To switch off the virtual machine using the command line option:
1. Log on to the ESX host server using an SSH console utility, such as PUTTY.
2. Type the following command and press Enter.
#vmware-cmd <.vmx file Path > stop
For example, vmware-cmd /vmfs/volumes/l3esx35\:storage1/l3-2003-ldap/l3-2003-ldap.vmx stop
Where, l3-2003-ldap.vmx is the virtual machine configuration file name that is stored in /vmfs/volumes/l3esx35\:storage1/l3-2003-
ldap/
folder of the virtual machine.
It is recommended that you kill all the processes running on the virtual machine if it freezes. Complete the following steps for an
ESX 3.x
host:
1. List all the running virtual machines to identify the VMID of the virtual machine.
# cat /proc/vmware/vm/*/names