Yup, that works. But everything I can find regarding the use of block devices with kvm seems to indicate that there is no need to change any permissions. So I'm a little confused as to what it is I'm doing wrong.I guess you can change the default permissions with udev rules
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Permission denied starting VM using block device on KVM
-
- Posts: 8
- Joined: 2018-09-09 10:42
Re: Permission denied starting VM using block device on KVM
-
- Posts: 8
- Joined: 2018-09-09 10:42
Re: Permission denied starting VM using block device on KVM
Oooh, I think I understand it now: most people control their VMs using virt-manager, which uses qemu://system to connect. That in turn connects to the libvirt daemon, which is usually run as root. I use a non privileged user. In this case virsh connects to qemu://session and a new instance of libvirt is started for that user. That's why my users needs special permissions. I will have to think about how to do it right now.
-
- Global Moderator
- Posts: 2715
- Joined: 2018-06-20 15:16
- Location: Colorado
- Has thanked: 41 times
- Been thanked: 201 times
Re: Permission denied starting VM using block device on KVM
I appreciate the eyes on this. It would be good to have this ironed out. It bugs me to have unknowns in my own understanding here.
I do remember permission issues setting mine up but think it was just the groups for my dom0.
Next, as noted I've seen that permissions are different using cli than using a front end like VMM. For me it's simpler to use VMM only. Originally I would have the storage path be the direct path to /dev and VMM made a new pool to the root file system automatically. It worked fine but that bugged me. During experimentation with the storage pools I decided to have only the default pool and used links. Never saw a how-to on that, just tried it and it worked fine, and it simplified the VMM's storage pools.
That was a few years ago on a 8.1 machine. My current main machine started as 8.8 and is upgraded to ~9.5. No change in behavior. I'm pretty sure setting that one up I added the above groups to the user and that's it.
So clarify if your using VMM, or other, or virsh?
ADD: and I just saw your response.....I'll send anyway.
I do remember permission issues setting mine up but think it was just the groups for my dom0.
Code: Select all
$ groups
dom0 adm cdrom floppy sudo audio dip video plugdev netdev kvm libvirt libvirt-qemu
That was a few years ago on a 8.1 machine. My current main machine started as 8.8 and is upgraded to ~9.5. No change in behavior. I'm pretty sure setting that one up I added the above groups to the user and that's it.
So clarify if your using VMM, or other, or virsh?
ADD: and I just saw your response.....I'll send anyway.