Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
virt-manager - unable to delete external snapshot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 340

PostPosted: Thu Dec 26, 2024 6:37 pm    Post subject: virt-manager - unable to delete external snapshot Reply with quote

When internal snapshot created - it can be deleted without any issue, but when External snapshot created - any attempt to delete it gives permissions denied:

Code:
Error deleting snapshot 'snapshot1': internal error: unable to execute QEMU command 'block-commit': Could not open '/var/lib/libvirt/images/gentoo.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.13/site-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/gentoo.qcow2': Permission denied


No matter what permissions on file - working user, libvirt, qemu, root... always same error.
Even changing permissions to 777 doesn't help.

$ virsh snapshot-delete gentoo snapshot1
error: Failed to delete snapshot snapshot1
error: internal error: unable to execute QEMU command 'block-commit': Could not open '/var/lib/libvirt/images/gentoo.snapshot1': Permission denied

same error when run with sudo

Please your help
Back to top
View user's profile Send private message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 340

PostPosted: Thu Dec 26, 2024 6:38 pm    Post subject: Reply with quote

/var/lib/libvirt/images # ls -l gentoo.*
-rw------- 1 qemu qemu 21478375424 Dec 26 20:37 gentoo.qcow2
-rw-r--r-- 1 root root 196928 Dec 26 20:37 gentoo.snapshot1
Back to top
View user's profile Send private message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 340

PostPosted: Thu Dec 26, 2024 7:06 pm    Post subject: Reply with quote

It seems apparmor is the issue, disabling it - allows snapshot to delete.
But no denied logs in audit.log, any idea how to allow snapshot delete via apparmor?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum