I endeavour to spend a bit of time over the Christmas/New Year break trying out and learning about new things as these opportunities don’t present themselves much through the year. On Friday night over dinner, a good friendÂ Russell Robinson mentioned a virtualization productÂ XEN, which was being put to very good use where he does some contracting work. I’d heard of XEN but didn’t know anythingÂ about it. I still have Cherryl’s new PC that I can play around with, so this seemed like a good time to check XEN out.
Computer virtualization enables you to run a guest operating system from within another host operating system. Lets say you are running Windows XP and would like to run Linux at the same time, well that’s where virtualization comes into play.
VMWare Workstation is one of the best known and most widely used virtualization products. I purchased a copy about 3 years back when I finally owned a PC powerful enough to run it and wish I’d started using it years before. I use it for software testing as you can start with a cleanly installed version of Windows or one with lots of programs installed and test against known environments and base lines. I run versions of Windows 98,Â 2000 and XP under VMWare.
Besides testing the programs I develop, I use VMWare for testing software I download from the Internet. This lets me runÂ these programs in a safe secure sandboxed environment with no way any malicious program canÂ touch my real host operating system, its disk drives, registry etc. As far as I’m concerned a sandboxed environment or one where you can roll back the clock, are the only ways to try software you download from the Internet, unless that is, you know it is from a reputable company. The prime reasonÂ PC’s become such a mess is because of all the programs people try and then uninstall, but bits and pieces are frequently left behind or worse.
VMWare and similar programs like Microsoft’s free Virtual PC are what’s called virtual machine emulators which add a layer that hides the physical PC’s hardware and present a new isolated set of virtual hardware. Emulation and virtualization is done in software and requires a fair chunk of processing power. This means you needÂ a reasonably powerful PC with plenty of memory. The downside of all this is thatÂ the guest operating systems run a quite a bitÂ slower than if they were running directly on the same PC and they also have restricted resources available to them. Nevertheless the advantages of these products clearly outweigh their disadvantages.
New hardware virtualization technologies introduced by Intel and AMD dramatically change this picture and enable guest operating systems to run at something a lot closer to full speed. This is where XEN fits in. I have to say I found the XEN Web site disappointing and confusing. It seems like they expect everyone to know what XEN does before they visit the site. I couldn’t find any basic overview material that gave me the on-high picture of XEN, how it works and how you use it. I just kept reading how it will give me near bare metal performance!
Fortunately they haveÂ the XEN Express editionÂ free starter pack. I downloaded this, burnt the ISO image to a CD and went from there. For some reason I had trouble though as XEN couldn’t locate or initialize my Ethernet Adapter. I tried several times to no avail. XEN Express is built aroundÂ a modified Linux distribution. The ASUS motherboard I’m using on this particular PC hasÂ 1G LAN on-board which uses an nVidia nForce 430 chip. Under WinXP you need to install drives before the LAN port is recognized, so I could understand why Linux might have trouble. I temporarily gave up and played with installing some other OS’s on this new PC, including versions of Linux and MS Vista and they were all able to initialize the Ethernet Adapter (eth0). So I gave XEN another shot and this time it worked!
XEN Server is very a different product to VMWare Workstation and its ilk and is designed for a different set of users. You install XEN Server on a dedicated computer, preferably one with lots of grunt,Â memory and hard disk space, typically a server. You then use a different PC to access and administer the XEN Server. This latter PC can be most any PC with a network connection. You install the XenSource Administrator Console from the same CD as the Server, start the Admin Console and enter the IP address of the XEN Server (displayed on the server screen) and your login password (set when you installed the server). Once theÂ connection to the server is established a Management window is displayed. From here you can Install a new XEN VM (Guest OS), Power On (start) a VM, Reboot and Shutdown a VM and more.
Lets see a few screen shots from the Administrator Console program.
This shows the Overview information for the XenServer. It includes full details of the host computer, its network adapters, amount of free disk space and how much memory is allocated to each of the installed XenVM’s. From here you can Install a new XenVM (Operating System), Reboot or Shutdown the Server, access its Console, view Performance graphs, and manage installed XenVM’s.
This shot shows the Overview of a XenVM guest operating system, specifically Windows XP. From here you can change the amount of memory allocated to the VM, alter the virtual diskÂ size, add or remove disks andÂ Ethernet adapters and change the CD-ROM Drive. You can also Reboot or Shutdown the OS if it is running or Power On, Clone, Export or Uninstall the VM if it is Off. Note that to change memory or drive size etc. a VM must be Off.
I was impressed with the ability to add more virtual disks and resize them. There was a bit of mucking around in WinXP to recognize the new drive, but it wasn’t too bad. Disk drives in a VM scenario aren’t physical hard disk drives, but a chunks of space on a physical drive. As I mentioned earlier XenServer uses Linux which includes LVM or Logical Volume Management whichÂ provides the capabilities to create and resize these virtual disks.
The next screen shot shows the Graphical Console for the Windows XP XenVM shown above. The Graphical Console uses VNC to view and interact with the operating systems running on the XenServer. As shown here you are only seeing a part of the XenVM operating systems screen and you need to vertically and possibly horizontally scroll to work with all parts of the screen. To make this easier you can Undock the VNC Graphical Console (see below) so it runs in a Window of its own, which should be the same size as the actual OS Screen.
If you’ve ever used VNC you’ll know it is ok but not great, in that screen redraws are a bit sluggish making the user experience less than ideal. You have to keep in mind though that this is a management console, and isn’t really something you would sit at and use as the real screen for the OS. VMWare Workstation is better in this regard as everything runs on the one computer and the guest OS screen appears in a Window with nowhere near the lag of VNC.
The real user of an XenVM would instead use Windows Remote Desktop if the guest OS was Windows and for Linux you would use WinSCP, PuTTY and the like to get Shell access or VNC for GUI access. Or more likely just access it via. a Web Browser when the OS’s prime purpose is a Web Server.
This image shows a WinXP XenVM in an Undocked Graphical Console window. It would be very useful to be able to run the Administration Console on the XenServer itself, however it doesn’t seem that this is possible.
The next screen shot shows Debian Linux in the Graphical Console with a Web Browser showing our Surfulater.com Web site. You can also see the CPU % for each running XenVM and for Linux VM’s other information, like how much memory is being used, andÂ disk and network throughput. It is a pity this information isn’t shown for Windows OS’s. Update: Installing the Xen WinXP Drivers resolved this.
This last screen shows the XenServer Performance screen, which should speak for itself. You can also see similar pages for each running XenVM, but for Windows OS’s you only see CPU Usage as mentioned above.
So who would use XenServer and why. First up for my use in software quality assurance and testing,Â VMWare Workstation is far better suited. However if I wanted to set up a box in the corner running Web Servers, Mail Servers and the like and I wanted multiple instances of Linux running, it would be ideal.
Another possible use would be a SOHO where you could effectively share a single server computer amongst all staff/family members, each with their own OS, Disk Space etc. I have to say this use is questionable though.
Web Hosting companies would certainly be able to make good use of XenServer as would Enterprise IT and these seem to be the markets Xen is aimed at.
Note that XenVM’s are currently limited to Windows XP and Windows 2003 Server, and RedHat and Debian Linux, so if you want to use anything else you are out of luck.
XenSource keep pushing near bare metal performance and while it is indeed very good and very impressive, it isn’t “near bare metal”. These are some WinXP benchmark results, with it installed directly on the PC, versus XenServer on the same PC with WinXP installed as an XenVM.
Drystone ALUÂ 14,538 MIPS Native XP, 7,048 MIPS XP on XenVM
MM Integer 36,895 it/s Native XP, 17,800 it/s XP on XenVM
Disk Burst Speed 226.1MB/sÂ Native XP, 142.2MB/sÂ on XenVM
Disk Average Read Speed 63.2MB/sÂ Native XP, 9.7MB/s on XenVM. This was fixed once the Xen XP Driver Installed.
* See my Comment 8 for an update on these performance issues.
CPU benchmarks were down around 50% of native performance and Disk speed down around 15%. Three XenVM’s were running with two sitting idle. The drop in disk performance is significant and would impact heavily on disk bound processes. The PC has an AMD Athlon 64 X2 3800+ CPU, 1G DDR2 RAM and 2 x 320G SATA II Disk Drives.
Overall XenServer worked very well indeed. I did run into a problem where the Administration Console kept disconnecting from the server and restarting the Console program didn’t resolve this. In the end I had to hit the reset button on the server as I couldn’t restart it from the console. This resolved the console disconnection problem, but was a drastic measure in the extreme.
I also had problems with the XEN Servers CD-ROM drive where I wasn’t able to eject the drive so I could put in the next CD for a Windows 2003 Server installation. The only way I found to do this was to shut-down the XenVM. Same thing with Windows XP. The CD-ROM drive also couldn’t be written to, even though it is a burner. The Administration Console is a bit annoying in places as it continually interupts your work flow with confirmation prompts. It would be far better if these “Are you sure?” prompts included a “Do not ask again” option like I use in Surfulater.
XenServer has only recently been released, so you might want to sit back for a little while before using it in a production environment.
The addition of hardware virtualization to CPU’s is a leap forward for running virtualized operating systems at far better performance than software virtualization. I get the feeling we are just at the beginning with this new technology and we will see lots of new and interesting developments over the next few years.