[Pkg-libvirt-maintainers] Bug#1093955: Trying to delete a snapshot leads to permission denied error

Michael Biebl biebl at debian.org
Fri Jan 24 09:14:23 GMT 2025


Package: libvirt-daemon
Version: 11.0.0-1
Severity: normal

Hi,

since some time now, trying to delete VM snapshots via virt-manager,
fails:

Fehler beim Löschen des Schnappschusses »snapshot1«: internal error: unable to execute QEMU command 'block-commit': Could not open '/var/lib/libvirt/images/debian12.qcow2': Permission denied

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 71, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 107, in tmpcb
    callback(*args, **kwargs)
    ~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 203, in delete
    self._backend.delete()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/libvirt.py", line 7436, in delete
    raise libvirtError('virDomainSnapshotDelete() failed')
libvirt.libvirtError: internal error: unable to execute QEMU command 'block-commit': Could not open '/var/lib/libvirt/images/debian12.qcow2': Permission denied



# these are the permissions, while the VM is running:

# ls -la /var/lib/libvirt/images/
total 3122296
drwx--x--x 2 root         root                4096 Jan 24 10:10 .
drwxr-xr-x 6 root         root                4096 Jan 22 23:52 ..
-rw------- 1 libvirt-qemu libvirt-qemu 21478375424 Jan 24 10:08 debian12.qcow2
-rw-r--r-- 1 libvirt-qemu libvirt-qemu     7471104 Jan 24 10:11 debian12.snapshot1

# when the VM is shutdown, the permissions look like this:
# ls -la /var/lib/libvirt/images/
total 3122804
drwx--x--x 2 root         root                4096 Jan 24 10:10 .
drwxr-xr-x 6 root         root                4096 Jan 22 23:52 ..
-rw------- 1 libvirt-qemu libvirt-qemu 21478375424 Jan 24 10:08 debian12.qcow2
-rw-r--r-- 1 root         root             7995392 Jan 24 10:12 debian12.snapshot1


Deleting snaphosts (for QEMU based hosts) worked in the past. So this is
a regression.

Michael



-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.10-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libvirt-daemon depends on:
ii  libc6                  2.40-6
ii  libgcc-s1              14.2.0-14
ii  libglib2.0-0t64        2.82.4-2
ii  libtirpc3t64           1.3.4+ds-1.3+b1
ii  libvirt-common         11.0.0-1
ii  libvirt-daemon-common  11.0.0-1
ii  libvirt-daemon-log     11.0.0-1
ii  libvirt0               11.0.0-1
ii  libxml2                2.12.7+dfsg+really2.9.14-0.2+b1
ii  logrotate              3.22.0-1

Versions of packages libvirt-daemon recommends:
ii  libvirt-daemon-driver-interface        11.0.0-1
ii  libvirt-daemon-driver-lxc              11.0.0-1
ii  libvirt-daemon-driver-network          11.0.0-1
ii  libvirt-daemon-driver-nodedev          11.0.0-1
ii  libvirt-daemon-driver-nwfilter         11.0.0-1
ii  libvirt-daemon-driver-qemu             11.0.0-1
ii  libvirt-daemon-driver-secret           11.0.0-1
ii  libvirt-daemon-driver-storage          11.0.0-1
ii  libvirt-daemon-driver-storage-disk     11.0.0-1
pn  libvirt-daemon-driver-storage-iscsi    <none>
ii  libvirt-daemon-driver-storage-logical  11.0.0-1
pn  libvirt-daemon-driver-storage-mpath    <none>
pn  libvirt-daemon-driver-storage-scsi     <none>
ii  libvirt-daemon-driver-vbox             11.0.0-1
pn  libvirt-daemon-driver-xen              <none>
ii  libvirt-daemon-lock                    11.0.0-1
ii  libvirt-daemon-plugin-lockd            11.0.0-1
pn  libvirt-daemon-plugin-sanlock          <none>

Versions of packages libvirt-daemon suggests:
pn  libvirt-daemon-driver-storage-gluster       <none>
pn  libvirt-daemon-driver-storage-iscsi-direct  <none>
pn  libvirt-daemon-driver-storage-rbd           <none>
pn  libvirt-daemon-driver-storage-zfs           <none>
ii  libvirt-daemon-system                       11.0.0-1

-- no debconf information


More information about the Pkg-libvirt-maintainers mailing list