Comment 1 for bug 659532

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Attached is a preliminary patch for vm-builder on maverick which adjusts VMbuilder/disk.py to have a new 'self.format_type' attribute. This attribute will normally be 'None', but will be set when a disk is convert()ed. VMbuilder/plugins/libvirt/templates/libvirtxml*.tmpl is then adjusted to supply the proper qemu image format to libvirt if the format_type is set for the disk. Since libvirt defaults to 'raw' for unspecified format types, this covers the default 'qcow2' case and avoids setting the format type when using --raw.

Tested using:
$ sudo vmbuilder kvm ubuntu --suite lucid --flavour virtual --arch i386 -o --libvirt qemu:///system
$ sudo vmbuilder kvm ubuntu --suite lucid --flavour virtual --arch i386 -o --libvirt qemu:///system --raw /dev/loop1