VirtualBox

Opened 16 years ago

Closed 9 years ago

#919 closed defect (fixed)

Unable to create a vmdk for raw drive partition (VERR_SHARING_VIOLATION) -> fixed in SVN/1.6.2

Reported by: Demon Owned by:
Component: other Version: VirtualBox 1.5.2
Keywords: Cc:
Guest type: other Host type: other

Description (last modified by aeichner)

Using Windows XP host, I was unable to create a raw vmdk for my existing linux partition.

WinXP resides in \.\PhysicalDrive0 partition 1, and Linux resides in \.\PhysicalDrive1 partitions 1,5 (main, swap).

"VBoxManage.exe internalcommands listpartitions -rawdisk \.\PhysicalDrive1" output: Number Type StartCHS EndCHS Size (MiB) Start (Sect) 1 0x83 0 /1 /1 1023/254/63 14307 63 5 0x82 1023/254/63 1023/254/63 956 29302623 3 0x07 1023/0 /1 1023/254/63 289977 31262490

The command used to create the raw vmdk: "VBoxManage.exe internalcommands createrawvmdk -filename c:\ubuntu1.vmdk -rawdisk \.\PhysicalDrive1 -partitions 1,5"

Output:

ERROR: VMDK: could not create new partition data file 'c:\ubuntu1-pt.vmdk' Error code VERR_SHARING_VIOLATION at E:\vbox\1.5-w32-rel\src\VBox\Devices\Storag e\VmdkHDDCore.cpp(2224) in function vmdkCreateImage Error while creating the raw disk VMDK: VERR_SHARING_VIOLATION

Change History (16)

comment:1 by Sander van Leeuwen, 16 years ago

priority: blockercritical

comment:2 by ouci, 16 years ago

Exactly the same problem here, although I am a complete newbie with this, I had encountered exactly the same error message.

comment:3 by ouci, 16 years ago

Forgot to mention, I was also trying to make a vmdk to use 2 partitions, one is ext3 the other swap.

comment:4 by grassvalley, 16 years ago

I has the same error.

Host is windows2000server,I want to mount a ext3 partition and a swap partition.

comment:5 by ldoubleu, 16 years ago

I have the same problem. I upgraded to version 1.5.4 but the problem remains the same. Host is Windows XP Home.

comment:6 by gourmet, 16 years ago

I confirm this problem. Tried create vmdk file for Linux partitions (reiserfs and swap):

E:\Program Files\innotek VirtualBox>VBoxManage internalcommands createrawvmdk -filename F:\LIN.vmdk -rawdisk \.\PhysicalDrive0 -partitions 9,11 -register
VirtualBox Command Line Management Interface Version 1.5.6
(C) 2005-2008 innotek GmbH
All rights reserved.

ERROR: VMDK: could not create new partition data file 'c:\LIN-pt.vmdk'
Error code VERR_SHARING_VIOLATION at C:\vbox\branch\w32-1.5\src\VBox\Devices\Storage\VmdkHDDCore.cpp(2224) in function vmdkCreateImage
Error while creating the raw disk VMDK: VERR_SHARING_VIOLATION

notice about version 1.5.6 - problem persists from earlier versions

PLEASE SOLVE THIS!!'''

comment:7 by Sander van Leeuwen, 16 years ago

Summary: Unable to create a vmdk for raw drive partition (VERR_SHARING_VIOLATION)Unable to create a vmdk for raw drive partition (VERR_SHARING_VIOLATION) -> fixed in SVN/1.6.2

Should be fixed in 1.6.2.

comment:8 by Sander van Leeuwen, 16 years ago

Resolution: fixed
Status: newclosed

comment:9 by Thomas Schweikle, 14 years ago

With 3.1.2 this error is up again. I've tried to search for a newer ticket, but only found this one. Seems to be a regression if it had worked time before ...

comment:10 by Thomas Schweikle, 14 years ago

Here is what the command exausts:

C:\prgs\Sun\VirtualBox\VBoxManage.exe internalcommands listpartitions -rawdisk \.\PhysicalDrive0
VirtualBox Command Line Management Interface Version 3.1.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Error opening the raw disk: VERR_SHARING_VIOLATION

With whole disk access:

C:\prgs\Sun\VirtualBox\VBoxManage.exe internalcommands createrawvmdk -filename kiwi0.vmdk -rawdisk \.\PhysicalDrive0
VirtualBox Command Line Management Interface Version 3.1.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Error opening the raw disk '\.\PhysicalDrive0': VERR_SHARING_VIOLATION
The raw disk vmdk file was not created

And only partitions I would wish to have access to:

C:\prgs\Sun\VirtualBox\VBoxManage.exe internalcommands createrawvmdk -filename kiwi0.vmdk -rawdisk \.\PhysicalDrive0 -partitions 1,4
VirtualBox Command Line Management Interface Version 3.1.2
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Error opening the raw disk '\.\PhysicalDrive0': VERR_SHARING_VIOLATION
The raw disk vmdk file was not created

Maybe we could reopen this ticket?

comment:11 by Andrew, 14 years ago

Resolution: fixed
Status: closedreopened

This problem still exists in VB 3.1.6

Windows XP Pro SP3

Requesting a re-open on the bug.

comment:12 by Andrew, 14 years ago

Got a response from the bug tracker about a change being checked in for 1.6.2 ...

We _are_ talking about a bug in the 3.x.x series, right?

I've just confirmed the problem still exists in VBox 3.2.0.

Thanks for any help you folks can provide.

comment:13 by Max Vohlken, 14 years ago

I'm having a similar problem on Windows 7 64bit.

C:\Program Files\Sun\VirtualBox>VBoxManage.exe internalcommands listpartitions -rawdisk \.\PhysicalDrive2 Sun VirtualBox Command Line Management Interface Version 3.1.4 (C) 2005-2010 Sun Microsystems, Inc. All rights reserved.

Error opening the raw disk: VERR_SHARING_VIOLATION

I've tried both VirtualBox-3.1.4-57640-Win and VirtualBox-3.2.4-62467-Win.

I also get the same error trying to run createrawvmdk.

I wonder if this is something misconfigured on my machine. Any suggestions on how to debug would be appreciated.

comment:14 by Christian Rilke, 9 years ago

I can confirm this for 4.3.26 running at Windows 7 SP1 x64. I tried

C:\Program Files\Oracle\VirtualBox>VBoxManage internalcommands listpartitions -rawdisk \\.\PhysicalDrive0
VBoxManage.exe: error: Cannot open the raw disk: VERR_SHARING_VIOLATION

and

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe internalcommands createrawvmdk -filename E:\VMs\LinuxRAW.vmdk -rawdisk \\.\PhysicalDrive0 -partitions 3,4,5
VBoxManage.exe: error: Cannot open the raw disk '\\.\PhysicalDrive0': VERR_SHARING_VIOLATION VBoxManage.exe: error: The raw disk vmdk file was not created

The target partitions and the windows partitions share the same physical disk (PhysicalDrive0).

comment:15 by Christian Rilke, 9 years ago

This bug still exists in version 4.3.28 r100309.

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe internalcommands createrawvmdk -filename "C:\Users\CR\Documents\Virtual Machines\LinuxRAW.vmdk" -rawdisk "\\.\PhysicalDrive0" -partitions 3,4,5
VBoxManage.exe: error: Cannot open the raw disk '\\.\PhysicalDrive0': VERR_SHARING_VIOLATION
VBoxManage.exe: error: The raw disk vmdk file was not created

Disk0 ist the disk Windows and VirtualBox running from but from diffrent partitions.

comment:16 by aeichner, 9 years ago

Description: modified (diff)
Resolution: fixed
Status: reopenedclosed

Should be fixed with VBox 5.0, see #14268. Any remaining issues regarding raw disk access on Windows should go there.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use