ltstudiooo - Fotolia
SUSE Linux Enterprise Server is one of the enterprise Linux distributions that still offers a fully supported Xen stack for virtualization. Let's take a look at how to get started with it and, more importantly, how to effectively manage it once you've installed Xen VMs.
Obviously, you need sufficient hardware capacity to use SUSE Linux Enterprise Server (SLES) as a virtualization platform. This means that you need a large amount of RAM to run Xen VMs, sufficient disk space and, if possible, virtualization extension on the CPU.
While KVM requires your CPU to have the virtualization extensions available, this isn't the case for Xen. Xen offers support for two types of virtualization: paravirtualization and full virtualization. In paravirtualization, the guest OS uses a modified OS to talk directly to hardware drivers that the driver domain Dom0 provides. This mode requires no specific hardware support on the CPU. In full virtualization, you can use the virtualized OS; full virtualization also requires CPU-level virtualization extensions. Luckily, all server grade hardware offers virtualization extensions, so that shouldn't be a problem.
Xen VM Host Server installation pattern
SLES makes a clear distinction between a regular OS installation and an installation as a virtualization platform. The Xen Virtual Machine Host Server performs a minimal installation with just those packages required to install and run VMs and no GUI. Notice that this installation pattern uses a total package size of 1.6 GB anyway, so it might be more efficient than a regular SLES installation, but it's not yet as far down-tuned as VMware's ESXi servers. It's also interesting to see that SUSE uses Btrfs as the underlying file system for Xen VMs and thus sees no performance reasons to use another file system, such as XFS.
DIY VM management
While SLES does offer a specific installation pattern to make a server a Xen host, it's mainly a DYI configuration, where the installation is like any other Linux installation. There is, for instance, no notion of a storage pool easily connected to external storage; the administrator who uses all default choices ends up with locally stored VM images.
If you've installed graphical packages -- which add almost another gigabyte of data to your server's disk -- some utilities are available in Yet another Setup Tool to work with the VMs. These are the standard VM manager and a link to virt-install, which is used to create VMs for Xen, as well as KVM.
The reality of VM management on SLES is the command line. From the command line, you can use the virt-install utility to interface libvirtd, the generic interface that both Xen and KVM use to interact with VMs. Using this interface makes sense, as it allows the administrator to approach VMs in a similar way, no matter if he uses Xen or KVM for virtualization. To install a VM using the libvirtd interface, use the following command:
virt-install --connect xen:// --virt-type xen --name server1 --memory 1024 --disk size=10 --cdrom /dev/cdrom --graphics vnc --sv-variant sles12
This command installs a SLES12 guest via an installation disk that's available through /dev/cdrom, a disk size of 10 GB and 1 GB of available memory. Once this VM is installed, you can manage it with the virsh command-line client, which interfaces libvirtd, too.
An older xm management utility is also still available, but deprecated in current SLES. The older utility interfaces a xend process for VM management, but the selection of choice is to manage VMs through libvirtd, as this provides a universal interface that can be used with other virtualization platforms as well.
SUSE VM driver pack for Xen
Specifically for working in a Xen environment, SUSE offers a VM driver pack. This is a set of additional drivers you can install in VMs that run an unmodified OS in full virtualization mode. Installing these drivers allows the disk and network drivers of the VM to use paravirtualization, where the core OS doesn't have to be modified, and thus drastically increases the efficiency of these VMs.
No centralized management, no problem
It's certainly possible to run Xen VMs on top of SLES, but it lacks centralized management facilities. The result is that it will never really compete with VMware vSphere, but that doesn't mean that it's worthless. Customers around the world use Xen on SUSE, often in environments that have been highly automated through shell scripts or configuration management utilities like Ansible. If you combine these with Pacemaker high availability, it's possible to run Xen VMs in a redundant way in a SLES-based data center.
Understand PowerShell for Linux
Boost application performance with SUSE Linux Enterprise Real Time
Use these tools for Linux system management