Opened 5 years ago
Last modified 5 years ago
#19803 new defect
Add support for SATA attached read-only (RO/RDONLY) vmdk disks
Reported by: | Artem S. Tashkinov | Owned by: | |
---|---|---|---|
Component: | other | Version: | |
Keywords: | Cc: | ||
Guest type: | all | Host type: | all |
Description
Currently you cannot attach a full raw real harddisk with the RDONLY (read-only) flag set as the VM execution runs into an error:
The I/O cache encountered an error while updating data in medium "ahci-0-1" (rc=VERR_INVALID_HANDLE). 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 [Copy] [OK]
Pressing OK doesn't allow to continue the execution.
Please fix.
Here's an example VMDK image:
# Disk DescriptorFile version=1 CID=abcdedfg parentCID=ffffffff createType="fullDevice" # Extent description RDONLY 800000000 FLAT "/dev/sda" 0 # The disk Data Base #DDB ddb.virtualHWVersion = "4" ddb.adapterType="ide" ddb.geometry.cylinders="16383" ddb.geometry.heads="16" ddb.geometry.sectors="63" ddb.uuid.image="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ddb.uuid.parent="00000000-0000-0000-0000-000000000000" ddb.uuid.modification="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ddb.uuid.parentmodification="00000000-0000-0000-0000-000000000000" ddb.geometry.biosCylinders="1024" ddb.geometry.biosHeads="255" ddb.geometry.biosSectors="63"
Change History (3)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
If I attach the same disk via VirtIO SCSI everything works however I don't understand where writes go. VirtualBox allows to write to this disk despite the fact that it's read-only.
comment:3 by , 5 years ago
VirtIO doesn't really work, the VM hangs when you try to shut it down:
00:43:07.935662 PDMR3PowerOff: after 0 ms, 1 loops: 1 async tasks - virtio-scsi/0 00:43:07.935747 AioMgr2-N: Request 0x007f934c34e580 failed with rc=VERR_INVALID_HANDLE, migrating endpoint /dev/sda to failsafe manager. 00:43:07.935821 AIOMgr: I/O manager 0x007f934c363750 encountered a critical error (rc=VERR_FILE_AIO_NO_REQUEST) during operation. Falling back to failsafe mode. Expect reduced performance 00:43:07.935834 AIOMgr: Error happened in /home/vbox/vbox-6.1.12/src/VBox/VMM/VMMR3/PDMAsyncCompletionFileNormal.cpp:(1677){int pdmacFileAioMgrNormal(RTTHREAD, void*)} 00:43:07.935836 AIOMgr: Please contact the product vendor 00:43:19.044466 GUI: Request to close active machine-window.
From the log: