Fixing Blue Screen in Windows after XenServer Tools Update

I had a Windows Server 2008 R2 virtual machine running on XenServer 6.2 SP1 with all updates and patches applied, however it was still running an older version of XenServer tools. The tools were version 6.0.2, and this was causing problems with backups from Arcserve freezing and not completing. To fix the problem I needed to upgrade XenServer tools to the latest version of 6.2, easy right? Think again.

After mounting the ISO file and installing XenServer tools 6.2 I was prompted to reboot. While booting up, the Windows 2008 R2 virtual machine blue screened with just the generic blue screen of death (BSOD) and little to no useful information on what had happened. I tried booting into safe mode to possibly remove the tools, however this also failed which was concerning.

I got the option to repair the system so selected that. There were no available Windows backups so restoring through here wasn’t an option. I opened command prompt and checked the data was still there which it was, in a moment of desperation I ran a chkdsk in the background while I was doing some additional investigation, it completed but did not help things.

Just when I thought I was going to have to restore from an out of date backup (no recent backups, the upgrade of XenServer tools was to fix a backup problem!) I found this useful post. They had experienced a similar problem, Windows Server 2008 R2 giving a blue screen of death on boot after upgrading to XenServer tools 6.2.

As noted in that post, I first ran “xe vm-list” to get the UUID of the virtual machine, then ran the below command through the XenServer console and specified the UUID of the virtual machine.

xe vm-param-set uuid=[UUID] platform:device_id=0001 

After running this I restarted the virtual machine, and it booted correctly without blue screen. After I logged into the server, XenServer tools was still installing and another reboot was required. In total at least 5 reboots were required, but in the end the server fully booted on the newer XenServer tools 6.2, so the problem was resolved.

I was interested as to why running the above command actually fixed the problem, after doing some research it was suggested by Citrix in a XenServer Tool Workarounds article. Below is a direct quote from that page:

Blue Screen on Booting a Windows VM

Citrix believes this issue is resolved with CTX136253 - Hotfix XS61E010 - For XenServer 6.1.0.  Citrix advises customers who have experienced this issue and are running XenServer 6.0.2 Tools, including XS602E009, to install (1) the CTX136252 - Hotfix XS61E009 - For XenServer 6.1.0 on your hosts first and then upgrade your VMs to the Tools contained in XS61E010. You do not need to uninstall a previous version of XenServer Tools before upgrading to XS61E010 Tools.

The following procedure remains in this document as a precaution in case customers encounter blue screens when booting a Windows VM.

Note the VM's unique identifier (UUID): in XenCenter, select the VM in the left-hand tree view. Click the General tab and record the UUID shown. You can also obtain this by using the xe vm-list command.
    Modify the VM's device_id parameter: on the XenServer host's console, issue the one of the following commands:
        To set device_id to 0001 run:

            xe vm-param-set uuid= platform:device_id=0001

        To set the device_id to 0002 run:

            xe vm-param-set uuid= platform:device_id=0002

    Reboot the VM.

In my case I was running XenServer 6.2 with all updates applied, however the version of XenServer tools that I was upgrading from was 6.0.2. Setting the device_id manually can fix problems in the instance that the virtual machine does not get the device_id set correctly during the XenServer tools update.

Summary

Essentially this was a known problem when upgrading XenServer tools from 6.0.2 to 6.2 in Windows which resulted in a blue screen of death on boot. The problem can easily be resolved by running the command mentioned above in XenServer command line while specifying the UUID of the virtual machine in question.

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>