Describe Setting up Xen and XAPI (XenAPI) on Ubuntu Server 12.04 LTS and Managing it With Citrix XenCenter or OpenXenManager here.

About This Guide


This guide is intended for users who want to use XEN in a simple and uncomplicated way exploring all Ubuntu Server 12.04 LTS facilities and for users who work in hybrids environments and with "hybrids users" (Windows/Linux).

This guide is comprehensive and include installation and configuration of Ubuntu Server 12.04 LTS too. Here we present the installation of a graphical user interface (GUI) and remote desktop access, among other things.

We also had the concern to provide brief guidance (embedded on this guide) on how you can test this procedure (using VMware Workstation). Being a friendly Hypervisor, we suggest VMware Workstation as the test environment for those interested in studying and using XEN. That is, we are talking about installing XEN (XCP-XAPI) on VMWare Workstation so that the user can know the technology in a simple, controlled, fast and safe way.

We explain the installation of the OpenXenManager toolstack and present another toolstack alternatives.

I could use XenServer, right?

Hardware limitations

Introduction

Xen is a type 1, bare-metal virtual machine monitor (or hypervisor), which provides the ability to run one or more operating system instances on the same physical machine. Xen, like other types of virtualization, is useful for many use cases such as server consolidation and isolation of production and development environments (Eg.: corporate and personal environments on the same system).

As of Ubuntu 11.10 (Oneiric), the default kernel included in Ubuntu can be used directly with the Xen hypervisor as the management (or control) domain (dom0 or "Domain0" in Xen terminology).

Our example uses LVM for virtual disks and network bridging for virtual network cards. It also assumes Xen 4.1 (the version available in 12.04). It assumes a familiarity with general virtualization issues, as well as with the specific Xen terminology. Please see the Xen wiki (see http://wiki.xen.org/wiki/Xen_Overview) for more information.

During Installation of Ubuntu

During the install of Ubuntu for the Partitioning method choose "Guided - use the entire disk and setup LVM". Then, when prompted to enter "Amount of volume group to use for guided partitioning" enter a value large enough for the Xen dom0 system, leaving the rest for virtual disks. Enter a value smaller than the size of your installation drive. For example 100 GB should be large enough for a minimal Xen dom0 system. Keep in mind that in our model stay inside that guest (dom0) all installation media for guest OSs and other useful files, so that guest must have enough space on it.

After Installation of Ubuntu

Install GUI

sudo apt-get update
sudo apt-get install ubuntu-desktop

To skip the login screen completely, boot into the console and then start the GUI

sudo gedit /etc/default/grub

Change line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="text".

Save and exit.

sudo update-grub

Reboot and you should come up directly in tty1.

Login, and then "startx" to boot into the default desktop.

To logoff "Unity" (default Ubuntu desktop) from command line type "gnome-session-quit".

Install Windows Remote Desktop

We understand that this is the best approach to have remote access to "Ubuntu Server 12.04 LTS" into a cross-plataform environment. The "XRDP" is an implementation of the "Remote Desktop" standards from Microsoft and works on the same way as for Windows. Allows remote desktop access via native Windows client machines (or "RDESKTOP" on Ubuntu), does not require loading the "Ubuntu Server 12.04 LTS" GUI (Graphical User Interface) on boot and allows multiple simultaneous sessions. To use "RDESKTOP" on Ubuntu 12.04 LTS with "TSCLIENT" see my post on http://superuser.com/questions/420291/ubuntu-12-04-how-to-get-tsclient-back.

With "XRDP" you can easily use Microsoft RDP to connect to Ubuntu without any configuration. All you need to do is install the "xrdp" package, then open Remote Desktop Connection from Windows and connect. That's it, nothing to configure.

Without wasting anymore of your time, let’s get going.

Next, open Windows Remote Desktop Connection (RDP) and type Ubuntu Server hostname or IP address.

Off Course You Can Use the Great SSH

As you may already know, SSH is a secure communication protocol that lets you remotely access networked computers. It is known as a replacement for Telnet which is very unsecure. While Telnet sends traffic in plain text, SSH on the other hand uses a secure protocol to communicate.

Run the commands below to install SSH Server.

To log in on remote machine type on your terminal

Installing Xen (XCP - Xen Cloud Platform)

XCP (Xen Cloud Platform) is the open source version similar to Citrix XenServer that uses the Xen Hypervisor. XCP uses XAPI or XenAPI to manage Xen hosts. XCP is based on CentOS 5.5.

Project Kronos is an initiative to port the XAPI tool stack to Debian and Ubuntu. It is a management stack implemented in OCaml that configures and controls Xen hosts, attached storage, networking and virtual machine life cycle. It exposes a HTTP API and provides a command line interface (xe) for resource management.

XenCenter is Windows desktop application by Citrix that is distributed with XenServer for managing servers running XenServer (the equivalent of linux is OpenXenManager). It uses XAPI for talking to Xen resource pools. Since we are setting up XAPI, we can use XenCenter to manage the server.

Why use XCP-XAPI on Debian/Ubuntu when XCP appliance exists?

Installing and configuring Xen Hypervisor

Download and install XenCenter (Windows)

Go to http://citrixxperience.com/2012/02/24/download-and-install-citrix-xencenter-6-0/ and download the ISO "XenServer-6.1-install-cd.iso" (if the version is 6.1, of course).

Start XenCenter and click "Add New Server". Put in the server ip, username and password as setup during installation, let the magic begin!

Download and install OpenXenManager (Alternative to XenCenter) (Ubuntu 12.04 Server LTS)

OpenXenManager is a free clone of the XenCenter and is supposed to be fully compatible with both XenServer and the freeware XCP. The program comes bundled as a bunch of Python scripts, contained in a single archive, so the deployment is a breeze pretty much everywhere. You won't get any visual integration with your desktop theme, though.

You might want to consider this program if you're going for an all-free combo setup with XCP perhaps, or if you require GUI management from Linux, as OpenXenManager does run on non-Windows machine, unlike XenCenter, which is for Windows only. Now, the official page looks a little out of date, so you might want to take long-term support into consideration, too. But enough talking, let's OpenXenManager in action.

Installation

Final Considerations

Why should I dedicate fixed amount of memory for Xen "dom0"?

First of all (dom0) Linux kernel calculates various network related parameters based on the boot time amount of memory. The second reason is Linux needs memory to store the memory metadata (per page info structures), and this allocation is also based on the boot time amount of memory.

Sources

Setting up Xen and XAPI (XenAPI) on Ubuntu Server 12.04 LTS and Managing it With Citrix XenCenter or OpenXenManager (last edited 2013-02-26 16:07:39 by 189)