qm icon indicating copy to clipboard operation
qm copied to clipboard

FFI: modprobe - test interference from the QM partition to host

Open dougsland opened this issue 10 months ago • 3 comments

Here the test scenario using CentOS Automotive VM via qemu:

git clone https://gitlab.com/CentOS/automotive/sample-images
cd sample-images/osbuild-manifests
sudo make cs9-qemu-qmcontainer-regular.x86_64.qcow2
./runvm --nographics ./cs9-qemu-qmcontainer-regular.x86_64.qcow2

Please note. =============. default values can be changed via**: osbuild-manifests/include/defaults.ipp.yml** and rebuild.
default user: root. default pass: password. exit vm CTRL a c (and type: quit) will quit from qemu emulator.

The test
===========. As soon you are logged into the VM and inside the QM partition it won't be possible to access /lib/modules to load any module via modprobe, please see steps below.

Automotive Stream Distribution 9
Kernel 5.14.0-438.391.el9iv.x86_64 on an x86_64

localhost login: [    8.345137] overlayfs: idmapped layers are currently not supported
[    8.923922] Warning: Unmaintained driver is detected: nft_compat
root
Password:
Last login: Sat Apr 20 20:01:50 on ttyS0
[root@localhost ~]# podman ps
CONTAINER ID  IMAGE       COMMAND     CREATED         STATUS         PORTS       NAMES
23b6f64607b5              /sbin/init  30 seconds ago  Up 30 seconds              qm
[root@localhost ~]# podman exec -it qm bash
bash-5.1# ls /lib/modules
bash-5.1# modprobe ext4
modprobe: FATAL: Module ext4 not found in directory /lib/modules/5.14.0-438.391.el9iv.x86_64
bash-5.1# ls /lib/modules/5.14.0-438.391.el9iv.x86_64
ls: cannot access '/lib/modules/5.14.0-438.391.el9iv.x86_64': No such file or directory
bash-5.1#

dougsland avatar Apr 20 '24 20:04 dougsland

cc @pbrilla-rh

dougsland avatar Apr 20 '24 20:04 dougsland

please integrate with: https://gitlab.com/CentOS/automotive/container-images/ffi-tools

dougsland avatar Apr 20 '24 21:04 dougsland

Implemented by MR: https://github.com/containers/qm/pull/440

pbrilla-rh avatar May 23 '24 11:05 pbrilla-rh