virsh create-snapshot fails

Bug #1096125 reported by Riccardo Casatta
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Triaged
High
Unassigned

Bug Description

Hello,

i have a plain installation of Ubuntu 12.10 server,
i installed package ubuntu-virt-server and added the user to the kvm and libvirtd group. (qemu-kvm 1.2 libvirt 0.9.13)
After that i can run kvm virtual machines.

Now i am trying to get a snapshot of the disk (first step to achieve live backup of virtual machines)
virsh snapshot-create-as [vmname] snapshot1 "snapshot" --disk-only --atomic

but i am getting the following error:
error: internal error unable to execute QEMU command 'transaction': Could not open '/var/lib/libvirt/images/ubu1204.snapshot1'

(i even tryed with permission 777 )

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in kvm (Ubuntu):
status: New → Confirmed
Changed in kvm (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I don't believe this is due to apparmor. However there certainly is an apparmor bug, as running virsh snapshot-create-as causes the /etc/apparmor.d/libvirt/<test1-uuid>.files entry for /var/lib/libvirt/images/test1.img to be replaced by one for

/var/lib/libvirt/images/test1.snapshot1

Revision history for this message
Riccardo Casatta (riccardo-casatta) wrote :

Hi Serge,

i made a snapshot after disabling apparmor and it works!

Here are the commands used:

/etc/init.d/apparmor stop
update-rc.d -f apparmor remove
reboot now
virsh snapshot-create-as ubu-server-64-10.04.3 snap1 --disk-only

So i changed the target package of the bug to apparmor

Thank you again

affects: kvm (Ubuntu) → apparmor (Ubuntu)
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks, Riccardo. That actually points to libvirt (in particular virt-aa-helper) being the problem.

affects: apparmor (Ubuntu) → libvirt (Ubuntu)
Changed in libvirt (Ubuntu):
importance: Medium → High
status: Confirmed → In Progress
status: In Progress → Triaged
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.