vim-cmd vmsvc/getallvms
# esxcli vm process list
# vim-cmd vmsvc/power.off 22
#!/bin/bash
base_image="image name"
new_image="new_image"
datastore_path="/vmfs/volumes/datastore1"
pushd ${datastore_path}
mkdir ${new_image} && cp -rf "base-images/${base_image}/*" ${new_image}/
popd
vim-cmd solo/registervm ${datastore_path}/${new_image}/*.vmx
export no_proxy="localhost,127.0.0.0,192.169.1.2"
sgwilbur@gura:~$ ssh root@192.168.1.10
Password:
The time and date of this login have been sent to the system logs.
VMware offers supported, powerful system administration tools. Please
see www.vmware.com/go/sysadmintools for details.
The ESXi Shell can be disabled by an administrative user. See the
vSphere Security documentation for more information.
~ # vim-cmd cmsvc/getallvms
Invalid command 'cmsvc/getallvms'.
~ # vim-cmd vmsvc/getallvms
Vmid Name File Guest OS Version Annotation
11 Ubuntu Server 13.04 [datastore1] base-images/Ubuntu Server 13.04/Ubuntu Server 13.04.vmx ubuntu64Guest vmx-08 sgwilbur : Rat1onal
~ # vim-cmd vmsvc/destroy 11
Reference: