Skip to content

Commit 42268b7

Browse files
network-charlesbryceharrington
authored andcommitted
improve grammar on the enable nested virtualisation page
1 parent 162f033 commit 42268b7

File tree

1 file changed

+31
-29
lines changed

1 file changed

+31
-29
lines changed

how-to/virtualisation/enable-nested-virtualisation.md

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
(enable-nested-virtualisation)=
22
# How to enable nested virtualisation
33

4-
> **Disclaimer**:
5-
> Nested virtualisation is enabled by default on Ubuntu. If you are using Ubuntu, it's unlikely that you will need to manually enable the feature. If you check (using the steps below) and discover that nested virtualisation is enabled, then you will not need to do anything further.
4+
```{important}
5+
Nested virtualisation is enabled by default on Ubuntu. If you are using Ubuntu, it's unlikely that you will need to manually enable the feature. If you check (using the steps below) and discover that nested virtualisation is enabled, then you will not need to do anything further.
6+
```
67

78
There may be use cases where you need to enable nested virtualisation so that you can deploy instances inside other instances. The sections below explain how to check if nested virtualisation is enabled/available and how to enable it if that is not the case. Bear in mind that currently nested virtualisation is only supported in Ubuntu on `x86` machine architecture.
89

@@ -35,7 +36,7 @@ If the output is either `1` or `Y` then nested virtualisation is enabled and you
3536

3637
### If the module is not loaded
3738

38-
If the module your host requires is not loaded you can load it using `modprobe` and add the property `nested=1` to enable nested virtualisation as shown below for Intel hosts:
39+
If the module your host requires is not loaded, you can load it using `modprobe` in combination with the property `nested=1` to enable nested virtualisation, as shown below for Intel hosts:
3940

4041
```bash
4142
modprobe kvm-intel nested=1
@@ -47,36 +48,35 @@ Or as follows for AMD hosts:
4748
modprobe kvm-amd nested=1
4849
```
4950

50-
5151
## Enable nested virtualisation
5252

5353
If the above checks indicate that nested virtualisation is not enabled, you can follow the below steps to enable it.
5454

55-
* Create a file in `/etc/modprobe.d` -e.g., `/etc/modprobe.d/kvm.conf`- and add the line `options kvm-intel nested=1` to that file (replace `kvm-intel` with `kvm-amd` for AMD hosts).
55+
* Create a file in `/etc/modprobe.d` -e.g., `/etc/modprobe.d/kvm.conf`- and add the line `options kvm-intel nested=1` to that file (replace `kvm-intel` with `kvm-amd` for AMD hosts).
5656

57-
* Reload the kernel module to apply the changes:
57+
* Reload the kernel module to apply the changes:
5858

59-
```bash
60-
sudo modprobe -r <module>
61-
```
59+
```bash
60+
sudo modprobe -r <module>
61+
```
6262

63-
Example for Intel hosts:
63+
Example for Intel hosts:
6464

65-
```bash
66-
sudo modprobe -r kvm-intel
67-
```
65+
```bash
66+
sudo modprobe -r kvm-intel
67+
```
6868

69-
* You should now be able to see nested virtualisation enabled:
69+
* You should now be able to see nested virtualisation enabled:
7070

71-
Example for Intel hosts:
72-
```bash
73-
$ cat /sys/module/kvm_intel/parameters/nested
74-
Y
75-
```
71+
Example for Intel hosts:
72+
```bash
73+
$ cat /sys/module/kvm_intel/parameters/nested
74+
Y
75+
```
7676

7777
## Check and enable nested virtualisation inside an instance
7878

79-
Once the host is ready to use nested virtualisation it is time to check if the guest instance where the other instance(s) are going to run is able to host these nested VMs.
79+
Once the host is ready to use nested virtualisation, it is time to check if the guest instance can run additional nested VMs inside it.
8080

8181
To determine if an instance can host another instance on top, run the below command within the instance:
8282

@@ -86,16 +86,18 @@ egrep "svm|vmx" /proc/cpuinfo
8686

8787
If any of these are present in the output (depending on whether the host is AMD or Intel respectively), then virtualisation is available in that instance. If this is not the case you will need to edit the instance CPU settings:
8888

89-
* Shut down the instance
90-
* Edit the instance XML definition file executing: `virsh edit <instance>`
91-
* Search the `cpu mode` parameter in and set its value to either `host-model` or `host-passthrough` (details about these modes can be found [here](https://wiki.openstack.org/wiki/LibvirtXMLCPUModel)).
89+
* Shut down the instance
90+
* Edit the instance XML definition file executing: `virsh edit <instance>`
91+
* Search the `cpu mode` parameter in and set its value to either `host-model` or `host-passthrough` (details about these modes can be found [here](https://wiki.openstack.org/wiki/LibvirtXMLCPUModel)).
9292

93-
Sample `cpu mode` parameter in XML with nested virtualisation:
94-
```xml
95-
<cpu mode='host-model' check='partial'/>
96-
```
97-
* Save the modifications and start the instance
93+
Sample `cpu mode` parameter in XML with nested virtualisation:
94+
95+
```xml
96+
<cpu mode='host-model' check='partial'/>
97+
```
98+
99+
* Save the modifications and start the instance
98100

99101
## Limitations of nested virtualisation
100102

101-
Nested virtualisation has some key limitations you'd need to consider. Namely, not all KVM features will be available for instances running nested VMs and actions such as migrating or saving the parent instance will not be possible until the nested instance is stopped.
103+
Nested virtualisation has some key limitations you'd need to consider, namely that not all KVM features will be available for instances running nested VMs, and actions such as migrating or saving the parent instance will not be possible until the nested instance is stopped.

0 commit comments

Comments
 (0)