3

On arch, I set up a number of VMs using virt-manager. My user is part of the libvirt group, and I can access virsh, but virsh list without root access doesn't list the VMs I created:

$ virsh list --all                                                                                                                
 Id   Name   State
--------------------

$ sudo virsh list --all                                                                                                            Id   Name                 State
-------------------------------------
 -    VM1                shut off
 -    VM2                shut off
 -    VM3                shut off
 -    VM4                shut off

$ groups                                                                                                                      
libvirt kvm wheel user

My questions are: how do I get access to the VMs without root or transfer ownership to my user? And second do I need to be a member of the kvm group, or what is it's purpose? it was suggested somewhere but it didn't help and I don't want to be a member of a group where it isn't necessary.

EDIT: found an answer to my second question here: https://unix.stackexchange.com/questions/599651/whats-the-purpose-of-kvm-libvirt-and-libvirt-qemu-groups-in-linux

Still interested in the first one though.

4
  • the simple answer to your first question is: because there are two different vm pools. your user uses your user's pool, root uses the system's pool.
    – Malik
    Commented Aug 31, 2022 at 8:59
  • I see, I wasn't aware of that concept. Commented Sep 4, 2022 at 12:14
  • @Malik do you have some documentation link about this "vm pool"? I find only information about storage pools.
    – Gerd
    Commented Jul 31, 2023 at 20:31
  • serverfault.com/questions/803283/…
    – Fang Zhen
    Commented Sep 12, 2023 at 11:09

0

You must log in to answer this question.

Browse other questions tagged .