VirtualBox

Opened 9 years ago

Last modified 3 years ago

#14461 reopened defect

Raw disk VM gives ahci-0-0 BLKCACHE_IIOERR if block cache turned off on VirtualBox 5.0.1 and later => fixed in SVN/5.0.x

Reported by: Laurence 'GreenReaper' Parry Owned by:
Component: virtual disk Version: VirtualBox 5.0.2
Keywords: block cache BLKCACHE_IIOERR raw disk Cc:
Guest type: all Host type: Windows

Description

VirtualBox builds 5.0.2-102096 and 5.0.1-102010 fail to run correctly a full-raw-disk-based virtual machine that 5.0.0-101573 loads correctly. The failure occurs when the "Use Host I/O Cache" option (StorageController: useHostIOCache) is off for the controller of the raw VMDK.

This is the case even though VirtualBox is being run as an administrator, which I've found required for it to work with raw disks at all. Maybe something changed about what process accessed the drive?

The machine doesn't die straight away, but immediately after the initrd system loads up - the "Root: clean" line of fsck is printed (there are many things that happen just after that, so I don't want to imply it's part of fsck) - it freezes and a message is printed:


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


The log also mentions "Invalid machine state Paused when checking if the guest entered the ACPI mode".


ERROR [COM]: aRC=VBOX_E_INVALID_VM_STATE (0x80bb0002) aIID={872da645-4a9b-1727-bee2-5585105b9eed} aComponent={ConsoleWrap} aText={Invalid machine state Paused when checking if the guest entered the ACPI mode)}, preserve=false aResultDetail=0 00:00:10.967017 Console: Machine state changed to 'Stopping'


Host is Windows Vista 32-bit, guest is Debian 8.x 64-bit (though I figure it probably doesn't matter so I left the type as 'all'). The controller is the LSI logic, listed as "AHCI" in the GUI.

Attached are logs from when the files work, and when they don't, and the vmdk and vbox in question.

Attachments (7)

VBox-5.0.2-NoOSCache.log (126.2 KB ) - added by Laurence 'GreenReaper' Parry 9 years ago.
Log when OS cache is turned off
VBox-5.0.2-OSCache.log (130.2 KB ) - added by Laurence 'GreenReaper' Parry 9 years ago.
Log when OS cache is turned on
Inkbunny.vbox (20.4 KB ) - added by Laurence 'GreenReaper' Parry 9 years ago.
VBox file
Inkbunny.vmdk (663 bytes ) - added by Laurence 'GreenReaper' Parry 9 years ago.
Full raw-disk VMDK
SAS-PhysicalDrive5-14tb.vmdk (549 bytes ) - added by cheater 3 years ago.
vmdk of the 14tb drive that doesn't work under VBox 6.1.22
SAS-PhysicalDrive0.vmdk (549 bytes ) - added by cheater 3 years ago.
a drive where writing does work under 6.1.22
linux_only.vmdk (820 bytes ) - added by cheater 3 years ago.
Another vmdk where writing under 6.1.22 does work without Host I/O Cache enabled. Bear in mind this creates raw access to one partition only.

Download all attachments as: .zip

Change History (20)

by Laurence 'GreenReaper' Parry, 9 years ago

Attachment: VBox-5.0.2-NoOSCache.log added

Log when OS cache is turned off

by Laurence 'GreenReaper' Parry, 9 years ago

Attachment: VBox-5.0.2-OSCache.log added

Log when OS cache is turned on

by Laurence 'GreenReaper' Parry, 9 years ago

Attachment: Inkbunny.vbox added

VBox file

by Laurence 'GreenReaper' Parry, 9 years ago

Attachment: Inkbunny.vmdk added

Full raw-disk VMDK

comment:1 by aeichner, 9 years ago

Summary: Raw disk VM gives ahci-0-0 BLKCACHE_IIOERR if block cache turned off on VirtualBox 5.0.1 and laterRaw disk VM gives ahci-0-0 BLKCACHE_IIOERR if block cache turned off on VirtualBox 5.0.1 and later => fixed in SVN/5.0.x

Will be fixed in the next maintenance release, please try the following test build:

https://www.virtualbox.org/download/testcase/VirtualBox-5.0.3-102166-Win.exe

comment:2 by Frank Mehnert, 9 years ago

Resolution: fixed
Status: newclosed

Fix is part of VBox 5.0.4.

comment:3 by Laurence 'GreenReaper' Parry, 8 years ago

Sorry about that, I hadn't set up email notification. Thanks for the fix, appreciated! :-D

comment:4 by npradeep357, 6 years ago

I recently tried to use the raw disk feature and got the same issue.

virtual box version i used: 5.2.12 r122591 (Qt5.6.2) usb: HP 32 GB

comment:5 by npradeep357, 6 years ago

Resolution: fixed
Status: closedreopened

comment:6 by npradeep357, 6 years ago

Host details: Windows 10 enterprise version 1607 os build: 14393.2248

comment:7 by Socratis, 6 years ago

@npradeep357

You also posted on #16454, and as I told you, head to the forums. No need to open previously closed tickets, just because they mention "raw disk". And you can't be having both BLKCACHE_IIOERR, which it what this ticket is about, *and* VERR_ACCESS_DENIED, which is what #16454 is about.

comment:8 by aeichner, 4 years ago

Resolution: fixed
Status: reopenedclosed

comment:9 by cheater, 3 years ago

Resolution: fixed
Status: closedreopened

Update: after unmounting and remounting the partition, the data I copied onto is gone. Therefore, enabling "Use Host I/O Cache" is actually not a workaround - the data still isn't written, it just gets lost silently. I am closing the bug again and opening a new one.

Bearing in mind @socratis warning, I have to reopen the issue. It has reappeared recently for me. I had been using vbox 6.1.15 on Windows 10 host (updated to latest non-insider version which is 21H1, build 19043.1081) with a Ubuntu 20.04 guest. Recently, I tried using it with a 14 TB WDC WD140PURZ-850A82 (Western Digital Purple 14TB mechanical SATA drive) connected via a Perc H310 SAS controller. It is completely new and I created a single partition on it spanning the whole disk. I formatted it to NTFS using Windows 10 and put it offline, then created a VMDK using

PS C:\WINDOWS\system32> & 'C:\Program Files\Oracle\VirtualBox\VBoxManage.exe' internalcommands createrawvmdk -filename C:\VirtualBox\SAS-PhysicalDrive5-14tb.vmdk -rawdisk \\.\PhysicalDrive5

and then set it to write-through under the VBox gui. Finally I hooked it up to a SATA AHCI controller with 16 ports. The "Use Host I/O Cache" box was originally empty (unchecked), and I would get the exact same error as pointed out in the original post:

The I/O cache encountered an error while updating data in medium "ahci-0-4" (rc=VERR_WRITE_PROTECT). 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

What's weird is that there are other drives, also from the same drive family and on the same controller, which don't have the same issue. But they're linux formatted (either ext4 or btrfs) and also smaller (less than 10 TB).

If I turn on "Use Host I/O Cache", I am able to write to the disk. However, two issues remain still:

  1. performance is very, very poor. On the order of 20 MB/sec. These drives are capable of 150 MB/sec when used under the Windows 10 host on the same controller.
  1. if I type sync in the guest, it takes > 5 minutes, and meanwhile hangs up all disk IO

Things I tried include:

  • formatting the disk again. Didn't help
  • I tried whether writing to the disk works when it's hooked up to the host (and not offlined). It works.

Finally, I am always running vbox as admin, which is required in order for raw disk access to work in the first place, for all drives, even the ones where writing to disk does work.

Last edited 3 years ago by cheater (previous) (diff)

comment:10 by cheater, 3 years ago

Forgot to add, I updated to 6.1.22 with no improvement.

Last edited 3 years ago by cheater (previous) (diff)

comment:11 by cheater, 3 years ago

Could someone please change the title to indicate that the bug exists in 6.1.22 and that it's not fixed in SVN?

by cheater, 3 years ago

vmdk of the 14tb drive that doesn't work under VBox 6.1.22

by cheater, 3 years ago

Attachment: SAS-PhysicalDrive0.vmdk added

a drive where writing does work under 6.1.22

by cheater, 3 years ago

Attachment: linux_only.vmdk added

Another vmdk where writing under 6.1.22 does work without Host I/O Cache enabled. Bear in mind this creates raw access to one partition only.

comment:12 by cheater, 3 years ago

Added VMDKs:

SAS-PhysicalDrive5-14tb.vmdk - affected drive, 14TB, NTFS, WD Purple mechanical drive, Perc H310 SAS controller, under VBox it's under a SATA AHCI controller.

SAS-PhysicalDrive0.vmdk - drive not affected, writing works fine, also WD Purple, same SAS controller, size < 10TB, ext4, same SATA AHCI controller in VBox.

linux_only.vmdk - drive not affected, single partition out of a larger drive, partition on an M.2 PCIE SSD, same SATA AHCI controller in VBox.

comment:13 by cheater, 3 years ago

Please close the ticket again, thank you.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use