ESXi is virtualisation for the enthusiast, the underpaid or tight-fisted. To stop you just installing at and having it all your own way it is limited in what it can do. The limits are generous except for the minor point about a lack of Telnet/SSH support. This means no RCLI. This obviously also means that the power tweakers and tinkerers (like me) are stuck with GUI clicking.
However, a master of the art named Andrew Bradley explains in his blog how to unlock the powers of RCLI and throws in instructions on how to clone your VMs for good measure. What a nice chap!
For the GUI-lovers though, at least you can play with SCP to backup your VMs onto another device. Finally – robust virtual machines for people with servers in their sheds. What do you mean you DON’T have a server in your shed? Oh dear.
So here is how I do it. I do a good build of Windows XP Pro and Ubuntu and save them in a folder called “Templates” I created in datastore1 on the VI Client. Creating a new server from this template goes as follows:
- Go to the Summary tab and right-click the datastore
- Choose browse datastore and the contents are shown
- Create a new folder (e.g. ‘New Server’)
- Use VI Client to copy the VMDK from the template machine to this folder. In this case I’m copying from “\templates\windowsxp.vmdk” to “\New Server\”
- SSH onto the ESX server directly
- cd ‘/vmfs/volumes/datastore1/New Server’
- mv ‘WindowsXP.vmdk’ ‘New Server.vmdk’
- mv ‘WindowsXP-flat.vmdk’ ‘New Server-flat.vmdk’
- vi ‘New Server.vmdk’
- change the -flat.vmdk filename for the Extent Description to be the new filename
- [Esc] :wq! to save/exit vi
Back to VI Client:
- Create a new custom VM
- Name it the same as your folder name (eg. ‘New Server’)
- When prompted for datastore, choose custom and browse to the newly renamed vmdk
- Finish creating the VM (note: I use buslogic adapters)
- Start the VM
Console tab for your new VM
- Start, Control Panel
- Under the Computer Name tab, click Change
- Give it a new name
- Restart when prompted
You can obviously copy your VMDK and -flat.VMDK files off to other storage from time to time so long as the VMs are turned-off. Effective if luddite backup….
[UPDATE: Scripted cloning for the lazy is now available: http://www.pgregg.com/projects/vmclone/]