I have a Linux guest on a Win7 VMWare Workstation host. I route physical drives from the host directly into the VM. I've noticed in the vmdk for these disks that the mapping in the vmdk to a physical drive is done by drive identity (i.e., a number from 0-6). This number matches what you see in disk manager on the host.

I would like to not use drive number, and instead use the ID for the drive (UUID), so that if the ordering of the drives changes, the correct mapping is maintained.

The motivation for this type of solution comes from the problem stated in this post: SATA drive order get scrambled on reboot; Windows 7 / Asus P5Q MB

Is there a way to edit this section of he vmdk file in order for this to happen?

# Extent description
RW 1953525168 FLAT "\\.\PhysicalDrive2" 0

I would like to change PhysicalDrive2 to PhysicalDrive{UUID}, or something VMWare Workstation interprets to mean this.

EDIT: Also posted the question on VMWare Communities: http://communities.vmware.com/message/1986851#1986851

  • THose names are decide by Microsoft... (It is the Windows equivalent to Linux's /dev/sda)... It might be that VMware provides a different way to address the disk than by its device file, or that Windows have some aliases for them which is less likely to change... Jan 9, 2013 at 5:34

1 Answer 1


The Windows device names are actually quite flexible: like Linux and its system of /dev/disk/by-uuid symlinks, Windows has its own UUID addressing system.

Grab a copy of WinObjEx64 and navigate to GLOBAL?? -- this is where the devices in \\.\ come from.1 You will see that PhysicalDrive1 is actually a symlink to something like \Device\HardDisk1\DR11. If you look through the other symlinks, you will find that a certain Disk{23e4567-e89b-12d3-a456-426614174000} points to the same place. That is a UUID of the disk, and it will persist after device removal and reboot. It is unfortunately different from what diskpart will tell you.

But we aren't here to nerd over which UUID to use. We are here to get stuff to work. Just replace your extent description line with:2

RW 1953525168 FLAT "\\.\Disk{23e4567-e89b-12d3-a456-426614174000}" 0

and it should work. It did work in my VirtualBox raw disk image (yes, VBox uses VMDK to access raw disks), for what is worth.

1 Technically \\.\ points to \DosDevices\, which is a symlink to \??\, the local device directory. What's in the local directory can deviate from the contents of the global one depending on the drives you have mapped. \\?\GLOBALROOT is the unambiguously global location.

2 You would think that \\?\Disk{... is the correct location, but VirtualBox rejects it and tells me the location is inaccessible.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .