Previous article: an introduction to XenServer

In the previous issue we have introduced the XenServer hypervisor and talked about its history, from the origin of the project up to now, then we’ve described its structure and operating mode. In this new article we’ll take a closer look at how to install and use it. The ISO image is available at this address, where you can also access to Software Development Kits, patches and documentation.

Like other hypervisors, there’s an HCL list with supported hardware, but for a testing purpose you can install Xen onto a whitebox with non-officially supported hardware: take care when choosing chipset and network cards (Intel IHC and Realtek NICs are to be preferred). Once the hardware and the ISO are ready, create a bootable USB drive (using free tools like UnetBootin or Rufus) and start the installation by selecting boot from such drive.

1 Select XenServer 7 Installation Source

The first screens of the procedure closely resemble the ones of CentOS, on which Xen is developed: during this phase you can select keyboard layout, accept EULA, add additional drivers and select the installation disk. You are also asked a root password, which NIC to use for management and IP configuration (static, dynamic, etc..). Once the installation is done, reboot the host and you will be presented with a summary of all settings that you can change; you could also launch a shell and execute commands.

2 XenServer 7 Configuration Console

As described in the previous article, Xen can be totally managed from the command line from the host, but you can also download and run on a computer on the same network the Windows XenCenter graphic client to offer a better operating comfort.

A glance at the graphical interface
Once the management client is installed, the first step is to add the host to manage: either select the Add voice from the Server menu, or use the Home icon. You will be asked for access credentials and IP address of the host. Then you can browse amongst tabs and see parameters about memory, network and storage, or add the host to an Active Directory domain. In the left lower part there’s the notification area, where the system warns in case of available updates or certain events. After the first installation it’s highly suggested to check and install any available update.

3 xencenter security updates

Some updates require a reboot, which is automatically done by the system only in case of necessity. Yet you should stop any running VM in order to avoid system interruptions; in a multi-node configuration you can temporarily migrate them on another host. An interesting feature is upgrading a pool of XenServer hosts from version 6.x to 7 directly from the graphical interface (Tools -> Rolling Pool Upgrade)

Network and Storage
Storage and networking are two fundamental aspects of any virtual infrastructure. Regarding networks, XenServer offers two main typologies: Internal network and External network. The former are completely virtual, totally managed by the hypervisor and allows VMs to communicate among them without an access from/to the external world. The latter are bridges that allows to associate physical ports on the host (Physical InterFace) to network ports of VMs (Virtual InterFace). If using multiple NICs on the server, you can also create a Bond (or several Bonds), that is a logical interface that groups different NICs in order to provide better performances and fault tolerance. Xen also supports VLAN and uses Open Virtual Switch (OVS) to manage a bridge distributed on hosts within the same pool.

4 xencenter inizio

In XenServer, storage is organized in Storage Repositories (SR). Each SR is a logical container that can be composed by one or more remote LUNs (fibre/FCoE SAN or iSCSI) or an NFS share. According to the terminology used in Xen, a Storage Repository is composed by several Physical Block Devices (PDF) and everything is managed with LVM, so an SR can be expanded with additional storage space. In order to allow a live migration of VMs with their related storage (the same of Storage vMotion in VMware vSphere), the SR must be shared among the hosts of the cluster. Otherwise the migration will still be possible, but it is a copy from a disk to another with a consequent negative impact on performances.

As an additional storage space for less important data (like ISOs or temporarily snapshots during a backup), you can also create a SR using local disks or an NFS/SMB share. This operation cannot be done using the graphical interface, however it’s trivial from the command line. When creating it, a virtual machine will be assigned with a portion of the SR to create the virtual disk (VDB, Virtual Block Device) or dedicated logical volume. You can also choose the classic file in VHD format.

Within the interface you can also attach a disk (LUN iSCSI or unit belonging to another guest), in read only mode too, to guest VMs, or use the PCI-Passthrough technology to assign an internal PCI physical device. There are some interesting technologies in development, like the RawHBA driver which allows a direct mapping between a fibre channel LUN and a virtual disk, or the GlusterFS/Ceph backend that implements a kind of virtual SAN sharing local disks, with a result similar to the vSAN architecture by VMware.

The first virtual machine
Once the environment is ready and the basic features are learnt, you can create your first virtual machine: click on New VM in the upper bar of the interface and select a template from a list of available ones. Next step is to assign a name to the machine and a small optional description, then decide the installation mode. You can choose a repository with the correct ISO to use, or select an installation from the Internet (in our test we specified http:/ftp.debian.org/debian in the Install from URL field). In our tests we also installed a CentOS 6 OS using the URL http://mirror.centos.org/centos/6/os/i386/

5 xencenter installazione centos1

The following parameters are about how much CPU and memory resources to reserve for the vm, creation of the disk and virtual network interface. After starting the operation you can control its progress state waiting for ts conclusion. Installing a Windows VM is similar: let the support be accessible and boot the machine like it were a common PC, then follow the classic steps of the Microsoft installation.

We have used this guest to test the snapshot feature: select the tab of the same name, then Take Snapshot and in a few seconds you will obtain a saving of the state of the virtual machine. Just like every operation, this one too has a command line equivalent command: in practice you can leverage the xe vm-snapshot command with some parameters as a basis for backup scripts. Here’s a few practical examples.

xe vm-snapshot uuid=8ac95696-94f3-83c1-bc89-8bb2603f832b new-name-label=testvmsnapshot
xe vm-export vm=b15c0531-88a5-98a4-e484-01bc89131561 filename=vm-backup.xva

As with other virtualization products, you can use this snapshot as a “model” to create a template or a new virtual machine.

xe template-param-set is-a-template=false ha-always-run=false uuid=b15c0531-88a5-98a4-e484-01bc89131561

Why should I use Xen?
XenServer is a good compromise between performances, stability and costs: you can manage an extended virtual machines farm with a limited investment in terms of hardware. Also, its architecture is open, modular, automatable and the SDK provides many tools for an advanced automation. It’s a choice that perfectly suits the needs of providing users with a virtualized desktops infrastructure where you can leverage the integration with other products by Citrix.

Xen has a few limits, among which is the low degree of integration with different platforms and the lack of certain features that are available with competing products, like RAM and CPU hot-add (ie expanding those resources of VMs without incurring in a downtime).
In general if the IT infrastructure doesn’t need those features and you want a virtualization product that is solid, stable, highly-performing and with a great company behind, then Xen is a choice to ponder upon for sure.

About the Author

Andrea Manzini

Vive e lavora a Verona nel settore IT; nel 1999 è tra i fondatori del primo LUG (Linux User Group).
Autore di articoli pubblicati su riviste del settore come Linux&C, ha moderato la comunità python-it.org;
sviluppatore e amministratore di sistemi Linux con oltre 20 anni di esperienza, e' certificato RedHat Cerfied Engineer (RHCE).
Sostiene la filosofia open source e la condivisione della conoscenza. Attualmente si occupa di automazione, cloud, scripting e system integration.

banner eng

fb icon evo twitter icon evo

Word of the Day

The term Edge Computing refers, when used in the cloud-based infrastructure sphere, the set of devices and technologies that allows...

>

The acronym SoC (System on Chip) describes particular integrated circuit that contain a whole system inside a single physical chip:...

>

The acronym PtP (Point-to-Point) indicates point-to-point radio links realized with wireless technologies. Differently, PtMP links connects a single source to...

>

Hold Down Timer is a technique used by network routers. When a node receives notification that another router is offline...

>

In the field of Information Technology, the term piggybacking refers to situations where an unauthorized third party gains access to...

>
Read also the others...

Download of the Day

Netcat

Netcat is a command line tool that can be used in both Linux and Windows environments, capable of...

>

Fiddler

Fiddler is a proxy server that can run locally to allow application debugging and control of data in...

>

Adapter Watch

Adapter Watch is a tool that shows a complete and detailed report about network cards. Download it here.

>

DNS DataView

DNS DataView is a graphical-interface software to perform DNS lookup queries from your PC using system-defined DNS, or...

>

SolarWinds Traceroute NG

SolarWinds Traceroute NG is a command line tool to perform advanced traceroute in Windows environment, compared to the...

>
All Download...

Issues Archive

  •  GURU advisor: issue 21 - May 2019

    GURU advisor: issue 21 - May 2019

  • GURU advisor: issue 20 - December 2018

    GURU advisor: issue 20 - December 2018

  • GURU advisor: issue 19 - July 2018

    GURU advisor: issue 19 - July 2018

  • GURU advisor: issue 18 - April 2018

    GURU advisor: issue 18 - April 2018

  • GURU advisor: issue 17 - January 2018

    GURU advisor: issue 17 - January 2018

  • GURU advisor: issue 16 - october 2017

    GURU advisor: issue 16 - october 2017

  • GURU advisor: issue 15 - July 2017

    GURU advisor: issue 15 - July 2017

  • GURU advisor: issue 14 - May 2017

    GURU advisor: issue 14 - May 2017

  • 1
  • 2
  • 3
  • BYOD: your devices for your firm

    The quick evolution of informatics and technologies, together with the crisis that mined financial mines, has brought to a tendency inversion: users that prefer to work with their own devices as they’re often more advanced and modern than those the companies would provide. Read More
  • A switch for datacenters: Quanta LB4M

    You don’t always have to invest thousands of euros to build an enterprise-level networking: here’s our test of the Quanta LB4M switch Read More
  • Mobile World Congress in Barcelona

    GURU advisor will be at the Mobile World Congress in Barcelona from February 22nd to 25th 2016!

    MWC is one of the biggest conventions about the worldwide mobile market, we'll be present for the whole event and we'll keep you posted with news and previews from the congress.

    Read More
  • 1