System policy disabling Virtual Machine Manager KVM

My first time encountering system policy disabling the Virtual Machine Manager. It only allows Xen, but after i install Xen, openSUSE boots into restore mode. Fail.

Definately, i am clueless : |

@badlialrashid:

KVM tends to store the VMS in /var/lib/libvirt/images –

 # ls -aldZ /var/lib/libvirt/images
drwx--x--x. 2 root root system_u:object_r:virt_image_t:s0 4096  1. Apr 19:15 /var/lib/libvirt/images
 #

You may have another VM image location if your /var partition doesn’t have sufficient space – like mine for example – I usually “only” have 16 GiB /var partitions …

 # ls -adlZ /???/KVM
drwxr-xr-x. 3 root root system_u:object_r:virt_var_lib_t:s0 28 20. Jan 18:04 /???/KVM
 # ls -adlZ /???/KVM/images
drwxr-xr-x. 2 qemu qemu system_u:object_r:virt_image_t:s0 34 21. Jan 13:10 /???/KVM/images
 #

For the second case, there’s some system management needed:

 # semanage fcontext --list --locallist 
SELinux fcontext                                   type               Context

 . 
/???/KVM                                        all files          system_u:object_r:virt_var_lib_t:s0 

SELinux Local fcontext Equivalence

 . 
/???/KVM/images = /var/lib/libvirt/images
 . 
 #

The “semanage-fcontext” man page has examples to guide you through the needed setup.

You then have to execute –

 # restorecon -F -R -v /var
 # restorecon -F -R -v /???/KVM

@dcurtisfra thank you and noted. i have to check system policy as the openSUSE is not part of a windows domain.

I keep my vm image and vm qcow2 files in my /home partition rather than /var/lib/libvirt/images. Those files are so big that I had to keep enlarging the root partition as I added vms. I keep them in /home/user/VMimages/ where there is a couple of terabytes of storage available.

tom kosvic

The same for me – the “???” is an additional “home” partition with a couple of Terabytes space – primarily for the user who manages my photography JPEG and RAW files …