$ sudo qemu-img info /var/lib/libvirt/images/jam1/tmprK58RK.qcow2
image: /var/lib/libvirt/images/jam1/tmprK58RK.qcow2
file format: qcow2
virtual size: 5.0G (5368709120 bytes)
disk size: 613M
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
virsh # snapshot-create-as jam1 jam1-A --disk-only --atomic
error: internal error: unable to execute QEMU command 'transaction': Could not open '/var/lib/libvirt/images/jam1/tmprK58RK.qcow2': Could not open '/var/lib/libvirt/images/jam1/tmprK58RK.qcow2': Permission denied: Permission denied
$ ls -al /var/lib/libvirt/images/jam1/tmprK58RK.qcow2
-rw-r--r-- 1 libvirt-qemu kvm 642908160 Jun 24 13:18 /var/lib/libvirt/images/jam1/tmprK58RK.qcow2
/var/log/syslog
Jun 24 13:22:51 bat kernel: [14013.429506] type=1400 audit(1403630571.119:76): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="libvirt-dafd2c09-a81d-4ee3-a95c-beb50aecf4e8" pid=17961 c\
omm="apparmor_parser"
Jun 24 13:22:51 bat kernel: [14013.435384] type=1400 audit(1403630571.127:77): apparmor="DENIED" operation="open" profile="libvirt-dafd2c09-a81d-4ee3-a95c-beb50aecf4e8" name="/var/lib/libvirt/images/jam1/tmprK\
58RK.qcow2" pid=15483 comm="qemu-system-x86" requested_mask="r" denied_mask="r" fsuid=124 ouid=124
Jun 24 13:22:51 bat kernel: [14013.435401] type=1400 audit(1403630571.127:78): apparmor="DENIED" operation="open" profile="libvirt-dafd2c09-a81d-4ee3-a95c-beb50aecf4e8" name="/var/lib/libvirt/images/jam1/tmprK\
58RK.qcow2" pid=15483 comm="qemu-system-x86" requested_mask="r" denied_mask="r" fsuid=124 ouid=124
Jun 24 13:22:51 bat kernel: [14013.435437] type=1400 audit(1403630571.127:79): apparmor="DENIED" operation="open" profile="libvirt-dafd2c09-a81d-4ee3-a95c-beb50aecf4e8" name="/var/lib/libvirt/images/jam1/tmprK\
58RK.qcow2" pid=15483 comm="qemu-system-x86" requested_mask="r" denied_mask="r" fsuid=124 ouid=124
Jun 24 13:22:51 bat kernel: [14013.566334] type=1400 audit(1403630571.259:80): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="libvirt-dafd2c09-a81d-4ee3-a95c-beb50aecf4e8" pid=17964 c\
omm="apparmor_parser"
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty
$ uname -a
Linux bat 3.13.0-29-generic #53-Ubuntu SMP Wed Jun 4 21:00:20 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Failing for me as wel on trusty when snappshotting a running domain apparently due to app armour.
virsh # list ------- ------- ------- ------- ------- ------- ---
Id Name State
-------
7 jam1 running
virsh # domblklist jam1 ------- ------- ------- ------- ------- ------ libvirt/ images/ jam1/tmprK58RK. qcow2
Target Source
-------
hda /var/lib/
$ sudo qemu-img info /var/lib/ libvirt/ images/ jam1/tmprK58RK. qcow2 libvirt/ images/ jam1/tmprK58RK. qcow2
image: /var/lib/
file format: qcow2
virtual size: 5.0G (5368709120 bytes)
disk size: 613M
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
virsh # snapshot-create-as jam1 jam1-A --disk-only --atomic libvirt/ images/ jam1/tmprK58RK. qcow2': Could not open '/var/lib/ libvirt/ images/ jam1/tmprK58RK. qcow2': Permission denied: Permission denied
error: internal error: unable to execute QEMU command 'transaction': Could not open '/var/lib/
$ ls -al /var/lib/ libvirt/ images/ jam1/tmprK58RK. qcow2 libvirt/ images/ jam1/tmprK58RK. qcow2
-rw-r--r-- 1 libvirt-qemu kvm 642908160 Jun 24 13:18 /var/lib/
/var/log/syslog 1.119:76) : apparmor="STATUS" operation= "profile_ replace" profile= "unconfined" name="libvirt- dafd2c09- a81d-4ee3- a95c-beb50aecf4 e8" pid=17961 c\ parser" 1.127:77) : apparmor="DENIED" operation="open" profile= "libvirt- dafd2c09- a81d-4ee3- a95c-beb50aecf4 e8" name="/ var/lib/ libvirt/ images/ jam1/tmprK\ system- x86" requested_mask="r" denied_mask="r" fsuid=124 ouid=124 1.127:78) : apparmor="DENIED" operation="open" profile= "libvirt- dafd2c09- a81d-4ee3- a95c-beb50aecf4 e8" name="/ var/lib/ libvirt/ images/ jam1/tmprK\ system- x86" requested_mask="r" denied_mask="r" fsuid=124 ouid=124 1.127:79) : apparmor="DENIED" operation="open" profile= "libvirt- dafd2c09- a81d-4ee3- a95c-beb50aecf4 e8" name="/ var/lib/ libvirt/ images/ jam1/tmprK\ system- x86" requested_mask="r" denied_mask="r" fsuid=124 ouid=124 1.259:80) : apparmor="STATUS" operation= "profile_ replace" profile= "unconfined" name="libvirt- dafd2c09- a81d-4ee3- a95c-beb50aecf4 e8" pid=17964 c\ parser"
Jun 24 13:22:51 bat kernel: [14013.429506] type=1400 audit(140363057
omm="apparmor_
Jun 24 13:22:51 bat kernel: [14013.435384] type=1400 audit(140363057
58RK.qcow2" pid=15483 comm="qemu-
Jun 24 13:22:51 bat kernel: [14013.435401] type=1400 audit(140363057
58RK.qcow2" pid=15483 comm="qemu-
Jun 24 13:22:51 bat kernel: [14013.435437] type=1400 audit(140363057
58RK.qcow2" pid=15483 comm="qemu-
Jun 24 13:22:51 bat kernel: [14013.566334] type=1400 audit(140363057
omm="apparmor_
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty
$ uname -a
Linux bat 3.13.0-29-generic #53-Ubuntu SMP Wed Jun 4 21:00:20 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
$ virsh --version
1.2.2