lbvirt cannot start VM due to missing kvm-spice in /etc/vmbuilder/libvirt/libvirtxml.tmpl

Bug #1132313 reported by TJ
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vm-builder (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Using Ubuntu 12.04.2 Precise on amd64 with kvm_intel, libvirt and vmbuilder.

Building VMs with vmbuilder using, e.g:

$ sudo vmbuilder kvm ubuntu --suite precise --flavour virtual --arch i386 -o --libvirt qemu:///system --hostname vm-ubuntu-precise-playpen

followed by:

$ virsh -d 0 -c qemu:///system start vm-ubuntu-precise-playpen

results in a failure:

error: Failed to start domain vm-ubuntu-precise-playpen
error: internal error Process exited while reading console log output: Supported machines are:
pc Standard PC (alias of pc-1.0)
pc-1.0 Standard PC (default)
pc-0.14 Standard PC
pc-0.13 Standard PC
pc-0.12 Standard PC
pc-0.11 Standard PC, qemu 0.11
pc-0.10 Standard PC, qemu 0.10
isapc ISA-only PC

I eventually tracked this down to the libvirt domain definition using

<emulator>/usr/bin/kvm</emulator>

instead of

<emulator>/usr/bin/kvm-spice</emulator>

editing that line using:

$ virsh -d 0 -c qemu:///system edit vm-ubuntu-precise-playpen

allows the VM to start correctly.

The problem stems from the libvirt template installed by vmbuilder at "/etc/vmbuilder/libvirt/libvirtxml.tmpl" using the wrong emulator. It should be "/usr/bin/kvm-spice" not "/usr/bin/kvm".

A simple fix is:

$ sudo sed -i 's,\(/usr/bin/kvm\),\1-spice,' /etc/vmbuilder/libvirt/libvirtxml.tmpl

Changed in vm-builder (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.