注意:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

“<>”在使用中无需输入

前四项为登录远程宿主的信息设置,如果是当前宿主,可以不用设置

后面的是对单个VM的操作(-l, -h 除外)

操作实例[Path:\>是当前CMD显示路径]:

1.      获取当前宿主的所有VM的列表

Path:\> vmware-cmd -H 127.0.0.1 -U Administrator -P Password -l

2.      获取VM机器里面的IP地址

Path:\> vmware-cmd “E:\GSX\2003\winNetEnterprise.vmx” getguestinfo “ip”

3.      获取VM在宿主机上运行的PID

              Path:\> vmware-cmd “E:\GSX\2003\winNetEnterprise.vmx” getpid

4.      查看远程连接到VM的连接数

Path:\> vmware-cmd “E:\GSX\2003\winNetEnterprise.vmx” getremoteconnections

5.      获取VM的当前状态

Path:\> vmware-cmd “E:\GSX\2003\winNetEnterprise.vmx” gestate

6.      启动VM[记住,请查看状态,确认为停止或者挂起]

Path:\> vmware-cmd “E:\GSX\2003\winNetEnterprise.vmx” start trysoft

7.      当前宿主上所有的VM列表

Path:\> vmware-cmd -l

8.      vm注册到当前宿主

Path:\> vmware-cmd -s register “E:\GSX\2003\winNetEnterprise.vmx”
9.      vm从当前宿主注销

Path:\> vmware-cmd -s unregister “E:\GSX\2003\winNetEnterprise.vmx”

[其他的使用实例可以参考vmware官方帮助文档]!