A
A
Alexey R2021-09-01 21:52:54
linux
Alexey R, 2021-09-01 21:52:54

How to give rights to run an image from another disk in virt-manager?

Hello!
There was a problem with KVM. If the hard disk of the guest OS is located on another disk, and not the one where linux is installed, then KVM does not start this virtual machine and writes (maybe the emulator does not have rights to search for the /media/aser/... path). If Wirth. hard lies for example /var/lib/libvirt/images , then everything works fine.
The rights to the files are the same. Changed the rights, the result is zero. Googled and couldn't find any information.
Please tell me what is the problem?
612fcbeb7b67b965008893.png
612fcbfc29427609905419.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tts035, 2022-01-15
@tts035

Only $USER (and root) have access to the /media/$USER mounted drives, and libvirt/virt-manager runs qemu-kvm as libvirt-qemu
Solution: in /etc/libvirt/qemu.conf specify

user = "username"
group = "groupname"

After that, virt-manager will run qemu-kvm as the specified user, and there will be no problems with access.
Alternative option: mount partitions in /mnt/ (via gnome-disks)
Source: https://www.linux.org.ru/forum/desktop/15962644/page1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question