In VMware server 1.x,  the Command line utility “vmware-cmd” is used to manage the Virtual machines. You can use the vmware-cmd utility to perform various operations on a virtual machine, including registering a virtual machine (on the local server), getting the power state of a virtual machine, setting configuration variables, and so on. Here are some examples on how to use it.

Register a Vmware vm : This command registers a VM and makes it available for startup.

[root@vmware21 ~]# vmware-cmd -s register /vm/linuxdev2/linuxdev2.vmx
[root@vmware21 ~]#

List all registered VMs.
   
[root@vmware21 ~]# vmware-cmd -l
/vm/linuxdev2/linuxdev2.vmx

You have to pass the vmx file as argument for all the below commands.

Poweron the VM.

[root@vmware21 ~]# vmware-cmd /vm/linuxdev2/linuxdev2.vmx start

Get current state of the VM.
  
[root@vmware21 ~]# vmware-cmd /vm/linuxdev2/linuxdev2.vmx getstate
getstate() = on

Gather other information on the VM.

[root@vmware21 ~]# vmware-cmd /vm/linuxdev2/linuxdev2.vmx getconnectedusers
Username              IP
[root@vmware21 ~]# vmware-cmd /vm/linuxdev2/linuxdev2.vmx getuptime
getuptime() = 7498937
[root@vmware21 ~]# vmware-cmd /vm/linuxdev2/linuxdev2.vmx getremoteconnections
getremoteconnections() = 0

Power Management commands:

/usr/bin/vmware-cmd <cfg> start <powerop_mode>
/usr/bin/vmware-cmd <cfg> stop <powerop_mode>
/usr/bin/vmware-cmd <cfg> reset <powerop_mode>

For Vmware 2.0 CLI management, check out : http://unixfoo.blogspot.com/2008/11/vmware-20-cli-management-utility.html
 

0 Shares:
Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like
Read More

Netapp nfsstat

How do you check which nfs client uses most of your filer’s nfs operations? . You have to…
Read More

Simple perl ipcalc

Here is a simple program to calculate Network address and broadcast address, given input of IP address and…
Read More

Perl : Xen API

Xen host can be monitored and controlled via Xen API ( it uses XML-RPC communications). Here is a…