SUSE Linux Enterprise Server for z Systems and LinuxONE 12 SP2

Migrating from KVM for IBM z Systems to KVM integrated with SUSE Linux Enterprise Server

On March 7, 2017, IBM announced the end of support for their product KVM for IBM z Systems. To learn more, read the official IBM Withdrawal Announcement at https://www-01.ibm.com/common/ssi/rep_ca/8/897/ENUS917-048/ENUS917-048.PDF. Preceding the IBM announcement on March 1, 2017, SUSE announced full support for KVM delivered with SUSE Linux Enterprise Server for z Systems and LinuxONE 12 SP2 and newer versions. You can find more details in the article at https://www.suse.com/communities/blog/virtualization-suse-kvm-support-ibm-z-systems-linuxone/.

Customers that have deployed or are testing KVM for IBM z Systems may have been using the IBM Redbook Getting Started with KVM for IBM z Systems at http://www.redbooks.ibm.com/abstracts/sg248332.html?Open&pdfbookmark . This SUSE Best Practices document will also cover the most important details about how to migrate a virtual machine from KVM for IBM z Systems to KVM delivered with SUSE Linux Enterprise Server.

Author: Mike Friesenegger, Technology Strategist - Alliances and Integrated Systems, SUSE
Publication Date: March 20, 2017

1 Installing SUSE Linux Enterprise Server for z Systems and LinuxONE as KVM Host

Like KVM for IBM z Systems, KVM integrated with SUSE Linux Enterprise Server for z Systems and LinuxONE is supported when installed into an LPAR. The section Installation on IBM z Systems of the SUSE Linux Enterprise Server Deployment Guide at https://www.suse.com/documentation/sles-12/book_sle_deployment/data/cha_zseries.html provides information regarding supported hardware and memory requirements for installing into an LPAR. The section Overiew of an LPAR Installation at https://www.suse.com/documentation/sles-12/book_sle_deployment/data/sec_zseries_prep.html#sec_prep_inst_types reviews the preparation and initial steps in starting the SUSE Linux Enterprise Server Installation System.

A suggested partitioning layout includes separating the storage of the KVM disk images from the operating system. Using the Btrfs file system for the operating system enables rollback capabilities when patching the system. The default location for the KVM disk images is /var/lib/libvirt/images/. It is recommended to use Logical Volume Manager with the XFS file system for KVM disk images.

Enabling the firewall is not a requirement but a security decision for each organization. Discusse with your organization's security group if to enable the firewall.

For the Software Selection in the installer, use the list below for the minimum and suggested additional patterns to be installed.

Minimum Patterns:

  • Base System

  • Minimal System (Appliances)

  • Help and Support Documentation

  • KVM Virtualization Host and tools

Suggested additional Patterns:

  • GNOME Desktop Environment & X Window System (needed for managing virtual machines using a GUI)

Make sure to register and fully patch the KVM host either during the initial installation or after the installation is complete.

2 Managing KVM Instances

It is recommended to use the SUSE-provided utilities that manage virtual machines using the libvirt API. The section Managing Virtual Machines with libvirt of the Virtualization Guide at https://www.suse.com/documentation/sles-12/book_virt/data/part_virt_libvirt.html provides information about using both command line and GUI based tools. It is strongly recommended to use the previous link because it contains detailed information about VM installation and management as well as storage and network management for VMs. The sections below provide additional information about accessing a particular tool.

2.1 Using the Command Line to Create and Manage Instances

virsh and virt-install are the command line utilities to manage virtual machines. These utilities are installed as part of the KVM virtualization host and tools pattern. The section Virtualization Console Tools at https://www.suse.com/documentation/sles-12/book_virt/data/sec_tools_intro_console.html provides an introdution to these utilites.

The virsh and virsh-installtools can be used both from an SSH session, or in a terminal/console session when working via Virtual Network Computing (VNC).

Connect via SSH to log in to the KVM host to use virsh and virt-install.

2.2 Managing Virtual Machines Using a GUI

Virtual Machine Manager (virt-manager) is the GUI tool used to manage virtual machines. This utility is installed as part of the KVM virtualization host and tools pattern. The section Virtualization GUI Tools of the Virtualization Guide at https://www.suse.com/documentation/sles-12/book_virt/data/sec_tools_intro_gui.html provides an introduction.

To access the virt-manager GUI, use X11 forwarding via SSH or vncviewer. X11 forwarding is a good option if the connection (local or metropolitan area network) speed between the client and the KVM host has relatively low latency. Use vncviewer if you find that X11 redirection is too slow. Perform the following actions to enable access to virt-manager.

  • Both X11 forwarding via SSH and vncviewer

    • Install the suggested additional patterns listed above using YaST or Zypper

  • For X11 forwarding via SSH

    • From a client terminal, type ssh -X <KVM hostname>

  • For vncviewer access to the KVM host

    • Start YaST and go into Network Services | Remote Administration (VNC)

    • Select Open Port in Firewall if the firewall was enabled during the installation

    • Select Allow Remote Administration Without Session Management and click OK

    • From a client terminal, type vncviewer <KVM hostname:1>

    • Log in to the KVM host in the window opened by the previous command

    • Click Applications | Utilites | XTerm

  • Within the X11 forwarding via SSH client terminal and XTerm window in vncviewer window

    • Type virt-manager

3 Moving an Existing KVM for IBM z Systems Virtual Machine to KVM in SUSE Linux Enterprise Server

The following section explains how to move a KVM for IBM z Systems virtual machine to KVM integrated with SUSE Linux Enterprise Server. A VM was created on KVM for IBM z Systems following the section 3.7 of the IBM Redbook Getting Started with KVM for IBM z Systems at http://www.redbooks.ibm.com/redbooks/pdfs/sg248332.pdf. This procedure assumes that the KVM for IBM z Systems VM has a virtual disk file and is attached to a virtual network defined using libvirt. Below is the XML definition of the VM and virtual network based on the example in the IBM Redbook.

VM Defnition

<domain type='kvm'>
  <name>s12s2</name>
  <uuid>97968b48-295e-465a-9265-2cc89f4fb9cd</uuid>
  <description>IBM KVM to SLES KVM</description>
  <memory unit='KiB'>524288</memory>
  <currentMemory unit='KiB'>524288</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='s390x' machine='s390-ccw-kvmibm-1.1.1'>hvm</type>
    <boot dev='hd'/>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>preserve</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-s390x</emulator>
      <disk type='file' device='disk'>
        <driver name='qemu' type='qcow2'/>
        <source file='/var/lib/libvirt/images/s12s2.img'/>
        <target dev='vda' bus='virtio'/>
        <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/>
      </disk>
      <interface type='bridge'>
        <mac address='52:54:00:58:35:20'/>
        <source bridge='virbr0'/>
        <model type='virtio'/>
        <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
      </interface>
      <console type='pty'>
        <target type='sclp' port='0'/>
      </console>
      <memballoon model='virtio'>
        <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
      </memballoon>
   </devices>
</domain>

Virtual Network Definition

<network>
  <name>default</name>
  <uuid>4e4ab47a-3889-4eba-81d0-dda245a44091</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
   </forward>
   <bridge name='virbr0' stp='on' delay='0'/>
   <mac address='52:54:00:c0:47:bc'/>
   <ip address='192.168.122.1' netmask='255.255.255.0'>
     <dhcp>
       <range start='192.168.122.2' end='192.168.122.254'/>
     </dhcp>
   </ip>
</network>
        

The VM and network definition for a customer deployment may be considerably different but the basic procedure to move the VM to KVM in SUSE Linux Enterprise Server will be the same, as outlined below.

  1. Connect via SSH to the KVM for IBM z Systems host as root or as the user used to define VMs

  2. Find a VM configured on the KVM for IBM z Systems host that you want to move to a SUSE Linux Enterprise Server KVM host

    1. List all defined VMs with virsh list --all and choose the VM to migrate

    2. Dump the XML definition of the VM to be migrated via the command 'virsh dumpxml <vmname> > ~/<vmname>.xml' (where <vmname> is the name of a VM to move)

    3. View the content of the XML file via the command less ~/<vmname>.xml and make note of the following information

      • Location of the VM disk file(s) which is <source file= in the above VM definition

      • The name of the network bridge(s) which is <source bridge= in the above VM definition

  3. Determine the virtual network(s) associated to the VM

    1. List all defined network bridges with virsh net-list --all

    2. Repeat the command virsh net-dumpxml <network name> > ~/net-<network name>.xmlfor each network bridge to dump the XML definition for all of the network bridges

    3. Repeat the command grep -H <network bridge name from the information gathered before> ~/net-*.xml for each network bridge to determine the XML file to migrate

    4. Make note of the filename(s) from the grep output above

  4. Copy the VM disk file(s), the VM xml file and the network xml file(s) to the SUSE Linux Enterprise Server KVM host

    1. Enter the command rsync -S --progress <VM disk file> <VM xml file> <network xml> <SLES KVM Host>:/var/lib/libvirt/images

  5. Connect via SSH to the SUSE Linux Enterprise Server KVM host as root or as the user used to define VMs

  6. Remove the bridge if it already exists on the KVM host

    1. Type virsh net-list --all

    2. Type virsh net-undefine <network name> when the network name is the same as a network name on the KVM for IBM z Systems host

  7. Add the bridge from KVM for IBM z Systems

    1. Define the network name(s) with virsh net-define <network xml file(s)>

    2. Start the network name(s) with virsh net-start <network xml file(s)>

    3. Autostart the network name(s) on system restart with virsh net-autostart <network xml file(s)>

  8. Edit the VM xml file by changing

    <type arch='s390x' machine='s390-ccw-kvmibm-1.1.1'>hvm</type>

    to

    <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
  9. Define the VM in SUSE Linux Enterprise Server KVM

    1. Use the command virsh define <VM xml file>

  10. Start and verify the newly migrated VM is running

    1. Start the VM with virsh start <VM name>

    2. Verify that the VM is running with virsh list

    3. Connect via SSH to the VM to verify that networking is working

4 Troubleshooting

For basic troubleshooting information review the section Troubleshooting of the SUSE Linux Enterprise Server Administration guide at https://www.suse.com/documentation/sles-12/book_sle_admin/data/part_trouble.html . In case of specific issues, opening a support request may be necessary. To receive support, you need an appropriate subscription with SUSE; for more information, see http://www.suse.com/products/server/services-and-support/ .

4.1 Common Problems and Their Solutions

If there is a solution you want to see added to this section, use the comment field at the top of the HTML version of this document for your feedback. This section will be updated with suggested solutions over time. Please come back and check often.

5 Legal Notice

Copyright ©2006– 2017 SUSE LLC and contributors. All rights reserved.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled GNU Free Documentation License.

SUSE, the SUSE logo and YaST are registered trademarks of SUSE LLC in the United States and other countries. For SUSE trademarks, see http://www.suse.com/company/legal/.

Linux is a registered trademark of Linus Torvalds. All other names or trademarks mentioned in this document may be trademarks or registered trademarks of their respective owners.

All information found in this document has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its affiliates, the authors, nor the translators shall be held liable for possible errors or the consequences thereof.

Print this page