Running a JumpBox with virt-image and libvirt
05 December 2007
JumpBox packages open source applications as appliances. Since I wanted to see what they are all about, I downloaded one of them.
After unpacking, the first roadblock is that the appliance doesn’t come with any config file for libvirt - JumpBox includes a Xen config file, but I wanted to run the appliance under kvm.
This is easily fixed by writing a simple image.xml descriptor that is used with virt-image to create the virtual machine.
There is one more hurdle to overcome: the raw data disk in the downloaded appliance is corrupt. That is thanks to
qemu-img easy to overcome: simply convert the included VHD disk to RAW.
With that, running a JumpBox under kvm consists of these steps:
- Download and unzip the appliance somewhere
- Change into that directory and write a suitable `image.xml` — the one I used can be found [here](http://watzmann.net/software/misc/mantis.xml)
- Convert the VHD to RAW with `qemu-img convert disks/data/data.vhd -O raw disks/data/data.raw`
- Run `virt-image image.xml` Depending on the version you run, it might ask you a few questions — answer them and your VM will be started
As an additional benefit, the
image.xml will let you create a virtual machine under Xen without any changes.
The necessary tools are all part of the
python-virtinst package on Fedora. The website for them is here