Use Openstack img in Virtualbox

03 May 2016 in TIL

I needed to add some packages to our base Openstack image install recently. The easiest way to do this is to export the img file from Openstack and run it in Virtualbox.

Everything I could find told me that I need to convert the img to a VDI file wit the following command:

bash
VBoxManage convertfromraw --format VDI centos6.7-image.img centos6.7-image.vdi

However, this only resulted in an error.

bash
FATAL: No bootable medium found! System halted.

It turns out that VBoxManage can't convert things correctly. Instead, I needed to install qemu and use that to convert the disk image

bash
qemu-img convert -O vdi centos6.7-image.img centos6.7-image.vdi

Once this completed, I could create a machine and attach the vdi file as the disk and everything booted fine