Monday, March 28, 2011

Cloning an ESXi 4.1 VM

After fiddling around with a lot of bad advice I finally found one suggestion that worked for me to clone an ESXi VM. It's not elegant or quick....

so being relatively new to the vmware world and a somewhat reluctant participant since the test system i'm using won't support Hyper-V and only VMware, it's comforting to see that there's a Unix kernel lurking in it's background and that some of the old familiar shell commands work, like ls and df, etc. Unfortunately I don't see a man-pages facility which would help.

the long and short of this cloning thing was found here . Essentially you ssh into the esxi host and run a vmkfs -i command to clone the vm.

  1. If you hadn't activate SSH then do this as described here.
  2. Create a new VM with the same configuration as the machine you wish to clone.
  3. By creating the VM you also created its virtual disk (*.vmdk).
  4. Delete this disk (we will replace it with the clone) by using the “Datastore Browser” or SSH on ESXi.
  5. Connect to your ESXi by using SSH.
  6. type the following command (here “ubu-10.04-server” is the template).
vmkfstools -i /vmfs/volumes/datastore1/ubu-10.04-server/ubu-10.04-server.vmdk /vmfs/volumes/datastore1/newmachine/newmachine.vmdk
Destination disk format: VMFS zeroedthick
Cloning disk '/vmfs/volumes/datastore1/ubu-10.04-server/ubu-10.04-server.vmdk'...
Clone: 100% done.
  • boot your new machine and configure it.

1 comment:

Anonymous said...

Good morning. My name is Thaler Beasley and the firm I work for, Haizlip Studio in Memphis, is designing a series of Civil War exhibits which will go in 16 welcome centers across Tennessee.

In our images searches, we came across your photo of Fort Pillow:
http://www.flickr.com/photos/94043755@N00/254820159/ and would like to ask your permission to use it for one of our interpretive panels. We are happy to credit you and your website.

These exhibits are state funded and will be free. This particular exhibit will be going in the Dyersburg welcome center and is meant to promote Civil War tourism in the area.

Please let me know if you have any questions or concerns and your thoughts on allowing us to use the image. You can reach me on email: thaler@haizlipstudio.com or on 901.527.3866.

Best, Thaler