Saturday, April 14, 2012

VM manipulation

1. /vmfs/volumes/4f611c3f-ca118ee2-d237-0025904c4fce/ServiceVM-1.23_Ubuntu # vim-cmd vmsvc/getallvms

2. vimcmd-vmsvc/power.getstate (power.off, if needed)

3. /vmfs/volumes/4f611c3f-ca118ee2-d237-0025904c4fce/ServiceVM-1.23_Ubuntu # vim-cmd vmsvc/unregister 8

4. /vmfs/volumes/4f611c3f-ca118ee2-d237-0025904c4fce/ServiceVM-1.23_Ubuntu # sed -i "s/NTNX-1-local-ds-NTNX/LOCAL_USSEAVM013/g" ServiceVM-1.23_Ubuntu.vmx

5. vim-cmd solo/registervm /vmfs/volumes/4f611c3f-ca118ee2-d237-0025904c4fce/ServiceVM-1.23_Ubuntu/ServiceVM-1.23_Ubuntu.vmx

6. vim-cmd hostsvc/maintenance_mode_exit, if it is in maintenance mode.