VirtualBox

Opened 13 years ago

Last modified 5 years ago

#8760 reopened defect

VMDK: VERR_SHARING_VIOLATION — at Version 4

Reported by: Alaric Owned by:
Component: virtual disk Version: VirtualBox 4.0.6
Keywords: VERR_SHARING_VIOLATION Windows7 rawdisk physicaldrive Cc:
Guest type: Linux Host type: Windows

Description (last modified by aeichner)

When running in an administrator command line and attempting to create virtual drives from raw disks under a windows 7 host, vboxmanage fails with this error message. I was previously able to use these commands to mount my ubuntu partition under virtualbox on a windows XP host.

Regards, Alaric

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe internalcommands listpartition s -rawdisk \.\PhysicalDrive0 Number Type StartCHS EndCHS Size (MiB) Start (Sect) 5 0x83 0 /2 /1 29 /254/63 235 126 6 0x82 30 /1 /1 333 /254/63 2384 482013 7 0x83 334 /1 /1 1023/254/63 18119 5365773 8 0x83 1023/254/63 1023/254/63 17406 42475520 2 0x07 1023/254/63 1023/254/63 114470 78124095

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe internalcommands createrawvmdk

-filename "c:\Users\alaric\mydrive.vmdk" -rawdisk \.\PhysicalDrive0 -partition

s 5,6,7,8 VBoxManage.exe: error: VMDK: could not open raw partition file '\.\PhysicalDriv e0' VBoxManage.exe: error: Error code VERR_SHARING_VIOLATION at D:\tinderbox\win-4.0 \src\VBox\Storage\VMDK.cpp(3762) in function vmdkCreateRawImage VBoxManage.exe: error: Cannot create the raw disk VMDK: VERR_SHARING_VIOLATION VBoxManage.exe: error: The raw disk vmdk file was not created

Change History (6)

by Alaric, 13 years ago

Attachment: vbox-fail.txt added

Log file showing the createrawvmdk error

comment:1 by Chris Johnson, 13 years ago

I can confirm this error on Windows 7. This is a real problem for me because I have a web server that needs to stay up running in Windows, but I need to do some work in Ubuntu. However, it's currently completely broken.

Base command output:

c:\Program Files\Oracle\VirtualBox>VBoxManage internalcommands createrawvmdk -filename C:\ubuntu.vdmk -rawdisk \.\PhysicalDrive0
VBoxManage.exe: error: Cannot open the raw disk '\.\PhysicalDrive0': VERR_SHARING_VIOLATION
VBoxManage.exe: error: The raw disk vmdk file was not created

With my partition options:

c:\Program Files\Oracle\VirtualBox>VBoxManage internalcommands createrawvmdk -fi
lename C:\Users\Michael\Documents\ubuntu.vmdk -rawdisk \.\PhysicalDrive0 -partitions 2,5
VBoxManage.exe: error: Cannot open the raw disk '\.\PhysicalDrive0': VERR_SHARING_VIOLATION
VBoxManage.exe: error: The raw disk vmdk file was not created

So yeah, raw disk access is totally broken, and it seems that it has been now for over a year since the defect resurfaced: http://www.virtualbox.org/ticket/919

comment:2 by VitRom, 13 years ago

The same happens on every VB versions including 4.1.4
with any of the "raw"-class commands on PhysicalDrive0,
even with absolutely safe (for any healthy mind) listpartitions

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

in reply to:  1 comment:3 by Jonathan, 12 years ago

Replying to Javaguru:

I can confirm this error on Windows 7. This is a real problem for me because I have a web server that needs to stay up running in Windows, but I need to do some work in Ubuntu. However, it's currently completely broken.

I was also happily using my Ubuntu VM on a Windows 7 host (I had to run VirtualBox as admin), using a VMDK image pointing at a raw EXT4 partition on disk, until it stopped working around June 2011. I don't know whether that was because of a Microsoft security update where they may have changed the access level around raw disk access (perhaps to counter Ring 0 exploits) or whether it was an update of VirtualBox that has stopped working. Pertinent bits from the log attached.

Attempts from both user and admin prompts to re-create the raw disk access VMDK image or even just to run listpartitions now result in:

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

Which used to execute successfully before.

by Jonathan, 12 years ago

comment:4 by aeichner, 11 years ago

Component: VMM/RAWvirtual disk
Description: modified (diff)
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use