Closed akihikodaki closed 2 years ago
@akihikodaki Add into QEMU installer "Add current user to kvm group to access /dev/kvm without sudo"
@kostyanf14 Added code to check if KVM is available for user with commit 3eb78062229cbce6d47508dcc8803554af0a714b.
@akihikodaki You add a check but if KVM is unavailable for a user I think we should add the current user to kvm
group.
/dev/kvm
is owned by root:kvm
, so just add the user that starts the installation to this group.
What do you think?
@kostyanf14 I think it is better just to let users deal with the problem by themselves since the details depends on the system configuration. For example, on my computer, /dev/kvm
is owned by root:kvm
, and my account is not added to kvm
group, but it is still accessible from the account since it is accessible from any user:
$ ls -l /dev/kvm
crw-rw-rw-. 1 root kvm 10, 232 Sep 8 20:36 /dev/kvm
$ id
uid=1000(person) gid=1000(person) groups=1000(person),10(wheel) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
It may be possible to add some code for some particular distribution known to have /dev/kvm
inaccessible from user, but in particular case of Ubuntu, a clean installation of Ubuntu 20.04 had /dev/kvm
accessible.
clean installation of Ubuntu 20.04 had /dev/kvm accessible.
Very interesting, my Ubuntu setup: crw-rw----+ 1 root kvm 10, 232 Sep 4 20:14 /dev/kvm
I think it is better just to let users deal...
Please add a comment on Wiki about this step.
Signed-off-by: Akihiko Odaki \akihiko.odaki@daynix.com\
Corresponding wiki updates
NET_BRIDGE
andNET_BRIDGE_SUBNET