Difference between revisions of "Virtual Machines"

Jump to navigation Jump to search
313 bytes added ,  08:52, 12 October 2010
Re-arranged page
(Re-arranged page)
Line 113: Line 113:
|}
|}


== Increase Disk Size ==
== Procedures ==
=== Increase Disk Size ===
Increasing the virtual disk size provided to a VM is straight forward (though be aware that snapshots need to be deleted 1st, if any exist)...
Increasing the virtual disk size provided to a VM is straight forward (though be aware that snapshots need to be deleted 1st, if any exist)...
# Go into the VM's settings
# Go into the VM's settings
Line 123: Line 124:
''In-case of problems, see - [[Virtual_Machines#Can't Increase a VM's Disk|Can't Increase a VM's Disk]]
''In-case of problems, see - [[Virtual_Machines#Can't Increase a VM's Disk|Can't Increase a VM's Disk]]


=== Increase Logical Partition ===
==== Increase Logical Partition ====
Generally boot or system disks cannot be extended whilst the OS is up, whereas normal data disk can be in later OS's, but this is still not ideal.  Its generally most reliable to plan for system down time, and use a utility to extend the partition whilst its offline. Especially in a virtual environment there is no excuse for not making a backup of the partition 1st.  
Generally boot or system disks cannot be extended whilst the OS is up, whereas normal data disk can be in later OS's, but this is still not ideal.  Its generally most reliable to plan for system down time, and use a utility to extend the partition whilst its offline. Especially in a virtual environment there is no excuse for not making a backup of the partition 1st.  


Line 153: Line 154:
# Turn off snapshotting
# Turn off snapshotting


=== VM's With Lots Of Disks ===
==== VM's With Lots Of Disks ====
It can be very difficult to identify the correct disk within VMware to increase when a VM has a large number of VMDK's.
It can be very difficult to identify the correct disk within VMware to increase when a VM has a large number of VMDK's.


Line 161: Line 162:
* Windows drive letters are useless, never assume D: is disk 2 for example
* Windows drive letters are useless, never assume D: is disk 2 for example


== Rename a VM ==
=== 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
'''''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
# Shutdown the VM
Line 179: Line 180:
The above was taxed from http://www.yellow-bricks.com/2008/02/10/howto-rename-a-vm/
The above was taxed from http://www.yellow-bricks.com/2008/02/10/howto-rename-a-vm/


== Clone a VM ==
=== Clone a VM ===
This can done as
This can done as
* '''Hot clone''' - Source VM is left running, its disks are quiesced, and cloned.  Can cause problems as new machine behaves as if it was ungracefully shutdown when first started, but normally successful.  Source machine needs to be relatively quiet.
* '''Hot clone''' - Source VM is left running, its disks are quiesced, and cloned.  Can cause problems as new machine behaves as if it was ungracefully shutdown when first started, but normally successful.  Source machine needs to be relatively quiet.
* '''Cold clone''' - Source VM is shutdown 1st, preferable to a warm clone if possible.
* '''Cold clone''' - Source VM is shutdown 1st, preferable to a warm clone if possible.


=== Snapshots and Cloning ===
==== Snapshots and Cloning ====
Snapshots are deleted during a clone, in that cloning a machine that has existing snapshots results in the post-snapshot changes being merged into the new machine.
Snapshots are deleted during a clone, in that cloning a machine that has existing snapshots results in the post-snapshot changes being merged into the new machine.


Line 193: Line 194:
# Power on (you'll get an IP conflict if its on the same portgroup as the original)
# Power on (you'll get an IP conflict if its on the same portgroup as the original)


== Shutdown VM via Service Console ==
=== Shutdown VM via Service Console ===
* To determine state of an Virtual Machine running from the local ESX
* To determine state of an Virtual Machine running from the local ESX
** <code> vmware-cmd /vmfs/volumes/SAN1/ServerA/ServerA.vmx getstate </code>
** <code> vmware-cmd /vmfs/volumes/SAN1/ServerA/ServerA.vmx getstate </code>
Line 207: Line 208:
* <code> vmware-cmd.pl /path/to/My_VM.vmx start --server MyESX --username root --password "RootPassword"
* <code> vmware-cmd.pl /path/to/My_VM.vmx start --server MyESX --username root --password "RootPassword"


== Upgrade ESX3 to ESX4 ==
=== Upgrade ESX3 to ESX4 ===
=== Preparation ===
==== Preparation ====
* Clean up the VM
* Clean up the VM
*# Stop any snapshots, and ensure there's no remnant snapshot files (*.vmsd, *-0000x.vmdk, *-delta.vmdk)
*# Stop any snapshots, and ensure there's no remnant snapshot files (*.vmsd, *-0000x.vmdk, *-delta.vmdk)
Line 223: Line 224:
* Shut the VM down
* Shut the VM down


=== Procedure ===
==== Procedure ====
Procedure assumes your migrating machines from a VI3 infrastructure to a new VI4/vSphere infrastructure.
Procedure assumes your migrating machines from a VI3 infrastructure to a new VI4/vSphere infrastructure.
# Export machine as a Virtual Appliance from VI3 infrastructure
# Export machine as a Virtual Appliance from VI3 infrastructure
Line 244: Line 245:
#* Shutdown the VM, and remove the temporary disk added, and change the original SCSI controller to ''VMware Paravirtual''. Restart the machine.
#* Shutdown the VM, and remove the temporary disk added, and change the original SCSI controller to ''VMware Paravirtual''. Restart the machine.
# Delete/Commit the snapshot
# Delete/Commit the snapshot
=== Windows 2008 Install ===
Use VMXNET3 network adapter.  Only use Paravirtual SCSI interface if you're running at least ESX v4.1. You need to boot with the drivers on a floppy
http://www.virtualinsanity.com/index.php/2009/12/01/more-bang-for-your-buck-with-pvscsi-part-2/


== Troubleshooting ==
== Troubleshooting ==

Navigation menu