Tuesday, January 18, 2011

VMware command

esxccfg-vswif –l will display the service console list
esxcfg-vswitch –l will display the switch information
esxcfg-vswitch –L vmnic1 vSwitch0 will uplink vmnic1 to the vSwitch0
esxcfg-vswitch – U vmnic1 vSwitch0 will unlink vmnic1 from the vSwitch0
esxcfg-vmknic –l will list vmkernal
esxcfg-mpath –l will display the storage paths and device
node numbers
esxcfg-mpath –b will display the active storage device
esxcfg-info will give the complete host info.
esxcfg-rescan –vmhba no will rescan the particular datastore
esxcfg-rescan – all will rescan all the vmhba’s
vmkfstools –v will display the datastore
vmkfstools –X 20gb /vmfs/datastore-path/.vmdk will extend the disk size to 20 gb
vmkfstools -c 4000M /path of the datastore /file.vmdk creat a new virtual disk
esxtop will display the resource utilization of the host
resxtop will be executed from vcli
ps | grep vmx to check the pid of the running vm.
vicfg-authconfig allows to add the esxi4.1 to AD.
Vmware-cmd –-server hostname -–username username –-password password –l
( this cmd will list all the registered vms)
Vmware-cmd –-server hostname -–username username –-password password path of the vmx file start
( This will start the vm )
Vmware-cmd –-server hostname -–username username –-password password stop soft
( The vm will safely shutdown)
Vmware-cmd –-server hostname -–username username –-password password stop hard
( The vm will forcefully poweroff)