tech:notes_nested_virtualization
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédente | |||
| tech:notes_nested_virtualization [2025/05/15 12:06] – Jean-Baptiste | tech:notes_nested_virtualization [2025/05/15 12:10] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Notes nested virtualization | ||
| + | |||
| + | ## prereq | ||
| + | |||
| + | Source : https:// | ||
| + | |||
| + | 1. Make sure that the Intel-VT-x/ | ||
| + | For Intel: | ||
| + | |||
| + | ~~~bash | ||
| + | grep vmx / | ||
| + | ~~~ | ||
| + | |||
| + | For AMD: | ||
| + | |||
| + | ~~~bash | ||
| + | grep svm / | ||
| + | ~~~ | ||
| + | |||
| + | 2. Check to see if / | ||
| + | and reboot: | ||
| + | |||
| + | ~~~bash | ||
| + | options kvm_intel nested=1 | ||
| + | ~~~ | ||
| + | |||
| + | 3. Go into the graphical virt-manager, | ||
| + | |||
| + | 4. Check the box "Copy host CPU configuration" | ||
| + | |||
| + | 5. Restart the virtual machine, open a terminal in it and check for the extensions: | ||
| + | |||
| + | ~~~bash | ||
| + | grep vmx / | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ----------------- | ||
| + | |||
| + | Source : https:// | ||
| + | |||
| + | |||
| + | |||
| + | Checking if nested virtualization is supported | ||
| + | ~~~ | ||
| + | cat / | ||
| + | Y | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## To enable nested virtualization for Intel processors: | ||
| + | |||
| + | Shut down all running VMs and unload the kvm_probe module: | ||
| + | ~~~bash | ||
| + | sudo modprobe -r kvm_intel | ||
| + | ~~~ | ||
| + | |||
| + | Activate the nesting feature: | ||
| + | ~~~bash | ||
| + | sudo modprobe kvm_intel nested=1 | ||
| + | ~~~ | ||
| + | |||
| + | Nested virtualization is enabled until the host is rebooted. To enable it permanently, | ||
| + | |||
| + | ~~~bash | ||
| + | options kvm_intel nested=1 | ||
| + | ~~~ | ||
| + | |||
| + | ## To enable nested virtualization for AMD processors: | ||
| + | |||
| + | Shut down all running VMs and unload the kvm_amd module: | ||
| + | ~~~bash | ||
| + | sudo modprobe -r kvm_amd | ||
| + | ~~~ | ||
| + | |||
| + | Activate the nesting feature: | ||
| + | ~~~bash | ||
| + | sudo modprobe kvm_amd nested=1 | ||
| + | ~~~ | ||
| + | |||
| + | Nested virtualization is enabled until the host is rebooted. To enable it permanently, | ||
| + | |||
| + | ~~~bash | ||
| + | options kvm_amd nested=1 | ||
| + | ~~~ | ||
| + | |||
| + | ## Testing nested virtualization | ||
| + | |||
| + | ~~~bash | ||
| + | virt-host-validate | ||
| + | ~~~ | ||
| + | |||
| + | |||
