Citrix XenServer 7 Why Should I Upgrade?

Citrix XenServer has been my favorite Type 1 Hypervisor platform for the past year now for various reasons, mostly that it’s closer to VMWare than any other hypervisor and doesn’t come at the premium price tag of VMWare, and its control domain runs Centos and features a highly robust intuitive CLI. I’ve been watching XenServer 7 (codename Dundee) with much excitement from the time it went into public Alpha and I’m happy to announce it arrived as a full release on May 24th. Having fully upgraded my own Citrix pool at home and built one in the office at work I wanted to outline what’s new in XenServer 7 and some gotchas before my next blog post which will detail the upgrade process.

 

New Stuff!

We all like new and shiny, here’s a shortlist of new features and major improvements:

  • Improved graphics: it’s not surprise that we see performance improvements in this area as Citrix has been the market leader in VDI for sometime now.
  • Configuration Maximum increases: as with any new release of a hypervisor configuration maximums have increased, details below:
    • Hosts support up to 5TB RAM
    • Host supports up to 288 CPUs
    • Hosts can support up to  4096 Storaage Repositories
    • Guest VMs can now support up to 1.5TB of RAM
    • Guest VMs support up to 32 vCPUs
  • Docker Support: while this rolled out in 6.5 SP1 docker support now includes Docker containers running in Server 2016
  • Automated Windows VM XenTool Management
    • This was a major selling feature on upgrading however it should be noted that this only for new VMs created in XenServer 7 and does not include upgraded VMs.
    • Also of note is the process to upgrade XenTools is doggedly slow and the Guest VM runs terribly until the install finishes and there’s been a few reboot cycles. Once I/O is finally optimized performance is better than it was previously, however getting there can be painful and you may run into some issues with static IPs disappearing or the network adapter showing as a completely new adapter (which caused some headaches with Windows DHCP Server).
  • Support for SMB for VM disks (I haven’t personally used this feature as of yet)
  • SSH Console: We’ve all been familiar with the RDP prompt when using the console on a windows guest. The console now sports an Open SSH button for linux VMs that launches a Putty SSH session.
  • Dom0 Improvements: This is what we’ve all been waiting for. Dom0 is now substantially larger at 18GB, so no more worries about running out of space from logs or patching (at least not nearly as quickly)
    • The second notable improvement is the use of cgroups which help to keep a heavily loaded host from being unmanageable.
  • Server Health Check: The nagging prompt when first connecting to a new XenServer asking if you want to collect health reports and send them to Citrix. Unless you’re using a paid license this is a mostly useless feature, however I can see the benefit if you are paying for support.
  • THE OS: XenServer 7 now runs on CentOS 7. I was simply shocked when 6.5 came out to find that it was still running on the old trust CentOS 5. While I see this as a great step forward, be advised if you are using any scripts that rely heavily on sysvinit functions that this release now uses systemd and some tweaking to your scripts and automation tools may be required.

 

What Still Hasn’t Changed

  • Mounting iSO SRs from SMB v3.0 requires the NTLanManager local settings to be set to “Allow LM & NTLM and NTLMv2 if negotioated” on the Windows server hosting the share
  • Active Directory Integration still requires the above changes as well.

The Verdict

Other than the disappointment around the Windows XenTools mentioned above this was a very nice release and packs a lot of great new features and iterates successfully on what has made Citrix XenServer a great hypervisor. I honestly think if it were not for lack of marketing muscle, slow release cycles, and lack of partner integrations Citrix would be a bigger player in this space. Holding a Vmware VCA, Citrix CCA, and the MS Virtualization certifications I can say hands down that for 90% of my use cases Citrix XenServer is my go to hypervisor (unless I’m running 100% Linux, then KVM it is, or if a company has deep pockets and can afford the premium VMWare licensing). Stay tuned I’ll have an upgrade walkthrough coming in the next few weeks.

 

Citrix XenServer VM’s Unmanageable

Problem:

 

Xen begins throwing errors about not being able to attach VDIs, XenMotion stops working, and the system becomes unmanageable, or xapi service immediately dies after starting

 

 

Solution:

check space on dom0

df -h

If this is at a high threshold you may want to do the following:

Remove patches from /var/patch

cd /var/patch
rm <uuid of patch>

Remove old log files

rm -rf /var/log/*.gz

Clean temp log files

rm -rf /tmp/*.log

Cleanup any old patches

xe patch-clean

Clean out /var/log/btmp

echo > /var/log/btmp

Restart Xen Toolstack

xe-toolstack-restart

 

Re-occurance Prevention:

Create a mounted volume for /var/log or do the following:

in /etc/cron.daily create the following script called logclean.sh

#!/bin/bash
rm -rf /var/log/*.gz

Then change permissions to make it executable

chmod 700/etc/cron.daily/logclean.sh

Another alternative would be to setup an NFS mount in /var/log, however I already use a centralized log aggregation solution so this cron job while a fairly blunt instrument meets my needs.

Enabling PXE Boot for Citrix XenServer VMs

Seasons greetings! i’ve been doing some testing with Cobbler deployment in my lab and ran into a minor snag getting Citrix XenServer VMs to PXE boot. Below are the steps to enable boot options for XenServer Guest VMs to utilize PXE:

 

List VMs

List VMs and make note of the UUID for the VM in question

xe vm-list

 

Setting HVM Boot Options

Using the UUID from the command above change the boot options to enable HVM mode booting and set the boot order to disk then network

xe vm-param-set uuid=<your UUID> HVM-boot-policy="BIOS order"
xe vm-param-set uuid=<your UUID HVM-boot-params:order=cn

 

Start The VM

xe vm-start uuid=<your UUID