Setting up Ubuntu Server 20.04.1 as a KVM host

LPAR mode KVM guest

A KVM host has hardware and user space requirements.

Hardware

The real or virtual hardware must provide the Start Interpretive Execution (SIE) feature.

User space

You must install the packages for QEMU and libvirt. For example, use apt:
$ apt install qemu-kvm libvirt-daemon-system libvirt-clients

Module parameters

Configure the KVM host support with module parameters.

kvm module parameter syntax

Read syntax diagramSkip visual syntax diagrammodprobekvmnested=0hpage=0nested=1hpage=1
nested=
If set to 1, passes the SIE capability on to its guests. Thus, the guests can be hosts for higher-level guests.

Nested KVM hosts are intended for test environments and not for production systems.

hpage=
If set to 1, supports guest-configurations with huge-page memory backing.

Enough 1 MB huge pages must be set up to satisfy the needs of the guests. For details about setting up huge pages, see Huge-page support.

Consider making this setting persistent, for example, through a modprobe configuration file or by specifying kvm.hpage=1 on the kernel parameter line.

Nested hosts cannot back their guests with huge pages. You cannot set both nested= and hpage= to 1.