Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
Applies to SUSE Linux Enterprise Server 15

6 Installation of Virtualization Components Edit source

There are multiple options for installing virtualization environments. You may install minimum KVM or Xen environments, install LXC, add the libvirt virtual machine management tools, and the graphical Virtual Machine Manager.

None of the virtualization tools are installed on your system by default. They will be automatically installed when configuring the hypervisor with the YaST module Virtualization › Install Hypervisor and Tools. In case this module is not available in YaST, install the package yast2-vm.

6.1 Installing KVM and Xen Edit source

These are the steps to install KVM and Xen with YaST:

  1. Start YaST and navigate to Software › Software Management › View › Patterns. Click the appropriate checkbox to install XEN Virtualization Host and tools, KVM Virtualization Host and tools, or both. (Note than KVM will not run when you boot to the Xen kernel, so you cannot run both at the same time.)

    Package Selection
    Figure 6.1: Package Selection
  2. If you accept the default package selection you will install only a minimal virtualization environment. You may also install the libvirt virtual machine management stack (see the packages list in the right pane), and the graphical Virtual Machine Manager packages for a nice graphical interface. Install the YaST virtualization management module with the yast2-vm package.

  3. To enable normal networking for the VM Guest, using a network bridge is recommended. YaST offers to automatically configure a bridge on the VM Host Server. Agree to do so by choosing Yes, otherwise choose No.

  4. After the setup is finished, you can start setting up VM Guests. Rebooting the VM Host Server is not required.

Tip
Tip: Default Boot Xen Kernel

You may change the default boot kernel with YaST and make the Xen-enabled kernel the default. For more information about changing the default kernel, see Section 14.3, “Configuring the Boot Loader with YaST”. Again, note that KVM does not run on the Xen kernel, so you cannot run both at the same time.

6.2 Installing Containers Edit source

To install containers with YaST proceed as follows:

  1. Install the yast2-vm package, then restart YaST. The navigate to the virtualization module at Virtualization › Install Hypervisor and Tools.

  2. Select libvirt lxc daemon and confirm with Accept.

6.3 Patterns Edit source

It is possible using Zypper and patterns to install virtualization packages. Run the command zypper in -t pattern PATTERN. Available patterns are:

KVM
  • kvm_server: sets up the KVM VM Host Server with QEMU tools for management

  • kvm_tools: installs the libvirt tools for managing and monitoring VM Guests

Xen
  • xen_server: sets up the Xen VM Host Server with Xen tools for management

  • xen_tools: installs the libvirt tools for managing and monitoring VM Guests

Containers

There is no pattern for containers; install the libvirt-daemon-lxc package.

6.4 Installing UEFI Support Edit source

Note
Note

KVM guests support secure boot by using the OVMF firmware. Xen HVM guests support booting from the OVMF firmware as well, but they do not support secure boot.

UEFI support is provided by OVMF (Open Virtual Machine Firmware). To enable UEFI boot, first install the qemu-ovmf-x86_64 or qemu-uefi-aarch64 package depending on the architecture of the guest.

libvirt is configured to use /usr/share/qemu/ovmf-x86_64-ms-4m-code.bin and /usr/share/qemu/ovmf-x86_64-ms-4m-vars.bin as default UEFI firmware and VARS images. For Arm the defaults are /usr/share/qemu/aavmf-aarch64-code.bin and /usr/share/qemu/aavmf-aarch64-vars.bin.

The packages contain the following files:

root # rpm -ql qemu-ovmf-x86_64
/usr/share/qemu/ovmf-x86_64-ms-code.bin
/usr/share/qemu/ovmf-x86_64-ms-vars.bin
/usr/share/qemu/ovmf-x86_64-ms.bin
/usr/share/qemu/ovmf-x86_64-opensuse-code.bin
/usr/share/qemu/ovmf-x86_64-opensuse-vars.bin
/usr/share/qemu/ovmf-x86_64-opensuse.bin
/usr/share/qemu/ovmf-x86_64-suse-code.bin
/usr/share/qemu/ovmf-x86_64-suse-vars.bin
/usr/share/qemu/ovmf-x86_64-suse.bin
/usr/share/qemu/ovmf-x86_64-code.bin
/usr/share/qemu/ovmf-x86_64-vars.bin
/usr/share/qemu/ovmf-x86_64.bin

The *-code.bin files are the UEFI firmwares. The *-vars.bin files are corresponding variable store images that can be used as a template for a per-VM non-volatile store. libvirt copies the specified vars template to a per-VM path under /var/lib/libvirt/qemu/nvram/ when first creating the VM. Files without code or vars in the name can be used as a single UEFI image. They are not as useful since no UEFI variables persist across power cycles of the VM.

The *-ms*.bin files contain Microsoft keys as found on real hardware. Therefore, they are configured as the default in libvirt. Likewise, the *-suse*.bin files contain preinstalled SUSE and openSUSE keys. There is also a set of files with no preinstalled keys.

For details, see Using UEFI and Secure Boot and http://www.linux-kvm.org/downloads/lersek/ovmf-whitepaper-c770f8c.txt.

Print this page