VirtualBox

Ticket #14461 (reopened defect)

Opened 7 years ago

Last modified 14 months ago

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: GreenReaper 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

VBox-5.0.2-NoOSCache.log Download (126.2 KB) - added by GreenReaper 7 years ago.
Log when OS cache is turned off
VBox-5.0.2-OSCache.log Download (130.2 KB) - added by GreenReaper 7 years ago.
Log when OS cache is turned on
Inkbunny.vbox Download (20.4 KB) - added by GreenReaper 7 years ago.
VBox file
Inkbunny.vmdk Download (663 bytes) - added by GreenReaper 7 years ago.
Full raw-disk VMDK
SAS-PhysicalDrive5-14tb.vmdk Download (549 bytes) - added by cheater 14 months ago.
vmdk of the 14tb drive that doesn't work under VBox 6.1.22
SAS-PhysicalDrive0.vmdk Download (549 bytes) - added by cheater 14 months ago.
a drive where writing does work under 6.1.22
linux_only.vmdk Download (820 bytes) - added by cheater 14 months 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.

Change History

Changed 7 years ago by GreenReaper

Log when OS cache is turned off

Changed 7 years ago by GreenReaper

Log when OS cache is turned on

Changed 7 years ago by GreenReaper

VBox file

Changed 7 years ago by GreenReaper

Full raw-disk VMDK

comment:1 Changed 7 years ago by aeichner

  • Summary changed from Raw disk VM gives ahci-0-0 BLKCACHE_IIOERR if block cache turned off on VirtualBox 5.0.1 and later to 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

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

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

Fix is part of VBox 5.0.4.

comment:3 Changed 7 years ago by GreenReaper

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

comment:4 Changed 4 years ago by npradeep357

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 Changed 4 years ago by npradeep357

  • Status changed from closed to reopened
  • Resolution fixed deleted

comment:6 Changed 4 years ago by npradeep357

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

comment:7 Changed 4 years ago by socratis

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

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

comment:9 Changed 14 months ago by cheater

  • Status changed from closed to reopened
  • Resolution fixed deleted

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 14 months ago by cheater (previous) (diff)

comment:10 Changed 14 months ago by cheater

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

Last edited 14 months ago by cheater (previous) (diff)

comment:11 Changed 14 months ago by cheater

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

Changed 14 months ago by cheater

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

Changed 14 months ago by cheater

a drive where writing does work under 6.1.22

Changed 14 months ago by cheater

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 Changed 14 months ago by cheater

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 Changed 14 months ago by cheater

Please close the ticket again, thank you.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use