VMware Communities
nirvdrum
Contributor
Contributor
Jump to solution

Physical Disk Access Incompatible with Hyper-V?

Is there a way to access a physical disk while using the Hyper-V compatibility mode? I used to run a Linux VM through a physical disk on a Windows 10 Pro host without issues. When the Hyper-V support was added, I upgraded mostly because some software I wanted to use only ran in WSL 2. Since then, I've been unable to boot this VM, seeing the message "The physical disk is already in use." I was hoping this was just a problem with Workstation Pro 15.5, but I've just upgraded to Workstation Pro 16 and I still have the problem.

I think the relevant snippet from vmware.log is:

2020-10-02T11:47:03.777-04:00| vmx| A000: ConfigDB: Setting nvme0:0.redo = ""
2020-10-02T11:47:03.777-04:00| vmx| I005: DISK: OPEN nvme0:0 'C:\Users\nirvdrum\Documents\Virtual Machines\ripley\ripley-0.vmdk' persistent R[]
2020-10-02T11:47:03.784-04:00| vmx| I005: W32Util_DismountVolumes: Locking and dismounting volumes backed by a particular disk area (offset 0 size 1024209543168) on PhysicalDrive1...
2020-10-02T11:47:03.786-04:00| vmx| I005: W32Util_DismountVolumes: FSTCL_LOCK_VOLUME failed on volume \\?\Volume{c4d6e563-baf5-4e1a-8ca8-3a85afd5a121}: 5
2020-10-02T11:47:03.786-04:00| vmx| I005: W32Util_CloseDismountHandle: Unlocking and closing handles for 1 volumes on PhysicalDrive1...
2020-10-02T11:47:03.786-04:00| vmx| W003: DISKLIB-FLAT  : Open: Failed to dismount physical drive 1. Perhaps its volumes have open files on them?
2020-10-02T11:47:03.786-04:00| vmx| I005: DISKLIB-FLAT  : "\\.\PhysicalDrive1" : failed to open (73): .
2020-10-02T11:47:03.786-04:00| vmx| I005: DISKLIB-LINK  : "C:\Users\nirvdrum\Documents\Virtual Machines\ripley\ripley-0.vmdk" : failed to open (The physical disk is already in use). 
2020-10-02T11:47:03.786-04:00| vmx| I005: DISKLIB-CHAIN : "C:\Users\nirvdrum\Documents\Virtual Machines\ripley\ripley-0.vmdk" : failed to open (The physical disk is already in use).
2020-10-02T11:47:03.786-04:00| vmx| I005: DISKLIB-LIB   : Failed to open 'C:\Users\nirvdrum\Documents\Virtual Machines\ripley\ripley-0.vmdk' with flags 0xa The physical disk is already in use (73).
2020-10-02T11:47:03.786-04:00| vmx| I005: DISK: Cannot open disk 'C:\Users\nirvdrum\Documents\Virtual Machines\ripley\ripley-0.vmdk': The physical disk is already in use (73).

If this is supposed to work, at least I know I can find a way to fix it. If not, at least I can stop trying to debug it and start thinking about how best to use this system. Any information would be much appreciated.

Reply
0 Kudos
1 Solution

Accepted Solutions
nirvdrum
Contributor
Contributor
Jump to solution

Following up to my own post, I just discovered that if I mark the disk offline in Windows's Disk Management tool, I could then mount the disk in the VM. The VM failed when unable to write to the volume, naturally enough. But then I marked the volume online again and had no problems. So, it looks like physical disk access is still doable with Hyper-V enabled. I was worried about confounding issues, so I'm happy to see that this configuration still works. Now I need to track down why that disk was being accessed and by what. It's basically one big LUKS disk, so this will be interesting.

View solution in original post

Reply
0 Kudos
1 Reply
nirvdrum
Contributor
Contributor
Jump to solution

Following up to my own post, I just discovered that if I mark the disk offline in Windows's Disk Management tool, I could then mount the disk in the VM. The VM failed when unable to write to the volume, naturally enough. But then I marked the volume online again and had no problems. So, it looks like physical disk access is still doable with Hyper-V enabled. I was worried about confounding issues, so I'm happy to see that this configuration still works. Now I need to track down why that disk was being accessed and by what. It's basically one big LUKS disk, so this will be interesting.

Reply
0 Kudos