Page 1 of 1

Windows 7 64: VERR_SHARING_VIOLATION creating raw vmdk

Posted: 3. Nov 2009, 03:28
by pgeek
When trying to create a .vmdk file to use a physical partition, VBoxManage returns one of the following errors, depending on being run as a normal user or an administrator:

>VBoxManage.exe internalcommands createrawvmdk -filename path.to.vmdk -rawdisk \\.\PhysicalDrive0

Error opening the raw disk '\\.\PhysicalDrive0': VERR_ACCESS_DENIED

Error opening the raw disk '\\.\PhysicalDrive0': VERR_SHARING_VIOLATION

\\.\PhysicalDrive0 is used to boot and run Windows, so I can imagine it won't easily allow access to it. The same error is thrown if the -partitions argument is provided. Is there any known workaround for this issue, or is a second hard drive required to pull it off?

Also tried using an existing VMWare vmdk for the same physical drive, but could only get a VERR_VD_IMAGE_READ_ONLY error when booting the virtual machine.

Running VirtualBox 3.0.10 on a Windows 7 64bit host. Any insight would be appreciated.

Re: Windows 7 64: VERR_SHARING_VIOLATION creating raw vmdk

Posted: 3. Nov 2009, 04:15
by Perryg
There may be a regression issue in this version. You can downgrade to version 3.0.8 and wait for the next release (newer than 54097) and see if this fixes your problem.

Re: Windows 7 64: VERR_SHARING_VIOLATION creating raw vmdk

Posted: 3. Nov 2009, 22:52
by pgeek
Actually I had an instance of a VMWare virtual machine running in the background, using the physical drive. Stopping VMWare allowed me to create the disk and use it in VirtualBox.

Will now try to overcome the hurdles of new drive UUIDs and undetected SATA drives on the guest OS.

Thanks for the quick reply and my apologies for my lack of thoroughness while troubleshooting.

EDIT: I actually stepped into a problem similar to this (not being able to mount the partitions) and while trying to access the partitions using a full physical drive vmdk, ended up clearing my partition table. Not good. Managed to recover, and will now try 3.0.8 to see if there's an actual regression. Posted as a sort of warning for others who might be involved in similar experiments.