----
VGA over Cirrus in XenServer 6.2
// Latest blog entries
Achieve Higher Resolution and 32Bpp
For many reasons – not exclusive to XenServer – the Cirrus video driver has been a staple wherein a basic/somewhat agnostic video driver is needed. When one creates a VM within XenServer (specifically 6.2 and previous versions) the Cirrus video driver is used by default for video...and it does the job.
I had been working on a project with my mentor related to an eccentric OS, but I needed a way to get more real-estate to test a HID pointing device by increasing the screen resolution. This led me to find that at some point in our upstream code there were platform (virtual machine metadata) options that allowed an one to "ditch" Cirrus and 1024x768 resolution for higher resolutions and color depth via a standard VGA driver addition.
This is not tied into GPU Pass through nor is it a hack. It is a valuable way to achieve 32bpp color in Guest VMs with video support as well as obtaining higher resolutions.
Windows 7: A Before and After Example
To show the difference between "default Cirrus" and the Standard VGA driver (which I will discuss how to switch to shortly), Windows 7 Enterprise had the following resolution to offer me with Cirrus:
Now, after switching to standard VGA for the same Guest VM and rebooting, I now had the following resolution options within Windows 7 Enterprise:
Switching a Guest for VGA
After you create your VM – Windows, Linux, etc – perform the following steps to enable the VGA adapter:
- Halt the Guest VM
- From the command line, find the UUID of your VM:
xe vm-list name-label="Name of your VM"
- Taking the UUID value, run the following two commands:
xe vm-param-set uuid=<UUID of your VM> platform:vga=std
xe vm-param-set uuid=<UUID of your VM> platform:videoram=4
- Finally, start your VM and one should be able to achieve higher resolution at 32bpp.
It is worth noting that the max amount of "videoram" that can be specified is 16 (megabytes).
Switching Back to Cirrus
If – for one reason or another – you want to reset/remove these settings as to stick with the Cirrus driver, run the following commands:
xe vm-param-remove uuid=<UUID of your VM> param-name=platform param-key=vga
xe vm-param-remove uuid=<UUID of your VM> param-name=platform param-key=videoram
Again, reboot your Guest VM and with the lack of VGA preference, the default Cirrus driver will be used.
What is the Catch?
There is no catch and no performance hit. The VGA driver's "videoram" specification is carved out of the virtual memory allocated to the Guest VM. So, for example, if you have 4GB allocated to a Guest VM, subtract at max 16 megabytes from 4GB. Needless to say, that is a pittance and does not impact performance.
Speaking of performance, my own personal tests were simple and repeated several times:
- Utilized a tool that will remain anonymous
- Use various operating systems with Cirrus and resolution at 1024 x 768
- Run 2D graphic test suite
- Write down Product X, Y, or Z's magic number that represents good or bad performance
- Apply the changes to the VM to use VGA (keeping the resolution at 1024 x 768 for some kind of balance)
- Run the same volley of 2D tests after a reboot
- Write down Product X, Y or Z's magic number that represents good or bad performance
In the end, I personally found from my experience that there was a very minor, but noticeable difference in Cirrus versus VGA. Cirrus usually came in 10-40 points below VGA at the 1024 x 768 level. Based on the test suite used, this is nothing spectacular, but it is certainly a benefit as I found no degraded performance across XenServer (other Guests), etc.
I hope this helps and as always: questions and comments are welcomed!
--jkbs | @xenfomation
----
Shared via my feedly reader
No comments:
Post a Comment