VirtualBox

Ticket #8760 (new defect)

Opened 3 years ago

Last modified 11 months ago

VMDK: VERR_SHARING_VIOLATION

Reported by: Alaric Owned by:
Priority: critical 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) (diff)

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

Attachments

vbox-fail.txt Download (1.0 KB) - added by Alaric 3 years ago.
Log file showing the createrawvmdk error
vbox-vmdk-raw-access-fail.txt Download (2.2 KB) - added by doctorlard 2 years ago.

Change History

Changed 3 years ago by Alaric

Log file showing the createrawvmdk error

comment:1 follow-up: ↓ 3 Changed 3 years ago by 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.

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 Changed 2 years ago by VitRom

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

comment:3 in reply to: ↑ 1 Changed 2 years ago by doctorlard

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.

Changed 2 years ago by doctorlard

comment:4 Changed 11 months ago by aeichner

  • Component changed from VMM/RAW to virtual disk
  • Description modified (diff)
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use