windows server 2012 resolution woes with vga

SwampDragons asked:

I have two windows vms, windows server 2012 and windows server 2008. Both use kvm and libvirt. I recently decided I wanted to increase my screen resolution options, which required changing from the default “cirrus” video card to the “vga” option. This worked like a charm for my windows server 2008 VM, giving me several resolution options from 800×600 up to 2560×1600. However, this doesn’t work for windows server 2012.

Here’s the code from my xml template pertaining to the video card:

<model type='vga' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>

I suspect that this is a driver issue. I tried to figure out what drivers would be compatible with KVM’s emulated VGA card, but all I found about the card was that it was a ” dummy VGA card with Bochs VESA extensions” and googling that plus “drivers” turned up nothing useful.

In my windows 2008 vm, the driver is a “Standard VGA Graphics Adapter” which seems like window’s generic driver and would explain why I didn’t need to download anything new to get the vga card working for windows 2008. However, in windows 2012 the driver just shows up as the “Microsoft Basic Display Adapter” and attempted driver updates result in windows telling me that everything’s up to date. Under this driver, I only get a resolution of 1024×768, which is even worse than it was with the cirrus card, which at least went to 1280×1024.

Based on this question, I understand the poor behavior with the VGA card to be a result of the basic display adapter’s very basic capabilities:
Stuck at low resolution: Monitor as well as display adaptor not recognized in Windows Server 2012

As far as I can tell, I need one of two things. A) a better driver, one that’ll give better resolution support to the dummy card. B) a new dummy card with fancier capabilities (can KVM do this?)

One last possibility is that C) suggests this may be because my GPU doesn’t support directx9 but I have no idea how to check on that.

Any help would be greatly appreciated.

My answer:

Install the SPICE Guest Tools in your Windows guest to obtain (almost) all the various virtio drivers. (If it fails, install them from the virtio-win package instead.)

Then shut down the VM and reconfigure it so that it uses a SPICE channel and QXL video.

Windows guest video configuration

The corresponding XML is:

<controller type='virtio-serial' index='0'>
  <alias name='virtio-serial0'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
<channel type='spicevmc'>
  <target type='virtio' name='com.redhat.spice.0'/>
  <alias name='channel0'/>
  <address type='virtio-serial' controller='0' bus='0' port='1'/>
  <model type='qxl' ram='65536' vram='65536' heads='1'/>
  <alias name='video0'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>

After you restart, go to Device Manager, select the Microsoft Basic Display Adapter and Update Driver. Point it at the latest QXL WDDM driver.

Though installing the driver will reset your resolution to 1024×768, you can then change your resolution and use the full Desktop Experience at any resolution you wish, up to 2560×1600.

Windows guest at high resolution with Desktop Experience

You’ll even be able to do things you couldn’t before with the VGA driver… like watch YouTube.

I need to turn down the volume though...

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.