Windows Server 2012 on vSphere 5.0 – The Case of the Missing D:\ Drive

I sincerely hope this saves somebody else some time because I had a fair amount of head scratching with this today. Installed a Windows Server 2012 VM on vSphere 5.0 U2, pretty standard install with a C:\ drive for OS, Software etc and D:\ for data. This particular server needed to run SQL Server 2012, however the install kept repeatedly failing with the error “Could not find the Database Engine startup handle”. Initially I suspected that it might be a problem with a corrupt ISO as there are numerous postings around that and some, such as the below, suggesting that it could be an issue with mounting an ISO (I was pretty dubious about this though).

http://mbmccormick.com/2012/12/sql-server-2012-could-not-find-the-database-engine-startup-handle/

Having messed around with extracting the ISO, copying the files locally and other methods, eventually I tracked down in the SQL Server install log that it seemed to be having an issue reading and writing files to and from the D:\ drive during setup. During the SQL Server install wizard I’d specified that the path for databases, logs etc would be D:\. So I re-ran the installation and this time left the default of C:\ for everything and voilà, it worked!

No big deal I thought, I’ll simply change these locations post install. However, when I went to change the database server properties (or attempt to create a database) I was greeted with a dialogue box which only displayed the C:\ drive as accessible, no sign of D:\.

HotPlug4

Although clearly Windows was happy that a D:\ drive was present.

HotPlug2

This started ringing other bells because during the time I had been spending copying extracted ISO files around the $Admin share of D:\ had not been accessible (which I was going to look into later – should have done it then!)

Googling Researching this issue landed me at this forum post on SqlServerCentral.com – Sql Server 2012 can’t see 2nd drive. In there they link to this VMware KB article – Disabling the HotAdd/HotPlug capability in ESXi 5.x and ESXi/ESX 4.x virtual machines . Essentially what is happening is that Windows is marking the drive as Removable (i.e. like a USB drive) and consequently some operations that we would normally expect to be available are not. If you look in the taskbar the drives are potentially removable – although in practice if you try to they are not because they are in use.

HotPlug1

You can get round this either by applying the suggested workaround from VMware which is to add devices.hotplug = false into the .vmx file for the VM or in Windows  disable a security policy in gpedit.msc under Computer Configuration\Windows Settings\Security Settings\Advanced Audit Policy Configuration\System Audit Policies\Object Access .

I went for the former which you achieve by:

Connect to the ESXi/ESX host or vCenter Server using the vSphere Client.
Power off the virtual machine.
Right-click the virtual machine and click Edit Settings.
Click the Options tab.
Click General > Configuration Parameters > Add Row.
Insert a new row with the name devices.hotplug and a value of false.
Power on the virtual machine.

HotPlug3

Once powered on Removable Devices are no longer present:

HotPlug5

The D:\ drive is available over the network via the $Admin share and SQL is now able to see the D:\ drive:

HotPlug6

Incidentally, I blogged about this similar issue back in 2010 and at the time put the devices.hotplug setting into standard templates for Windows Servers; looks like I’ll need to do that for Windows Server 2012 too! Never seem to hear much about other people having issues with this problem though, would like to hear in the comments if it has caused you issues too…..

7 thoughts on “Windows Server 2012 on vSphere 5.0 – The Case of the Missing D:\ Drive

  1. Thanks so much for publishing this. We had a similar issue at work whereby an application on a 2012 server was not allowed to write to disks when running as a service. When we ran the application as a console it would run fine. Go back to service and we’d get read/write failures. We had a half dozen bright folks working on the issue for over a week, but it was our DBA that came across your excellent article. Applied the config parameter and vola!!

    P.S. Everyone gave our DBA a golfer’s clap.. 😉

  2. Guess what else this affects…SharePoint 2016. I was fighting an issue with Word Automation Services and documents getting stuck in the database with Error Code 9 and 10. I couldn’t find anything about this issue anywhere. So I just started going to every link that was posted on any forum about the issue. I finally came across an Experts Exchange article talking about it. Towards the bottom of the post there was a link to the VMWare KB article describing how to turn that off. Now how, I thought, could this possibly fix an issue with Word Automation Services in SharePoint. I guess there is a security “feature” in VMWare that interferes with the executable if the drive it is trying to access has Hot Plug enabled. I disabled this setting as you mentioned above, and everything in the database flowed through like it should. Strange bug to have in there, so we are also adding that setting to the template.

    https://www.experts-exchange.com/questions/28901218/Sharepoint-2013-Automation-Service-Failing-with-Error-Code-10.html
    https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1012225

Comments are closed.