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:\.

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

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.

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.

Once powered on Removable Devices are no longer present:

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

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…..