Citrix Xenserver Quick Start Guide
© Alan Johnson February 2012
Introduction to Xenserver
The purpose of this tutorial is to provide a quick start guide to the basic features of XenServer and XenCenter. The intent is to shorten the learning curve for the casual hobbyist or to provide a basic introduction to administrators that are considering deploying Xenserver within their own organization. Relatively inexpensive hardware was used to generate the screenshots; the servers were sub $500 commodity systems with i3 processors and 6GB of RAM. Netgear ReadyNAS systems were used to provide iSCSI based storage. Xenserver is freely available, although to use some of the advanced features it may be necessary to upgrade to one of the fee based solutions. At the time of writing (2012) the following variants are available:
Obtain the free Xenserver product from
Register and download, then burn the ISO image and boot from a dedicated server. This will be the location of the bare metal hypervisor.
Note the term bare-metal is used since the hypervisor interacts directly with the hardware of the server.
In this configuration the server name is simply “Xenserver”. Follow the prompts and after installation a screen similar to that below should be shown on the server.
After installation the XenServer console will show its IP address under the Status Display option as shown in Figure 1.
Figure 1 Showing XenServer’s IP address
XenCenter is the management tool for configuring xemserver. It is recommended to use thsi tool wherever possible. Open a browser on a regular windows system and enter the IP address into the URL bar as shown in Figure 2. This will give two choices for the installation of XenCenter. It is possible to make an image for later installation or to run the installer directly from the browser. In this case the direct installation method will be chosen. Highlight the <XenCenter installer> link and select it, depending on the browser used there may be a prompt similar to that shown in Figure 3. Save the file (if necessary) and then run it.
Figure 2 Installing XenCenter
Select <Run> to execute the installer.
Note: XenCenter runs under Windows Operating Systems
Figure 3 XenCenter installation prompt
At the prompt select <Next>, then select <Next> and enter a file location.
Starting and Configuring XenCenter
Adding a server
From the Start Menu select <Citrix XenCenter>. The first task is to add a server. This is done by opening the <Home> Tab and selecting <Add a server> by clicking on the icon. Enter the information using the server’s IP address that was determined earlier from the console screen and use the password that you supplied during the server installation process. Then select <Add>.
Figure 4 Adding a server to the console
Figure 5 Connecting to the console
The license manager screen will now open and the free version can be activated by highlighting the server and then from the <Activate Free XenServer> prompt select <Request Activation Key> which will open up the Citrix website where you can enter the appropriate information.
Note: this activity can be delayed if desired and activated later from the <Tools> menu of the XenCenter console.
Figure 6 Activating the license
Enter the mandatory information and select <Submit>.
A license file will be sent via email. The next step is to select the <Activate Free XenServer> again and this time select <Apply Activation Key>. A prompt will be issued for the file’s location. Select the file and then select <Open>. The license should now be activated and an expiry date will be shown in the License Manager screen. Close the License Manager.
Figure 7 Applying for the Free XenServer license.
Figure 8 Applying the Activation key
Using the XenCenter Console
Figure 9 Navigating the XenCenter console
The XenCenter console will show a hierarchy corresponding to the server and its resources. Selecting each device in turn will show information related to the resource. In . above, statistics about the server are shown relating to its memory and CPU usage etc.
Selecting local storage will show the local resources and the file system type along with capacity and other storage related parameters. Multipathing is disabled since SATA devices do not have this capability.
The tabs in the right hand pane will vary according to context – for example with the uppermost object <XenCenter) selected – four tabs (Home, Search, Tags and Logs) are presented.
Going back and selecting the xenserver object shows a wide range of tabs, the first tab (search) has already been discussed. The second tab (General) give more in depth information relating to the server selected such as its uptime, iSCSI iqn name, memory size, version number and license details.
Figure 10 XenServer’s General properties.
Items can be expanded or collapsed by selecting the arrow to the right of each category.
The next tab <Memory> is not used in the free version but there is an upgrade available which will allow for the use of dynamic memory.
Figure 11 XenServer’s Memory Tab
The <Learn More> function will open a web location which explains the benefits of dynamic memory. In a commercial environment it is recommended that dynamic memory should be used. The Citrix website states that Dynamic memory control can:
Reduce costs, improve application performance and protection, and increase VM density per host server. Also known as memory ballooning, dynamic memory control allows host memory to be allocated dynamically across running VMs.
Allow new VMs to start on existing pool resources by automatically compressing the memory footprint of existing workloads
Reduce hardware costs and improve application performance by sharing unused server memory between VMs, allowing for a greater number of VMs per server host
Maintain VM and host performance and stability by never oversubscribing host memory, and by never swapping memory to slower disk-based systems
The Storage Tab will allow us to create a Storage Repository which is where the Virtual Machines (VMs) will be located. In the steps following an iSCSI target will be added. The target in question is a Netgear ReadyNAS device and has been configured with IP addresses of 192.168.1.72 and 192.168.1.96. The relevant section is shown below in Figure 12.
Figure 12 Netgear iSCSI target configuration.
Both of the LUNs assigned to target xen will be used.
With the Storage tab selected, select <New SR>
Figure 13 Creating a new Storage Repository
This first example uses an iSCSI target so select <Software iSCSI> and select <Next>.
Figure 14Using iSCSI as a new Storage Repository
Enter a Name and check or uncheck Auto-generate description according to your preferences. Select <Next>.
Figure 15 Naming the storage repository
Add the IP address of the iSCSI target, for security CHAP can be selected. Note that CHAP stands for Challenge Authentication Protocol and can be used to select an extra level of security by using a password (a secret). In this example CHAP will not be used. The <Discover IQNs> button can be used to find available IQNs. It is recommended to use this function as IQN names are lengthy to type in.
Note: 3260 is the default port number for iSCSI.
After discovery a number of IQNs may be found, select the target that corresponds to the correct device and then after the IQN has been selected it will now be possible to send a <Discover LUNs> command. The target LUNs discovered should be LUN0 and LUN1 corresponding to the LUNs shown in Figure 12. Initially LUN0 will be configured.
Figure 16 Entering iSCSI target parameters
The next step is to prepare the storage repository (SR). A prompt will be presented which will format the LUN.
Figure 17 Creating a new virtual disk from the iSCSI target.
Respond <Yes> and the new SR will be created. The Storage Tab will now show the newly created virtual disk. Repeat the process for the second LUN (LUN1).
Figure 18 Adding a second LUN as a new storage repository
Figure 19 Newly created virtual disk.
The networking tab will show the current network. The IP address is shown along with other parameters. This networking task will be to add a new network. There are a number of choices here. The first choice <External Network> will be used for regular network traffic. It is also possible to bond multiple networks together for higher performance. To create an External Network select the Networking Tab and then select <Add Network>.
Figure 20 Adding a new external network
Select <External Network> and select <Next>.
Figure 21 Selecting the network type.
Name the network and type in a description. Select <Next>.
Figure 22 Naming the new network
Select a VLAN number and also increase the MTU rate if desired. In general it is recommended to use large frames (jumbo frames) for data throughput applications.
Figure 23 Setting the new external network parameters.
The new network looks like:
Figure 24 Showing the new external network
This tab is mainly read only but it does allow multiple networks to be connected together to provide higher throughput and greater resiliency. Active-Active and Active-Passive modes are supported. After bonding a new NIC will appear which is termed the bond master, any other NICs that are part of the bond are termed NIC slaves.
Figure 25 NIC Bonding
The console tab displays the Virtual Machine’s window. If no Virtual Machines are running the console of the XenServer can be shown which presents a command line prompt. The command <xsconsole> will show a console similar to the screen output of the local XenServer.
Figure 26 XenServer console “help command” output
Figure 27 XenCenter – Output of xsconsole command
This tab shows statistics related to CPU, Memory and NIC throughput.
Figure 28 Viewing Performance Graphs
The type of data that is displayed in the graphs can be modified by using the <Configure graphs> button. There are two tabs – Data Sources and Layout. Select the data sources from the <Data Sources> tab and then select and position them using the <layout> tab.
Figure 29 Selecting and arranging the performance graphs
This tab is used to configure Active Directory and Domain services.
This tab shows the log entries and allows them to be filtered according to severity levels
The log can be cleared from this screen.
Creating a XenServer Virtual Machine
From the main menu at the top of XenCenter select <VMà New VM>.
Figure 30 Creating a Virtual Machine
A number of templates exist which can be selected to configure the system automatically for optimal performance. If a template does not exist for the operating System that is to be installed; then select the <Other install media> template and configure manually.
In the example following a later version of Ubuntu Linux will be used to generate a virtual machine and since this version is not available as a template the <Other install media> template will be selected.
Figure 31 Selecting a VM template
Select <Next>, name the VM and select <Next> again.
Figure 32 Naming the VM
The next step is to select the installation media. Xen has the ability to install a VM from a library of ISO files which contain the images, from a local DVD or from the network. In this example a DVD on the server itself (xenserver) will be used.
Figure 33 Selecting the VM installation source
The VM can be associated with a home server which means that this server will always be the one to start the VM (provided that it is available. If multiple servers are available then there will be an option to allow the VM to be started on any server that has access to the resource. In this instance the VM will be placed on server “xenserver”.
Figure 34 Choosing the VM’s home server.
Next select the quantity of Virtual CPUs and the memory that is to be allocated.
Figure 035 Allocating CPU and memory resources to the VM
The next step is to select the virtual disk to be used.
Note: A pre-defined template will normally select the virtual disk automatically.
Since a pre-defined template was not used, the virtual disk will be added and configured manually.
Figure 36 Selecting a virtual disk for the VM
Select <Add> and specify the volume and the capacity to be used.
Figure 37 Adding and configuring the virtual disk.
The new disk is now shown in the dialog below:
In the next stage a network for the VM will be configured.
Figure 38 Configuring the VM’s network
If required the Properties can be modified as shown below. In this example a Quality of Service (QoS) limit was added of 2MB/s.
Figure 39 Modifying the VM’s properties.
Verify the setting presented and select <Finish> to create and start the new VM.
Figure 40 Completing the VM creation.
A status will be shown at the bottom of the XenCenter screen showing the VM creation progress. At this point the Console on “xenserver” will show the new VM or it can be displayed using the console tab from XenCenter.
Figure 41 Console showing the newly added Ubuntu VM
In the main tree select the newly added <Ubuntu 11.10 VM> and then select the <Console tab>. This will now display the state of the VM.
Note: this console can be undocked away for XenCenter and used as an independent window.
Figure 42 Interacting with the VM through the console tab.
Continue with the installation process through the console window until Ubuntu has completed installation.
Note that as far as Ubuntu is concerned it will use the 20GB disk that we allotted to it earlier. At this point Ubuntu is communicating with virtual hardware provide by the Xen server. During the installation it may be instructive to look at the performance (via the performance tab) to see how much of the resources are being consumed.
Starting the new VM
From the main XenCenter console select the new VM (Ubuntu 11.10) and then click on <Start>.
Figure 43 Starting the new VM
Select the <console tab> to interact with the VM. An important part of the configuration is the installation of Xenserver tools
Installing XenServer tools
With the VM selected, open the <General tab> to see if the tools are installed, if not click on the link to begin installation.
Figure 44 Installing XenServer tools
This will mount a device within the VM which can be interacted with.
Figure 45 Accessing Xenserver tools from the VM
Open the Linux folder and execute (or edit if necessary) the install.sh file.
Figure 46 Running XenServer tools from Linux
Review of terminology
At this point it is useful to review some of the components that have been encountered so far.
Xenserver – contains the Ctirix Xenserver Operating system (Hypervisor)
XenCenter – console for configuring and interacting with the hypervisor.
Storage Repository – normally a shared storage resource that is available to multiple servers
Virtual disk – a slice of a storage resource that is used to house Virtual Machines and data.
Advanced Features of XenServer
Citrix uses Pools to provide a centralized view of servers and their associated storage as a single manageable entity. In general the hardware should be similar (cannot mix AMD and Intel or CPUs with different features), but there is an add on available to allow participation between heterogeneous servers which can mask some of the differences. Servers should be running the same version and patch revision. One of the servers is termed the Pool Master. If the pool master fails then another node can be designated as the new pool master.
Note: The free version does not allow this to happen automatically, the HA enabled version will though.
Pools are normally created with shard storage configurations.
From XenCenter add in the servers that will form the pool:
Figure 47 Selecting servers for pool creation
Add in both servers
To create a pool there should be a minimum of two servers. In this example the two servers are XenAcer and xenserver-Acer2.
To form a new pool – select <New Pool>.
Figure 48 Creating a new pool
Referring to Figure 49 – Name the pool (AcerServerPool) in this instance) and use the drop down box to select the master server within the pool. Select from the checkbox additional members of the pool. Here xenserver-Acer2 will be used as a second member.
Figure 49 Naming the pool, selecting the master and adding an additional member
Select <Create Pool>.
Notice how the view has changed. The servers are now part of the Pool tree and selecting the pool shows each server in the right hand pane along with their statistics.
Figure 50 Viewing the newly created pool
Setting up NFS shared storage
The next stage is to set up storage that can be shared by the nodes in the pool. Select the pool and then with the storage tab selected, click on <New SR>.
Figure 51 Creating shared storage
The shared storage that will be used will be of type NFS.
Note: that a read/write NFS share has already been set up on the Netgear storage device as shown in Figure 52.
Figure 52 NFS read Write share on shared storage
Select NFS as the storage type and choose <Next>.
Name the Storage Repository.
Select <Next> and then enter the path followed by <Scan>.
Figure 53 Scanning the NFS path
Note: If the scan fails, verify that the network location has been correctly specified, that it is accessible and that there are no typographical errors in the entry.
Figure 54 Completing the addition of the NFS share operation
Select <Finish>. The new SR will be created.
Note: that the NFS storage is at the same peer level as the two members of the pool. Also selecting either server individually should show that the NFS storage is available to both nodes.
Figure 55 Viewing the newly added NFS storage
Creating a VM on shared storage
Select the pool and then select <New VM>.
Figure 56 Creating a new VM on the NFS shared storage
In this case a 32 bit version of Windows 7 will be installed. Select the correct template from the options provided and then select <Next>.
Figure 57 Selecting the Windows 7 32 bit template.
Name the VM and select <Next>.
Figure 58 Naming the new VM
The next stage is to select the installation media.
In this example a local DVD from one of the servers could be used or it could be from an ISO library of images that is network accessible. In the interests of slightly more complexity the ISO library option will be used. A CIFS share has already been setup on a different server outside of the pool and is set up to allow read only access. To select an ISO library select the link <New ISO library> and then select <Windows File Sharing> on the new screen that opens up (Figure 59).
Figure 59 Configuring a CIFS ISO library location
Select <Next> and name the library.
Figure 60 Naming the ISO library
Figure 61 Specifying the CIFS sharename for the library
Select <Finish>. The screen will now have a new option for Installation media corresponding to the ISO library that has just been set up. The drop down box will show the possible installation locations along with the ISO images that are available for installation. Here the Windows 7 Home Basic version has been selected and will be installed.
Figure 62 Selecting an ISO image from the new library.
Figure 63 Selecting a home server for the VM
A Home server is a server that is closely associated with the VM; If a home server is nominated the system will attempt to run the VM from the home server (provided that it is available). The recommended default option is not to assign a home server which means that the VM can run on any of the two servers that are part of the current pool.
The next stage is to allocate memory and a number of Virtual CPUs. Here 2 vCPUs will be allocated along with 2GB of memory.
Figure 64 Allocating memory and vCPUs to a VM
The Storage step selects the location of the VM.
Note: under the Shared flag it shows that NFS storage is True (Shared).
Figure 65 Selecting the VM location on NFS shared storage.
Select <Next>. The next stage will configure the networking portion of the new VM. In this case a second virtual NIC will be added.
Adding a second NIC to the VM
Note: Up to 4 virtual NICs can be added from this screen.
Figure 66 Adding a second Virtual Network Interface Card
The new screen will now show two NICs which can be configured independently.
Figure 67 New VM with two NICs
Select <Finish> to create the new VM.
The new VM will show up in the pool’s inventory.
Figure 68 Viewing the new VM within the pool
Starting the shared VM
Select the VM and then select the <console tab> and interact with the VM to install Windows in the same manner as a physical installation.
Figure 69 Installing Windows on the Virtual Machine.
VM installation and completion
After installation install Xenserver Tools. Once the tools installation has been completed open Device Manager and view the virtual hardware which includes the two virtual NICs that were installed earlier.
Other Advanced Features
The paid version of XenServer provides a number of other features such as:
With HA Virtual Machines can be automatically restarted if it fails or it can be restarted on other servers within the resource pool.
Dynamic Workload Balancing
Automatically balances new loads to ensure optimum performance across the pool and works in tandem with Xenmotion.
For more information on these and other features refer to http://www.citrix.com