SUSE Enterprise Server 12 SP4 to KVM Migration Guide

SUSE Linux Enterprise Server 12 SP4

As the KVM solution is becoming more and more popular among server administrators, many of them need a path to migrate their existing Xen based environments to KVM. As of now, there are no mature tools to automatically convert Xen VMs to KVM. There is, however, a technical solution that helps convert Xen virtual machines to KVM. The following information and procedures help you to perform such a migration.

Publication Date: September 24, 2021

Contents

1 Migration to KVM Using virt-v2v 2

2 Xen to KVM Manual Migration 9

3 For More Information 18

4 Documentation Updates 18

5 Legal Notice 18

6 GNU Free Documentation License 18

1 SLES 12 SP4 Important: Migration Procedure Not Supported The migration procedure described in this document is not fully supported by SUSE. We provide it as a guidance only.

1 Migration to KVM Using virt-v2v

This section contains information to help you import virtual machines from foreign (such as Xen) to KVM managed by .

Tip: Windows Guests This section is focused on converting Linux guests. Converting guests using virt-v2v is the same as converting Linux guests, except in regards to handling the Driver Pack (VMDP). Additional details on converting Windows guests with the VMDP can be found in the separate Virtual Machine Driver Pack documentation at https://www.suse.com/documentation/sle-vmdp-22/ .

1.1 Introduction to virt-v2v virt-v2v is a command line tool to convert VM Guests from a foreign to run on KVM managed by libvirt . It enables paravirtualized virtio drivers in the converted virtual machine if possible. A list of supported operating systems and hypervisors follows:

SUPPORTED GUEST OPERATING SYSTEMS

SUSE Linux Enterprise Server

openSUSE

RedHat Enterprise Linux

Fedora

Microsoft Windows Server 2003 and 2008

SUPPORTED SOURCE HYPERVISOR

Xen

2 Migration to KVM Using virt-v2v SLES 12 SP4 SUPPORTED TARGET HYPERVISOR

KVM (managed by libvirt )

1.2 Installing virt-v2v

The installation of virt-v2v is simple:

sudo zypper install virt-v2v

Remember that virt-v2v requires root privileges, so you need to run it either as root , or via sudo .

1.3 Preparing the Virtual Machine

Note: Conditions for Skipping This Step If running virt-v2v on SLES 12 SP1 or before, this step can be safely skipped. This step can also be ignored if the virtual machine is fully virtualized or if it runs on SLES 12 SP2 or later.

The Xen virtual machine must have default kernel installed. To ensure this, run zypper in kernel-default on the virtual machine.

1.4 Converting Virtual Machines to Run under KVM Managed by libvirt virt-v2v converts virtual machines from the Xen hypervisor to run under KVM managed by libvirt . To learn more about libvirt and virsh , see Book “Virtualization Guide”. Additionally, all virt-v2v command line options are explained in the virt-v2v manual page ( man 1 virt-v2v ). Before converting a virtual machine, make sure to complete the following steps:

PROCEDURE 1: PREPARING THE ENVIRONMENT FOR THE CONVERSION

1. Create a new local storage pool.

3 Installing virt-v2v SLES 12 SP4 virt-v2v copies the storage of the source virtual machine to a local storage pool managed by libvirt (the original remains unchanged). You can create the pool either with , or virsh . For more information, see Book “Virtualization Guide”, Chapter 12 “Managing Storage”, Section 12.1 “Managing Storage with Virtual Machine Manager” and Book “Virtualization Guide”, Chapter 12 “Managing Storage”, Section 12.2 “Managing Storage with virsh”.

2. Prepare the local network interface. Check that the converted virtual machine can use a local network interface on the VM Host Server. It is usually a network bridge. If it is not dened yet, create it with YaST System Network Settings Add Bridge.

Note: Mappings of Network Devices Network devices on the source Xen host can be mapped during the conversion process to corresponding network devices on the KVM target host. For example, the Xen bridge br0 can be mapped to the KVM network default. Sample mappings can be found in /etc/virt-v2v.conf . To enable these mappings, modify the XML rule as necessary and ensure the section is not commented out with