in order to bring cloud images in-house for testing, I'm trying to convert amazon's ec2 (xen) images to our ESX server
This is what i've done so far
-unbundled an amazon image into raw format
-converted the raw format into vmdk
qemu-img convert -f raw rawimage.fs -O vmdk image_converted.vmdk
-i verified the output
file image_converted.vmdk
image_converted.vmdk: setgid sticky VMware4 disk image
I re-created manually my vmx file
(see attached)
I'm using vCenter Converter Standalone Client version (4.0.0) to convert the machine to ESX 3.5 and its failing with
Error: Failed to clone disk 0 on the virtual machine
FAILED: agent.internal.fault.NfcConnectionFault.summary
does anyone see anything wrong with this approach? or can give me some insight onto what the error means?
Hello,
That is what I did. However, I would verify that the Xen image actually boots. I would also use vmplayer and verify the VMDK as well.
Best regards,
Edward L. Haletky
VMware Communities User Moderator, VMware vExpert 2009
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.
Blue Gears and SearchVMware Pro Blogs -- Top Virtualization Security Links -- Virtualization Security Round Table Podcast
For those interested in the following hack
-this is what i did
1. unbundle your AMI into raw image format
ec2-unbundle -m yourimage.manifest.xml -k /root/.ec2/pk-yourkey.pem
2. convert it using qemu to vmware 4 workstation format
qemu-img convert -f raw youimage.fs -O vmdk yourimage_converted.vmdk
3. convert it so ESX can understand it
vmware-vdiskmanager -h yourESXhost -u root -f password.txt -r yourimage_converted.vmdk -t 4 "[VOLUMENAME]/pathtoyourvm/yourimage_converted.vmdk"
What I did to get my image to boot ... here comes the hack stuff
1. install the same guest os
2. add the converted disk
3. edit fstab so that the guess OS can see the converted disk (reboot)
4. edit the fstab file on the converted disk and update the first entry so it boots from the new added disk
5. edit grub.conf and another entry so the kernel boots from the new added disk
6. copy over contents of /lib/modules over to new added disk under /lib/modules