Libvirt snapshot doesn't update apparmor profile
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt |
Confirmed
|
Undecided
|
|||
libvirt (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Bionic |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Libvirt doesn't update the VM's apparmor file when creating a external snapshot of a host with miltiple disks. It result in failing to create the snapshot.
There is also a Red Hat Bugzilla bug: https:/
root@CmsrvVH3:~# virsh -c qemu+ssh:
fout: internal error: unable to execute QEMU command 'transaction': Could not create file: Permission denied
when I edit the apparmor profile of the guest and add this line:
"/srv/poolVMS/
All works fine.
I can clearly see that libvirt doesn't add the line on the /etc/apparmor.
Also on guest with only one disk, everything works fine.
Some extra info:
root@CmsrvVH2:~# libvirtd --version
libvirtd (libvirt) 5.4.0
root@CmsrvVH2:~# cat /etc/*release*
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
...
CVE References
Changed in libvirt: | |
importance: | Unknown → Undecided |
status: | Unknown → Confirmed |
Created attachment 1609257
Domain file
Description of problem:
Creating a domain with multiple disks and trying to take an disk-only snapshot with external disk overlay fails with the error "Could not create file: Permission denied"
Version-Release number of selected component (if applicable): 5f37f4662ffb795 2611ddb458c)
Tested on 4.0.0, 5.0.0 and master (648c11c04cf1d4
How reproducible:
Create a new domain for qemu with 2 disk connected. (dumpxml of my domain as attachemnt)
Steps to Reproduce: /var/lib/ libvirt/ images/ ubuntu18. 04-overlay. qcow2,snapshot= external --diskspec vdb,file= /var/lib/ libvirt/ images/ ubuntu18. 04-1-overlay. qcow2,snapshot= external
1. snapshot-create-as --domain ubuntu18.04 --disk-only --atomic --diskspec vda,file=
Actual results:
error: internal error: unable to execute QEMU command 'transaction': Could not create file: Permission denied
Expected results:
Domain snapshot 1567058757 created
Additional info: d/libvirt/ libvirt- a955728a- ac8f-4fcb- 8bea-3e12fca826 a7 as: lib/libvirt/ images/ ubuntu18. 04-overlay. qcow2" rwk,
When manually adding the path to vda overlay file in /etc/apparmor.
"/var/
It works to take snapshot for both disk. So it looks like the apparmor is only updated with the last disk