Today we will see How we can use VMware-cmd Command in ESX 4.1. VMware-cmd command is very handy when you are working in CLI and you want to manage the Virtual Machines. There can be the possibility you have lost the communication from Virtual center and at that time you can use this command which can save your life.
You just need to logged into the Server from Putty and get the the root access and run the vmware-cmd command with appropriate switches.
Let me show first two commands either you need run vmware-cmd -l or vmware-cmd -s listvms both commands will list the number of vms are own by that esx host.
vmware-cmd -s listvms
Both commands calls the vmfs storage locations and list all vm configuration files as per the above screenshot
.vmx extension is for virtual machine configuration in VMware
Another command i would like share which is the check virtual machine status ( Online / Offline)
vmware-cmd -l vmpath/vm.vmx getstate
If you want to check the uptime of that virtual machine
vmware-cmd -l vmpath/vm.vmx getuptime
More Commands are as follows
If you want stop the Virtual Machine then you can run command as vmware-cmd -l vmpath/vm.vmx stop
If you want reset the Virtual Machine then you can run command as vmware-cmd -l vmpath/vm.vmx reset
I would suggest try other commands and explore and let me know if you have any further queries – thanks for being here i would request you subscribe my blog to get latest updates notification on your email.