@@ -23,6 +23,7 @@ setup-virtualization ACTION="":
23
23
echo " <option> : Specify the quick option to skip the prompt"
24
24
echo " Use 'enable' to select Enable Virtualization"
25
25
echo " Use 'disable' to select Disable Virtualization"
26
+ echo " Use 'group' to select Add $USER to libvirt group"
26
27
echo " Use 'vfio-on' to select Enable VFIO drivers"
27
28
echo " Use 'vfio-off' to select Disable VFIO drivers"
28
29
echo " Use 'shm' to select Autocreate Looking-Glass shm"
@@ -31,7 +32,14 @@ setup-virtualization ACTION="":
31
32
echo "${bold}Virtualization Setup${normal}"
32
33
echo "NOTE : Enabling Virtualization will layer virt-manager and qemu"
33
34
echo " this will slow down system updates by a lot."
34
- OPTION =$(Choose "Enable Virtualization" "Disable Virtualization" "Enable VFIO drivers" "Disable VFIO drivers" "Autocreate Looking-Glass shm" )
35
+ OPTION =$(Choose \
36
+ "Enable Virtualization" \
37
+ "Disable Virtualization" \
38
+ "Add $USER to libvirt group" \
39
+ "Enable VFIO drivers" \
40
+ "Disable VFIO drivers" \
41
+ "Autocreate Looking-Glass shm" \
42
+ )
35
43
fi
36
44
if [[ "${OPTION,,}" =~ ^enable[[ :space:]]virt ]]; then
37
45
virt_test =$(rpm-ostree status | grep -A 4 "●" | grep "virt-manager" )
@@ -121,4 +129,6 @@ setup-virtualization ACTION="":
121
129
LOOKING_GLASS_TMP"
122
130
echo "Adding SELinux context record for /dev/shm/looking-glass"
123
131
sudo semanage fcontext -a -t svirt_tmpfs_t /dev/shm/looking-glass
132
+ elif [[ "${OPTION,,}" =~ group ]]; then
133
+ sudo usermod -aG libvirt $USER
124
134
fi
0 commit comments