VM cannot be started with qed disk format

Bug #981571 reported by Tamas Papp
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released

Bug Description

I'm not sure, this is a libvirt bug.

Works fine with qcow2 image.

libvirt log:

2012-04-14 12:39:59.141+0000: starting up
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-1.0 -cpu qemu32 -enable-kvm -m 4096 -smp 1,sockets=1,cores=1,threads=1 -name installer-WXP -uuid b220d8f2-38bd-292a-4bff-5d595a1cc4bf -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/installer-WXP.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -drive file=/data/kvm/tests/installer/WXP.qed,if=none,id=drive-virtio-disk0,format=qed,cache=writeback -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 -netdev tap,fd=18,id=hostnet0,vhost=on,vhostfd=19 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:00:bb:dd,bus=pci.0,addr=0x3 -usb -vnc *:3206 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
kvm: -drive file=/data/kvm/tests/installer/WXP.qed,if=none,id=drive-virtio-disk0,format=qed,cache=writeback: could not open disk image /data/kvm/tests/installer/WXP.qed: Permission denied
2012-04-14 12:39:59.586+0000: shutting down

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libvirt-bin 0.9.8-2ubuntu16
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic x86_64
ApportVersion: 2.0.1-0ubuntu2
Architecture: amd64
Date: Sat Apr 14 15:00:36 2012
SourcePackage: libvirt
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Tamas Papp (tompos) wrote :
Revision history for this message
Tamas Papp (tompos) wrote :

.qed extension is not denied by apparmor configuration.

I attach a patch, that fixes it.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "permit qed extension for a VM image" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for reporting this bug and providing the patch.

I'll try to get it into precise.

Changed in libvirt (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Actually, I"m not able to reproduce this. I'm using a vm with:

    <disk type='file' device='disk'>
      <driver name='qemu' type='qed' cache='writeback'/>
      <source file='/var/lib/libvirt/images/xp.qed'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>

but am seeing no errors.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Can you post the xml for the failing image? (the one you posted is a qcow image)

Changed in libvirt (Ubuntu):
status: New → Incomplete
Revision history for this message
Tamas Papp (tompos) wrote :

Did you check the patch I attached?
Didn't you change already apparmor configuration?

Sorry for the wrong xml. It's the same, but .qed extension ( s/qcow2/qed/ ).
I attach the right one.

Revision history for this message
Tamas Papp (tompos) wrote :

Fixed patch.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Ok, @{HOME}/** is already allowed (as is /var/lib/libvirt/images/**), that's why it was going through. You are using /data/.../xp.qed. Thanks.

Changed in libvirt (Ubuntu):
status: Incomplete → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 0.9.8-2ubuntu17

libvirt (0.9.8-2ubuntu17) precise; urgency=low

  * debian/apparmor/usr.lib.libvirt.virt-aa-helper: add /**.qed r so qed
    drives in non-standard locations can be used. (LP: #981571)
 -- Serge Hallyn <email address hidden> Mon, 16 Apr 2012 11:30:47 -0500

Changed in libvirt (Ubuntu):
status: In Progress → Fix Released
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.