VERR_ACCESS_DENIED and BLKCACHE_IOERR using raw disk Arch Linux guest on Win10 host

Discussions related to using VirtualBox on Windows hosts.
Post Reply
josephemorgan91
Posts: 2
Joined: 27. Sep 2018, 05:05

VERR_ACCESS_DENIED and BLKCACHE_IOERR using raw disk Arch Linux guest on Win10 host

Post by josephemorgan91 »

Hey folks, I've been trying to debug this issue for weeks and I'm at the point that I think I'll need some help. I've got a working Arch Linux partition that's dual-booted with Windows 10. I would love to be able to virtualize the linux installation for quick tasks, but I've been having a really hard time getting it to work. I've followed a couple of guides and read the documentation in the VB user manual for raw disk VM's. Here's my process:
  1. From within Arch, I created a grub ISO using the contents of /usr/lib/grub/x64_efi (or very close to that) and my grub.cfg. I had to change a few settings in the grub.cfg to point to /dev/sda6 instead of the UUID, and I modified the fstab so that it wouldn't automount any other partitions.
  2. From within windows, I created a .vmdk file of my PhysicalDevice0. This is the device that both the host and guest OS's are on, but according to my research, that shouldn't be a problem provided I'm careful not to access the Windows partition.
  3. I created a new VM from within VirtualBox, using an existing virtual hard disk file (the vmdk I created in the previous step). Type was linux, version was 64-bit arch.
  4. In the virtualbox settings of my new Arch VM, I checked the box for use EFI (both systems on my machine are installed in EFI mode) and added the Grub iso as a storage device under the SATA controller.
With that setup, grub actually loads just fine when I launch the VM. I'm able to select my menuentry for Arch Linux, which seems to start off okay, but as soon as the boot message feed gets to "mounted /boot" it immediately crashes, with the following message

Code: Select all

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-0" (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
According to my research, that's usually a permissions error on Windows's side. Everything was done administrator, including launching the VM. I'm pretty much at the point where I've run out of ideas, so any suggestions would be delightful.

Here's my VboxSVC.log:

Code: Select all

VirtualBox COM Server 5.2.18 r124319 win.amd64 (Aug 14 2018 12:39:01) release log
00:00:00.005001 main     Log opened 2018-09-28T20:36:24.168046700Z
00:00:00.005001 main     Build Type: release
00:00:00.005001 main     OS Product: Windows 10
00:00:00.005001 main     OS Release: 10.0.17134
00:00:00.005001 main     OS Service Pack: 
00:00:00.015004 main     DMI Product Name: AB350-Gaming 3
00:00:00.022006 main     DMI Product Version: Default string
00:00:00.022006 main     Host RAM: 16334MB (15.9GB) total, 12264MB (11.9GB) available
00:00:00.022006 main     Executable: C:\Program Files\Oracle\VirtualBox\VBoxSVC.exe
00:00:00.022006 main     Process ID: 1332
00:00:00.022006 main     Package type: WINDOWS_64BITS_GENERIC
00:00:00.024007          VirtualBox: object creation starts
00:00:00.024007          Home directory: 'C:\Users\Joe\.VirtualBox'
00:00:00.024007          Installed Drivers:
00:00:00.028006            C:\WINDOWS\system32\DRIVERS\VBoxNetLwf.sys (Version: 5.2.18.24319)
00:00:00.029006            C:\WINDOWS\system32\DRIVERS\VBoxUSBMon.sys (Version: 5.2.18.24319)
00:00:00.029006            C:\WINDOWS\system32\DRIVERS\VBoxDrv.sys (Version: 5.2.18.24319)
00:00:00.030007            C:\WINDOWS\system32\DRIVERS\VBoxNetAdp6.sys (Version: 5.2.18.24319)
00:00:00.036009          Loading settings file "C:\Users\Joe\.VirtualBox\VirtualBox.xml" with version "1.12-windows"
00:00:00.141032          netIfIsWireless: CreateFile on '\\.\{CE75F995-2647-4C1A-B1FD-7E6858253CBA}' failed with rcWin=2 (0x2) - ignoring
00:00:00.148034          HostDnsMonitor: old information
00:00:00.148034            no server entries
00:00:00.148034            no domain set
00:00:00.148034            no search string entries
00:00:00.148034          HostDnsMonitor: new information
00:00:00.148034            server 1: 192.168.0.1
00:00:00.148034            no domain set
00:00:00.148034            no search string entries
00:00:00.148034          HostDnsMonitorProxy::notify
00:00:00.178040          VD: VDInit finished with VINF_SUCCESS
00:00:00.191043          Loading settings file "C:\Users\Joe\VirtualBox VMs\ArchVM\ArchVM.vbox" with version "1.16-windows"
00:00:00.191043          VirtualBox: object created
00:00:01.701384          Saving settings file "C:\Users\Joe\.VirtualBox\VirtualBox.xml" with version "1.12-windows"
00:00:01.716389          Saving settings file "C:\Users\Joe\.VirtualBox\VirtualBox.xml" with version "1.12-windows"
00:00:05.153253          ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={edba9d10-45d8-b440-1712-46ac0c9bc4c5} aComponent={ExtPackManagerWrap} aText={No extension pack by the name 'Oracle VM VirtualBox Extension Pack' was found}, preserve=false aResultDetail=0
00:00:05.365293          ERROR [COM]: aRC=VBOX_E_IPRT_ERROR (0x80bb0005) aIID={85cd948e-a71f-4289-281e-0ca7ad48cd89} aComponent={SessionMachine} aText={Saved screenshot data is not available (VERR_NOT_SUPPORTED)}, preserve=false aResultDetail=0
00:00:05.536293          netIfIsWireless: CreateFile on '\\.\{CE75F995-2647-4C1A-B1FD-7E6858253CBA}' failed with rcWin=2 (0x2) - ignoring
00:00:26.135451          Saving settings file "C:\Users\Joe\VirtualBox VMs\ArchVM\ArchVM.vbox" with version "1.16-windows"
Thanks a lot,
Joe
Last edited by socratis on 29. Sep 2018, 10:52, edited 1 time in total.
Reason: Fixed formatting.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: VERR_ACCESS_DENIED and BLKCACHE_IOERR using raw disk Arch Linux guest on Win10 host

Post by socratis »

You need to take the disk offline, AFAIK. I have a couple of excerpts that might help you...

To paraphrase the post from viewtopic.php?f=6&t=38914#p175089 with a real-life example:
C:\Windows\system32>diskpart

DISKPART> list disk
  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          232 GB      0 B
  Disk 1    Online          279 GB  1024 KB             <-- Mind you, THIS is my boot disk,
  Disk 2    Online          372 GB      0 B                 Disk 1, not Disk 0. Careful!!!
  Disk 3    Online          931 GB      0 B

DISKPART> select disk 0
Disk 0 is now the selected disk.

DISKPART> offline disk
DiskPart successfully offlined the selected disk.

DISKPART> list disk
  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Offline         232 GB      0 B
  Disk 1    Online          279 GB  1024 KB
  Disk 2    Online          372 GB      0 B
  Disk 3    Online          931 GB      0 B

DISKPART> attributes disk clear readonly
Disk attributes cleared successfully.

DISKPART> exit
Leaving DiskPart...

Admin>VBoxManage internalcommands listpartitions -rawdisk \\.\PhysicalDrive0
Number  Type   StartCHS       EndCHS      Size (MiB)  Start (Sect)
1       0x07  0   /1  /1   1023/254/63        238475           63
Now, you can create your VMDK...

To begin with, you're going to get an error in any event, either being Administrator or a SimpleUser. It's the error that differs:
Admin>VBoxManage internalcommands listpartitions -rawdisk \\.\PhysicalDrive0
VBoxManage.exe: error: Cannot open the raw disk: VERR_SHARING_VIOLATION

SimpleUser>VBoxManage internalcommands listpartitions -rawdisk \\.\PhysicalDrive0
VBoxManage.exe: error: Cannot open the raw disk: VERR_ACCESS_DENIED
The VERR_SHARING_VIOLATION comes up because a running process in the host is using the hard disk. You'll need to "release" it. Use the "Process Explorer" from SysInternals to see who's responsible for that. You could actually download the whole SysInternals Suite, invaluable set of tools.

In my case, I enabled the Admin mode (menu "File" » "Show Details for All Processes") and I used the menu "Find" » "Find Handle or DLL..." » "HardDisk0", and out comes OpenHardwareMonitor (to monitor the HDs temperatures, cool little tool but interfering at the moment). Exit OpenHardwareMonitor, and:
Admin>VBoxManage internalcommands listpartitions -rawdisk \\.\PhysicalDrive0
Number  Type   StartCHS       EndCHS      Size (MiB)  Start (Sect)
1       0x07  0   /1  /1   1023/254/63        238475           63
Now, you could create your VMDK...

PS. No, it's not a typo, my PhysicalDrive0 is not my boot disk, PhysicalDrive1 is.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
josephemorgan91
Posts: 2
Joined: 27. Sep 2018, 05:05

Re: VERR_ACCESS_DENIED and BLKCACHE_IOERR using raw disk Arch Linux guest on Win10 host

Post by josephemorgan91 »

Very interesting, thanks for the response. I found a thread that suggested that I try the first half of your post. If I remember correctly, I wasn't able to offline the disk because it was the disk my host was installed on, which is also my boot drive. I'll give it another shot when I get home. It seems my problem is related to my host and guest both being on the same drive, but my research indicates that I should still be able to get it to work.

Thanks for the reply,
Joe
cleanthes123
Posts: 1
Joined: 12. May 2022, 02:52

Re: VERR_ACCESS_DENIED and BLKCACHE_IOERR using raw disk Arch Linux guest on Win10 host

Post by cleanthes123 »

I ran into the same VERR_ACCESS_DENIED error after inserting the Guest Additions CD Image. Simply powering down and restart my Ubuntu VM solved the issue for me.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VERR_ACCESS_DENIED and BLKCACHE_IOERR using raw disk Arch Linux guest on Win10 host

Post by scottgus1 »

cleanthes123, thanks for posting your experience! The original problem in this post was about using Raw Disk Access on a physical disk, instead of the Guest Additions ISO. The error you saw over the GAs might come from a different reason, and a reboot probably wouldn't have fixed the op's problem.

If you'd like to explain more what the error message was or the circumstances under which you had the error, we might be able to pin down the cause better.
Post Reply