Using the vmware-cmd command you can perform a number of actions on your Virtual Machines from the command line.
Below shows you some of the functions you can perform :
List Virtual Machines
[[email protected] ~]# vmware-cmd -l
/vmfs/volumes/4c16a0ec-2c7ebe2a-6ad5-0011s8azz71c/OpenSolaris 2009.06/OpenSolaris 2009.06.vmx
/vmfs/volumes/4c16a0ec-2c7ebe2a-6ad5-0011s8azz71c/CentOS 5 – Oracle/CentOS 5 – Oracle.vmx
/vmfs/volumes/4c16a0ec-2c7ebe2a-6ad5-0011s8azz71c/CentOS 5a/CentOS 5a.vmx
Turn On Virtual Machine
Below shows you how to start a virtual machine, to stop it just change the start command for stop.
[[email protected] ~]# vmware-cmd “/vmfs/volumes/4c16a0ec-2c7ebe2a-6ad5-0011s8azz71c/OpenSolaris 2009.06/OpenSolaris 2009.06.vmx” start
start() = 1
List Virtual Machine Status`s
There maybe another (and easier) way of listing the virtual machine status`s if so please send it in.
vmware-cmd -l | sed ‘/^$/d’ | while read VMX ; do STATE=$(vmware-cmd “${VMX}” getstate | awk ‘ { print $3 } ‘) ; echo “${VMX}” = “${STATE}” ; done
- How to Configure a BIND Server on Ubuntu - March 15, 2018
- What is a BGP Confederation? - March 6, 2018
- Cisco – What is BGP ORF (Outbound Route Filtering)? - March 5, 2018
Want to become a VMware expert?
Here is our hand-picked selection of the best courses you can find online:
Complete VMware Administration course
VMware vSphere 7 – Install, Configure, Manage
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial