Hyper-V: The VHD/VHDX cannot be accessed by the system when deduplication has been enabled

I’ve been setting up a few Windows Server 2012 R2 Hyper-V clusters lately and I ran across what, at first sight, appeared to be a common permissions problem.

The setup was a single-node cluster using a CSV of an iSCSI volume. I’d migrated some test VMs to it and all seemed fine and so I built and added a second node. The existing VMs ran fine and I migrated some other VMs and did some functional migration testing etc. However, when I tried to migrate the original set of test VMs then it failed with what looked like familiar errors in the Event Log (I have modified some GUIDs for security reasons):

‘TESTVM01’: Failed to open attachment ‘C:ClusterStorageCLUSTERUK02TESTVM01Virtual Hard DisksTESTVM01.VHDX’. Error: ‘The file cannot be accessed by the system.’ (0x80070780). (Virtual machine ID BF8E4819-4B69-4DFC-BDDD-4142CBD25DBC)


‘TESTVM01’ Microsoft Emulated IDE Controller (Instance ID 83F8638B-8DCA-4152-9EDA-2CA8B33039B4): Failed to Power on with Error ‘The file cannot be accessed by the system.’ (0x80070780). (Virtual machine ID BF8E4812-4B69-4DFC-BDDD-4142CBD27DBB)

This was unexpected but I thought that perhaps some permission had been mangled during the migration and the Virtual machine account needed to be re-granted permissions using something like:

icacls “C:ClusterStorageCLUSTERUK02TESTVM01Virtual Hard DisksTESTVM01.vhdx” /grant “NT VIRTUAL MACHINEBF8E4812-4B69-4DFC-BDDD-4142CBD27DBB:(F)

However, this didn’t work and the VMs still wouldn’t start. I could edit their config and change various settings and so it didn’t seem like a normal NTFS ACL issue. I found that once I removed/detached a vhd/vhdx from one of the problematic VMs that I could no longer re-attach it. I could create a new VHD and attach it or take an existing VHD from an unaffected machine without any issues but there was something about those specific VHDs that were causing issues.
I then recalled that for testing I had originally enabled deduplication on the CSV when it was only attached to the first cluster node. I had since disabled deduplication, which explained why subsequently migrated VMs didn’t also have the issue.
The real question now was how to fix the issue. Would simply enabling deduplication on the new secondary node simply get it working? The answer was ‘yes’!

6 thoughts on “Hyper-V: The VHD/VHDX cannot be accessed by the system when deduplication has been enabled

  1. In m case, even having the Dedup feature enabled on both nodes I can't successfully start guest VMs. I needed to disable dedup and then the VMs started. Thanks for the north about dedup!

  2. Hey mate
    Thanks for your blog … u r a life saver … i almost choked to death because of the error u mentioned above …

    It caused on 7TB file share with 3 hyper v node … forgot to enable dedup on 2 nodes in cluster of 3, landed into this trouble after running CAU when nodes restarted and all cluster resources were moved ….

    i anticipated dedup behind but just wasn’t sure the issue was … thanks heaps mate … let me know if you are in AU … will be glad to meet you some day …

Leave a Reply

Your email address will not be published. Required fields are marked *