Import Turnkey Linux VMDK to OpenNebula

TurnKey Linux provides 100+ free ready-to-use appliances. They provide an appliance in different formats (vmdk,ISO,OVF,OpenStack,OpenVZ,XEN,EC2), however yet not out of the box usable for OpenNebula + KVM. To bring a TurnKey Linux appliance live on OpenNebula the image has to be converted first:

qemu-img convert turnkey-wordpress-12.0-squeeze-x86.vmdk -O qcow2 turnkey-wordpress-12.0-squeeze-x86.qemu

I choose the QCow2 format as it provides some advantages (compression, snapshots) over raw. After converting the vmdk to a QCow2 type move the image preferably to /tmp as OpenNebula is going to copy the file to the data-store anyway and by leaving it inside a home directory with SELinux enabled the import is likely to fail.

As a last step the image needs to be imported into OpenNebula. This may be done by using the oneimage command or conveniently using the Sunstone web frontend. Just provide the /tmp/<imageName>.qemu in the “Provide a path” field use “vd” for the device prefix, “qcow2″ for the driver, “vda” for the target. After all just generate a new template naming the new image as a disk, choose x86_64 for the architecture and you’re ready to turn on you key linux appliance. Don’t forget to enable the VNC access as to configure your appliance using the first run script provided by TurnKey Linux.

Submit a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>