[Bug 659532] Re: vmbuilder XML is incomplete with libvirt 0.8.3 (No bootable devices)

Jamie Strandboge jamie at ubuntu.com
Wed Oct 13 13:58:27 BST 2010


** Description changed:

  Binary package hint: vmbuilder
  
- libvirt 0.8.3 and later (and the upcoming libvirt update for lucid-
+ SRU
+ 
+ 1. libvirt 0.8.3 and later (and the upcoming libvirt update for lucid-
  security) does not probe qemu disks for the image format and defaults to
  'raw' when the format is not specified in the XML. This breaks vmbuilder
  because the version in maverick does not specify a format in the XML.
  
  WORKAROUND:
  After creating, use '/usr/sbin/libvirt-migrate-qemu-disks'.
  
- TEST CASE 1 (in maverick release):
+ 2. this is not yet fixed upstream (or Natty), but is ACKd by upstream
+ 
+ 3. Patch 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.
+ 
+ 4a. TEST CASE 1 (in maverick release):
  $ sudo vmbuilder kvm ubuntu --suite lucid --flavour virtual --arch i386  -o --libvirt qemu:///system
  $ virsh start ubuntu
  $ virt-viewer ubuntu
  
- At this point the VM has started, but shows 'No bootable devices'.
+ At this point the VM will have started, but shows 'No bootable devices'
+ if unpatched. If patched, it should boot up fine.
  
- TEST CASE 2 (don't regress --raw (first delete the previous 'ubuntu' domain)):
+ 4b. TEST CASE 2 (don't regress --raw (first delete the previous 'ubuntu' domain)):
  $ qemu-img create /tmp/foo.img 5G
  $ sudo /sbin/losetup /dev/loop1 /tmp/foo.img
  $ sudo vmbuilder kvm ubuntu --suite lucid --flavour virtual --arch i386  -o --libvirt qemu:///system --raw=/dev/loop1
  $ virsh --connect=qemu:///system start ubuntu
  $ virt-viewer --connect=qemu:///system ubuntu
  
  At this point the VM should be started and running.
+ 
+ 5. Risk of regression is considered low. Patch is not intrusive and only
+ will add the extra XML only if a disk is converted, so it should affect
+ no other parts of libvirt. Since vm-builder with libvirt and qcow2 disks
+ (the default) are currently broken, there is no risk of regression in
+ the libvirt code. Tests show that --raw still works properly too.

-- 
vmbuilder XML is incomplete with libvirt 0.8.3 (No bootable devices)
https://bugs.launchpad.net/bugs/659532
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to vm-builder in ubuntu.



More information about the Ubuntu-server-bugs mailing list