Windows Server 2012 Hyper-V 4k logical sector size on VHDX not able to add to VM

Posted on 2014-08-29
Last Modified: 2014-11-12
Windows 2012 Standard running Hyper-V (working with a few clusters, 4 node and a 6 node failover clusters)

Equallogic arrays running 7.0.5.

I provisioned a 4k sector size volume and added it as a CSV on the Hyper-V failover cluster.
Running fsutil shows that the attached CSV has both the physical and logical sector size showing as 4096.
I then create a new VHDX from PowerShell to specify the logical sector size.
When I try to attach the VHDX to the SCSI controller on a VM running Windows 2012, I get an "Incorrect Function" error if the VM is running. If the VM is off, I can attach it but the VM will not boot while the VHDX is attached.

I've tried a few different options for creating the VHDX (all result in the same errors):
New-VHD C:\ClusterStorage\CSVTest4K\Test1.vhdx –LogicalSectorSize 4096 –SizeBytes 10GB -Fixed
New-VHD C:\ClusterStorage\CSVTest4K\Test2.vhdx –LogicalSectorSize 4096 –SizeBytes 10GB -Dynamic
New-VHD C:\ClusterStorage\CSVTest4K\Test3.vhdx –LogicalSectorSize 4096 -PhysicalSectorSize 4096 –SizeBytes 10GB -Fixed
New-VHD C:\ClusterStorage\CSVTest4K\Test4.vhdx –LogicalSectorSize 4096 -PhysicalSectorSize 4096 –SizeBytes 10GB -Dynamic
New-VHD C:\ClusterStorage\CSVTest4K\Test5.vhdx –BlockSizeBytes 128MB –LogicalSectorSize 4KB –SizeBytes 1TB -Dynamic

Open in new window

Here's the error message when trying to attach the VHDX to the running VM:
[Window Title]

[Main Instruction]
Error applying Hard Drive changes

Failed to add device 'Virtual Hard Disk'.

Attachment 'C:\ClusterStorage\CSVTest4K\test1.vhdx' failed to open because of error: 'Incorrect function.'.

[Expanded Information]
'VMNAME' failed to add device 'Virtual Hard Disk'. (Virtual machine ID 30FBFCE4-43D1-4B66-9A58-527884D9BE13)

'VMNAME': Attachment 'C:\ClusterStorage\CSVTest4K\test1.vhdx' failed to open because of error: 'Incorrect function.' (0x80070001). (Virtual machine ID 30FBFCE4-43D1-4B66-9A58-527884D9BE13)

From everything I'm reading this should be supported. What am I missing?

Question by:Jeremy Weisinger
    LVL 56

    Expert Comment

    by:Cliff Galiher
    How, specifically, are you attempting to add the VHDX to your VM?
    LVL 18

    Author Comment

    by:Jeremy Weisinger
    Hi Cliff,

    Failover Cluster Manager -> VM settings -> SCSI controller -> Add hard disk -> browse to the VHDX
    LVL 56

    Assisted Solution

    by:Cliff Galiher
    Curious. I cannot reproduce the issue, but I don't have an Equalogic here, but I do have a test lab cluster and native 4k throughout, and all worked well when I tested. 80070001 is usually a lower level storage error. My initial suspicion is that your SAN SMI provider is not exposing fill native 4k functionality to 2012.
    LVL 18

    Author Comment

    by:Jeremy Weisinger
    I suppose that could be the case. I may give Dell a call about this then.

    And just to clarify, you've created the VHDX from the command line, specifying the logicalsectorsize 4096? And you're running Windows 2012 (not R2)?

    LVL 56

    Accepted Solution

    I did spin up my 2012 test cluster, yes, though normally it dormant since my usual test lab is 2012 R2. And yes, I used PowerShell to replicate the environment you have as much as possible.
    LVL 116

    Assisted Solution

    by:Andrew Hancock (VMware vExpert / EE MVE)
    We've had many issues with 4k on Equallogic with both Hyper-V and VMware.

    At present we do not use it....

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    The reason that corporations and businesses use Windows servers is because it supports custom modifications to adapt to the business and what it needs. Most individual users won’t need such powerful options. Here I’ll explain how you can enable Wind…
    VM backup deduplication is a method of reducing the amount of storage space needed to save VM backups. In most organizations, VMs contain many duplicate copies of data, such as VMs deployed from the same template, VMs with the same OS, or VMs that h…
    In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
    This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now