Permission denied starting VM using block device on KVM

Kernels & Hardware, configuring network, installing services

Re: Permission denied starting VM using block device on KVM

Postby programmersdigest » 2018-09-11 16:48

I guess you can change the default permissions with udev rules

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.
programmersdigest
 
Posts: 8
Joined: 2018-09-09 10:42

Re: Permission denied starting VM using block device on KVM

Postby programmersdigest » 2018-09-11 17:47

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.
programmersdigest
 
Posts: 8
Joined: 2018-09-09 10:42

Re: Permission denied starting VM using block device on KVM

Postby CwF » 2018-09-11 17:51

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.
Code: Select all
$ groups
dom0 adm cdrom floppy sudo audio dip video plugdev netdev kvm libvirt libvirt-qemu


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.
CwF
 
Posts: 168
Joined: 2018-06-20 15:16

Previous

Return to System configuration

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable