containers / qm

QM is a containerized environment for running Functional Safety qm (Quality Management) software
https://github.com/containers/qm
GNU General Public License v2.0
23 stars 26 forks source link

Kvm test #660

Open Yarboa opened 1 week ago

Yarboa commented 1 week ago
Adding KVM tier-0 rpm subpackage testing

KVM tier-0 check if /dev/kvm could be exposed to QM
Another fix to remove qm_mount_bind_kvm in case does not support
nested virtualization
Packit support for nested kvm support added currently for fedora only
Kvm tests should be introduced later

Kvm tests currently run only for fedora, 
Once will be tested under centos-automotive-sig, /dev/kvm will be tested
Yarboa commented 1 week ago

@dougsland caught the following selinux error causing QM restarts on fedora, need to check for c9s

vda4.txt

It is very interesting, in fedora once adding the following file to for exposing /dev/kvm /etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_kvm.conf

# Drop-in configuration for Podman to mount bind /dev/kvm from host to container
#
[containers]
devices = [
    "/dev/kvm:/dev/kvm",
    "/dev/net/tun:/dev/net/tun"
]

@rhatdan any inputs are welcome

dougsland commented 1 week ago

@dougsland caught the following selinux error causing QM restarts on fedora, need to check for c9s

vda4.txt

It is very interesting, in fedora once adding the following file to for exposing /dev/kvm /etc/qm/containers/containers.conf.d/qm_dropin_mount_bind_kvm.conf

# Drop-in configuration for Podman to mount bind /dev/kvm from host to container
#
[containers]
devices = [
  "/dev/kvm:/dev/kvm",
  "/dev/net/tun:/dev/net/tun"
]

Indeed, we are exposing /dev/kvm and also /dev/net/tun which was required during my tests. @Yarboa , It should be automatically by the subpackage. Isn't working ?

For the future as reference:

/dev/net/tun represents a TUN (network tunnel) device in Linux systems. It is used for network tunneling and is a part of the TUN/TAP driver that allows for virtual network kernel interfaces. KVM can use /dev/net/tun when setting up networking for virtual machines (VMs). Specifically, it is utilized when creating a network bridge or using a TAP (network tap) device to provide networking for VMs. (During my tests I noticed this).

@rhatdan any inputs are welcome