Community

Discussions  |  Feature Requests  |  Tips and Tricks

Converting a VMware ESXi 5 OVF virtual machine image to Nimbula Director format

#1Aug. 28, 2012 15:39:54

Jeremy Bar
Registered: 2011-01-05
Posts: 30

Converting a VMware ESXi 5 OVF virtual machine image to Nimbula Director format

I used the following method to convert an ESXi 5 OVF disk image to Nimbula Director format. I ran those commands on Ubuntu Linux 10.04 64 bit, with tools provided by VMware Workstation 8.0.4.744019 for Linux 64 bit, qemu-kvm, and nimbula-cli packages installed.

1. Unzip the OVF file

2. With VMware Workstation installed, run vmplayer, select open virtual machine, browse to the unzipped directory, then import OVF. This will create a new VM in the ~/vmware/vm_to_convert directory.

3. Run the new virtual machine with vmplayer, and shrink the disk.
When the shrink process it done, power off the VM cleanly with the Linux halt command, or Windows Start -> shutdown menu.

4. Convert the VMDK file to RAW format:

cd ~/vmware/vm_to_convert
qemu-img convert -f vmdk -O raw vm_to_convert-disk1.vmdk vm_to_convert-disk1.raw


5. Then create the TAR archive compatible to Nimbula Director:

tar -zScf vm_to_convert-disk1.tar.gz vm_to_convert-disk1.raw
rm vm_to_convert-disk1.raw


At this point, your image is ready to be uploaded to Nimbula Director.

6. Run the following commands to upload the image to our hosted demo cluster:
(Replace the /account with your Nimbula Director customer name)

export NIMBULA_API=https://api_address
export NIMBULA_USER=/account/administrator
nimbula-api add machineimage /account/images/vm_to_convert-disk1.tar.gz vm_to_convert-disk1.tar.gz
nimbula-api add imagelist /account/images/vm_to_convert-disk1 'Converted image' --default 1
nimbula-api add imagelistentry /account/images/vm_to_convert-disk1 /account/images/vm_to_convert-disk1.tar.gz 1


7. Start the instance with the following:
nimbula-api launch simple /account/images/vm_to_convert-disk1 small 1


This process produces a bootable and functional KVM / Nimbula compatible image.

Edited jeremy (Aug. 28, 2012 15:41:39)