VirtualBox

Ticket #14425 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

raw disk access not working on Windows 10 amd64

Reported by: chryana Owned by:
Priority: major Component: virtual disk
Version: VirtualBox 5.0.0 Keywords: raw disk access
Cc: Guest type: all
Host type: Windows

Description

Using VirtualBox 5.0.x revision 101957 on a Windows 10 amd64 Professional host, I cannot get raw access to some of the partitions on my hard disk, which I was able to get access to on Windows 7 x64 Ultimate, with VirtualBox 4.3.? (a recent 4.3.x build). I had setup two vmdks, one to access two partitions on my system drive (the one Windows is on), and a separate one to access the partition on a separate hard disk (there is only one partition on that disk, Windows doesn't use that disk at all). The boot process fails immediately if I try to boot with the vmdk to access the two partitions on my Windows drive, with the following error messages:

Failed to open a session for the virtual machine debian 64.
VD: error VERR_NOT_SUPPORTED opening image file 'C:\Users\user\VirtualBox VMs\debian 64\systemdrive.vmdk' (VERR_NOT_SUPPORTED).
VD: error VERR_ACCESS_DENIED opening image file 'C:\Users\user\VirtualBox VMs\debian 64\systemdrive.vmdk' (VERR_ACCESS_DENIED).
Failed to open image 'C:\Users\user\VirtualBox VMs\debian 64\systemdrive.vmdk' in read-write mode (VERR_ACCESS_DENIED).
Failed to attach driver below us! Access denied. (VERR_ACCESS_DENIED).
AHCI: Failed to attach drive to Port3 (VERR_ACCESS_DENIED).
Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

If I detach the offending vmdk, and boot with the vmdk to access a separate hard drive, the vm boots fine, as long as I do not access the separate hard drive. Since it's a Linux guest, I mount the separate drive, but as soon as I try to access the data on that drive, the guest hangs.

I have attached the VirtualBox logs. VBox.log is the log produced by trying to boot with two attached partitions from the host drive, and VBox.log.2 is the log produced by the vm crashing trying to load the data on a separate disk.

Attachments

VBox.log Download (35.7 KB) - added by chryana 2 years ago.
log of vm crashing with partitions from host drive attached
VBox.log.2 Download (125.9 KB) - added by chryana 2 years ago.
log of vm crashing trying to load data on separate hard drive
Vbox Logs for 14425.zip Download (391.9 KB) - added by FrederikB 2 years ago.
5 different VB logs folders 4.3.30 to 5.0.1 Win8 and Win10
diskmanagement.png Download (46.1 KB) - added by chryana 2 years ago.
disk management screenshot
systemdrive.vmdk Download (1.0 KB) - added by chryana 2 years ago.
systemdrive.vmdk
systemdrive-pt.vmdk Download (157.5 KB) - added by chryana 2 years ago.
systemdrive-pt.vmdk
storage.vmdk Download (641 bytes) - added by chryana 2 years ago.
storage.vmdk
VBox-5.0.3-102322-OSX.log Download (38.0 KB) - added by binky 2 years ago.
VBox.log from 5.0.3 r102322 OSX

Change History

Changed 2 years ago by chryana

log of vm crashing with partitions from host drive attached

Changed 2 years ago by chryana

log of vm crashing trying to load data on separate hard drive

comment:1 Changed 2 years ago by chryana

Tested with revision 102010. No change.

comment:2 Changed 2 years ago by aeichner

Can you please post you disk configuration as it can be seen from the Windows Disk management tool? I don't have problems at all here on Windows 10. In fact without the additional fixes we made to protect the disk against concurrent access by the host it is not possible for me to access the disk from inside the guest.

comment:3 Changed 2 years ago by aeichner

And having the vmdk descriptor files would be great too.

comment:4 Changed 2 years ago by FrederikB

So this for sure is not a Win10 issue (I've gone through that phase see the page 10-11 in the forum for Windows10 hosts) but a 5.0.1 or maybe 5.0.0 issue - it occurs on my (rolled back from Win10) Win 8.1 installation. Specifically happening maybe/probably with Linux guests.

The mixup with Win10 is that you need VB5.0.1 to get the bridged networking, which is a must since my linux guest needs it own fixed IP address. Functionally 5.0.1 was OK apart from the physical disk I have included a zip file with:

  • 0 - VB 5.0.1 on Win10
  • 1. - VB 5.0.1 after roll back to Win 8.1 (errors)
  • 2. - VB 4.3.30 after deinstall 5.0.1 on Win 8.1 (OK)
  • 3a. - VB 5.0.0 after upgrade from 4.3.30 on Win 8.1 (OK)
  • 4. - VB 5.0.1 after upgrade from 5.0.0 (errors)
  • 3b VB 5.0.0 after deinstall of 5.0.1 - reinstall of 4.3.30 and upgrade (error)

All folders have the physical/raw isk definitions used in the VM.

I have now 4.3.30 running fine again (3d installation, as in log nr 2). Included an image of the disks from the computer management as well as a diskpart display. All disks are online since all in use - 0,1 and 4 by Linux and 2+3 by Windows. Disk3 is actually a new Win10 install to which I can decide to boot (not an upgrade from Win8). Windows sometimes reshuffles disks after boot but I know how to handle that. No worreis at this time.

BTW the initial test on Win10 failed since my VM gave an error on a non existing swap partition. I have fixed that by entering Manual boot and changed the swap partition mounting as in the article on  http://ubuntuforums.org/showthread.php?t=2164313

Changed 2 years ago by FrederikB

5 different VB logs folders 4.3.30 to 5.0.1 Win8 and Win10

comment:5 Changed 2 years ago by chryana

OK, I've just tested the issue with the latest release version available 5.0.2 102096 (oddly newer than the latest test build), and raw disk access works again. I think the issue is resolved. I'm sorry for not replying earlier, I was expecting to get an email when someone would look at this issue. In any case, I think you can close it. Thank you very much for looking at it so fast.

comment:6 Changed 2 years ago by aeichner

The issue is only fixed because we backed out the changes for Windows before the release. The underlying problem is still not resolved and having the above requested information would help to fix this.

comment:7 Changed 2 years ago by chryana

I spoke too fast, far too fast... I am going to give you what you requested, but I would still like to mention the new issue I am experiencing (VBox 5.0.2r102096, Windows 10 x64 Pro host, debian 64 guest). When I mount the separate hard drive on my guest, it mounts fine. I use a share on the guest to view files from the Windows 10 host. From my window on the host, listing directories goes well, but if I try to open a video to view it on the host, I get the following error.

An error has occurred during virtual machine execution! The error details are shown below. You may try to correct the error and resume the virtual machine execution.



The I/O cache encountered an error while updating data in medium "ahci-0-4" (rc=VERR_ACCESS_DENIED). Make sure there is enough free space on the disk and that the disk is working properly. Operation can be resumed afterwards.

Error ID: BLKCACHE_IOERR
Severity: Non-Fatal Error

The guest is paused by this error. If I try to resume the VM, I get the same error repeatedly. I have to power the guest off. If that's any help, the host cannot modify the content of the directory on the guest, because it doesn't have modify rights on anything, and the share is read-only anyways in Samba.

Changed 2 years ago by chryana

disk management screenshot

comment:8 Changed 2 years ago by chryana

I am connecting to the first two logical partitions in the screenshot. The two other logical partitions are not used by VirtualBox. Here is the output of list partition in Windows diskpart for disk 0

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Recovery            20 GB  1024 KB
  Partition 2    Primary            100 MB    20 GB
  Partition 3    Primary           1702 GB    20 GB
  Partition 0    Extended           140 GB  1723 GB
  Partition 4    Logical            100 GB  1723 GB
  Partition 5    Logical             10 GB  1823 GB
  Partition 6    Logical             20 GB  1833 GB
  Partition 7    Logical              9 GB  1853 GB

I am connecting partitions 4 and 5.

Just so I am thorough, here is the partition table for disk 1...

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Unknown           3726 GB  1024 KB

Now for list volume

DISKPART> list volume

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     D                       DVD-ROM         0 B  No Media
  Volume 1         SYSTEM RESE  NTFS   Partition    100 MB  Healthy    System
  Volume 2     C                NTFS   Partition   1702 GB  Healthy    Boot
  Volume 3                      RAW    Partition    100 GB  Healthy
  Volume 4                      RAW    Partition     10 GB  Healthy
  Volume 5                      RAW    Partition     20 GB  Healthy
  Volume 6                      RAW    Partition      9 GB  Healthy
  Volume 7         PQSERVICE    NTFS   Partition     20 GB  Healthy    Hidden
  Volume 8     K                       Removable       0 B  No Media
  Volume 9     L                       Removable       0 B  No Media
  Volume 10    M                       Removable       0 B  No Media
  Volume 11    N                       Removable       0 B  No Media
  Volume 12    O                       Removable       0 B  No Media

volumes are 3 and 4.

From vboxmanage

C:\Program Files\Oracle\VirtualBox>vboxmanage internalcommands listpartitions -rawdisk \\.\PhysicalDrive0
Number  Type   StartCHS       EndCHS      Size (MiB)  Start (Sect)
1       0x27  0   /32 /33  1023/254/63         20480         2048
2       0x07  1023/254/63  1023/254/63           100     41945088
3       0x07  1023/254/63  1023/254/63       1743785     42149888
5       0x07  1023/254/63  1023/254/63        102400   3613423616
6       0x06  1023/254/63  1023/254/63         10240   3823140864
7       0x07  1023/254/63  1023/254/63         20480   3844114432
8       0x06  1023/254/63  1023/254/63         10238   3886059520

I suppose I created the vmdk files in this case with the commands

vboxmanage internalcommands createrawvmdk -filename c:\temp\systemdrive.vmdk -rawdisk \\.\PhysicalDrive0 -partitions 5,6
vboxmanage internalcommands createrawvmdk -filename c:\temp\systemdrive.vmdk -rawdisk \\.\PhysicalDrive1

or something similar. I am now going to upload those files...

Edit: added partition list for disk 1 (secondary hard disk, not used by Windows).

Last edited 2 years ago by chryana (previous) (diff)

Changed 2 years ago by chryana

systemdrive.vmdk

Changed 2 years ago by chryana

systemdrive-pt.vmdk

Changed 2 years ago by chryana

storage.vmdk

comment:9 Changed 2 years ago by chryana

I think I have posted all that you requested. Let me know if you need anything else. I'll check this ticket from time to time, so hopefully I should notice if you add a comment a bit faster next time.

Edit: spelling

Last edited 2 years ago by chryana (previous) (diff)

comment:10 Changed 2 years ago by alexpk

I would just like to add that this does not seem to be a windows specific problem. I am using a debian guest one an OSX system, where one disk is also a raw disk, and I experience the same problems a described above.

comment:11 Changed 2 years ago by aeichner

There was an unrelated regression introduced in the current maintenance release which caused accessed raw disks to be opened readonly even if read/write access was desired. Will be fixed in the next maintenance release. Please try the following test builds:

Windows: https://www.virtualbox.org/download/testcase/VirtualBox-5.0.3-102166-Win.exe
OS X: https://www.virtualbox.org/download/testcase/VirtualBox-5.0.3-102165-OSX.dmg

Last edited 2 years ago by aeichner (previous) (diff)

comment:12 follow-up: ↓ 13 Changed 2 years ago by chryana

OK, I just tested the build you asked me to try, and I confirm raw disk access now works well, as far as I can see. Thank you very much for you help, and for taking care of this issue so quickly.

comment:13 in reply to: ↑ 12 Changed 2 years ago by FrederikB

Replying to chryana: From my side: Physical Raw disk works HURRAY!; networking works; sound works (even through remote desktop to the VM; SAMBA works; so far no issues seem to remain. Congrats and thanks a lot. Seems this ticket can be closed. Next station Win10 again.

(Edit and slightly off topic) after upgrading again to Win10 found that the 5.0.3 broke the bridged networking again. Can't test the raw disk access under win10 at this time. Rollback to Win8.1

Last edited 2 years ago by FrederikB (previous) (diff)

comment:14 Changed 2 years ago by mhartgring

Even with 5.0.3 this is still a problem on OSX 10.10.5.

comment:15 Changed 2 years ago by binky

I can confirm that this is still a problem with OSX 10.10.5 host, even with 5.0.3-102165-OSX mentioned above, as well as the latest test build (as of today), 5.0.3-102322-OSX. See attachment VBox-5.0.3-102322-OSX.log.

Changed 2 years ago by binky

VBox.log from 5.0.3 r102322 OSX

comment:16 Changed 2 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fix is part of VBox 5.0.4. For other hosts than Windows please open a separate ticket.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use