Difference between revisions of "Virtual Machines"

Jump to navigation Jump to search
(Re-order)
(Added "Rename a VM")
Line 124: Line 124:
# Restart VM and verify all is good
# Restart VM and verify all is good
# Turn off snapshotting
# Turn off snapshotting
== Rename a VM ==
'''''Renaming a virtual machine just by right-clicking over the machine and renaming does not alter the underlying file and folder names.'''''  To ensure that these changes take place you must move the VM to another datastore, ie
# Shutdown the VM
# Rename the VM in vCenter
# Migrate the VM and move it to another Datastore
# Restart the VM
If you can't move the VM to another datastore then it gets much more complicated, requiring faffing around in the service console.
# Shutdown the VM
# <code> vmware-cmd -s unregister /vmfs/volumes/datastore/vm/vmold.vmx </code>
# <code> mv /vmfs/volumes/datastore/vm-old /vmfs/volumes/datastore/vm-new </code>
# <code> cd /vmfs/volumes/datastore/vm-new </code>
# <code> vmkfstools -E vm-old.vmdk vm-new.vmdk </code>
# <code> find . -name ‘*.vmx*’ -print -exec sed -e ‘s/vm-old/vm-new/g’ {} \; </code>
# For every file that hasn’t been renamed (.vmsd etc.) <code> mv vm-old.vmx vm-new.vmx </code>
# <code> vmware-cmd -s register /vmfs/volumes/datastore/vm-new/vm-new.vmx </code>
The above was taxed from http://www.yellow-bricks.com/2008/02/10/howto-rename-a-vm/


== Shutdown VM via Service Console ==
== Shutdown VM via Service Console ==