Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a nested_virt option #17

Closed
rthallisey opened this issue Mar 1, 2018 · 9 comments
Closed

Add a nested_virt option #17

rthallisey opened this issue Mar 1, 2018 · 9 comments

Comments

@rthallisey
Copy link
Contributor

Add a nested_virt param to the kubevirt-apb. This is going to require running:

echo "options kvm-intel nested=1" > /etc/modprobe.d/kvm-intel.conf
rmmod kvm-intel && modprobe kvm-intel || true
cat /sys/module/kvm_intel/parameters/nested

In order for this to work, the container needs to be a root user and needs to mount in /lib/modules.

@mareklibra
Copy link
Contributor

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

@karmab
Copy link
Contributor

karmab commented Mar 2, 2018

i'll be a bit picky and suggest modprobe -r instead of rmmod

@mareklibra
Copy link
Contributor

works for me ...

@karmab
Copy link
Contributor

karmab commented Mar 13, 2018

i dont get in which container this code should go

@rthallisey
Copy link
Contributor Author

@karmab can you explain further?

@karmab
Copy link
Contributor

karmab commented Mar 13, 2018

@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 ones
  • the apb one

@rthallisey
Copy link
Contributor Author

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

@nellyc
Copy link

nellyc commented Jun 26, 2018

@rthallisey where is this req coming forom? is it still relevant?

@rthallisey
Copy link
Contributor Author

closing for now.

mareklibra pushed a commit to mareklibra/kubevirt-apb that referenced this issue Nov 14, 2018
…kubernetes

deploy-kubernetes: removed redundant vars_files keyword
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants