Closed rthallisey closed 6 years ago
To support both Intel and AMD:
if [ -d /sys/module/kvm_intel -a -d /etc/modprobe.d -a ! -f /etc/modprobe.d/kvm-intel.conf ]; then
echo "options kvm-intel nested=1" > /etc/modprobe.d/kvm-intel.conf
rmmod kvm-intel && modprobe kvm-intel || true
fi
if [ -d /sys/module/kvm_amd -a -d /etc/modprobe.d -a ! -f /etc/modprobe.d/kvm-amd.conf ]; then
echo "options kvm-amd nested=1" > /etc/modprobe.d/kvm-amd.conf
rmmod kvm-amd && modprobe kvm-amd || true
fi
To verify:
cat /sys/module/kvm_intel/parameters/nested
i'll be a bit picky and suggest modprobe -r instead of rmmod
works for me ...
i dont get in which container this code should go
@karmab can you explain further?
@rthallisey sure, you re saying in first comment the following
In order for this to work, the container needs to be a root user and needs to mount in /lib/modules.
and it dont get which container you re talking about:
The kubevirt-apb need to be root and mount /lib/modules.
Switching to Root: https://github.com/ansibleplaybookbundle/kubevirt-apb/pull/19/files#diff-3254677a7917c6c01f55212f86c57fbfL23
@rthallisey where is this req coming forom? is it still relevant?
closing for now.
Add a nested_virt param to the kubevirt-apb. This is going to require running:
In order for this to work, the container needs to be a root user and needs to mount in
/lib/modules
.