Page 1 of 1

Guest OS Crashed - VERR_VD_IMAGE_READ_ONLY

Posted: 15. Nov 2012, 07:49
by fermulator
I unfortunately ran out of memory on my host OS (Windows7), and it caused the guest OS (Ubuntu) to crash.

Since then, I cannot start my guest OS.
Failed to open a session for the virtual machine Ubuntu Server 11.04 (64-bit).

Failed to open image 'L:\myHDD.vdi' for writing due to wrong permissions (VERR_VD_IMAGE_READ_ONLY).

Failed to attach driver below us! Image is read-only. (VERR_VD_IMAGE_READ_ONLY).

AHCI: Failed to attach drive to Port0 (VERR_VD_IMAGE_READ_ONLY).

Result Code: E_FAIL (0x80004005)
Component: Console
Interface: IConsole {db7ab4ca-2a3f-4183-9243-c1208da92392}
Log:
00:00:02.010851 [SMP] BIOS with 2 CPUs
00:00:02.014477 SUP: Loaded VBoxDDR0.r0 (C:\Program Files\Oracle\VirtualBox\VBoxDDR0.r0) at 0xfffff88009f85000 - ModuleInit at 0000000000000000 and ModuleTerm at 0000000000000000 using the native ring-0 loader
00:00:02.014495 SUP: windbg> .reload /f C:\Program Files\Oracle\VirtualBox\VBoxDDR0.r0=0xfffff88009f85000
00:00:02.015785 SUP: Loaded VBoxDD2R0.r0 (C:\Program Files\Oracle\VirtualBox\VBoxDD2R0.r0) at 0xfffff88009fa8000 - ModuleInit at 0000000000000000 and ModuleTerm at 0000000000000000 using the native ring-0 loader
00:00:02.015796 SUP: windbg> .reload /f C:\Program Files\Oracle\VirtualBox\VBoxDD2R0.r0=0xfffff88009fa8000
00:00:02.015845 Activating Local APIC
00:00:02.015851 CPUMSetGuestCpuIdFeature: Enabled APIC
00:00:02.015855 CPUMClearGuestCpuIdFeature: Disabled x2APIC
00:00:02.016113 PIT: mode=3 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:02.020394 Shared Folders service loaded.
00:00:02.025755 Chipset cannot do MSI: VERR_NOT_IMPLEMENTED
00:00:02.026179 DrvBlock: Flushes will be ignored
00:00:02.026185 DrvBlock: Async flushes will be passed to the disk
00:00:02.026417 VDInit finished
00:00:02.989992 AIOMgr: Endpoint for file 'L:\myHDD.vdi' (flags 000c0781) created successfully
00:00:02.995325 VMSetError: D:\tinderbox\win-4.2\src\VBox\Devices\Storage\DrvVD.cpp(2639) int __cdecl drvvdConstruct(struct PDMDRVINS *,struct CFGMNODE *,unsigned int); rc=VERR_VD_IMAGE_READ_ONLY
00:00:02.995349 VMSetError: Failed to open image 'L:\myHDD.vdi' for writing due to wrong permissions
00:00:03.000369 VMSetError: D:\tinderbox\win-4.2\src\VBox\Devices\Storage\DrvBlock.cpp(988) int __cdecl drvblockConstruct(struct PDMDRVINS *,struct CFGMNODE *,unsigned int); rc=VERR_VD_IMAGE_READ_ONLY
00:00:03.000375 VMSetError: Failed to attach driver below us! Image is read-only.
00:00:03.000400 VMSetError: D:\tinderbox\win-4.2\src\VBox\Devices\Storage\DevAHCI.cpp(8105) int __cdecl ahciR3Construct(struct PDMDEVINS *,int,struct CFGMNODE *); rc=VERR_VD_IMAGE_READ_ONLY
00:00:03.000403 VMSetError: AHCI: Failed to attach drive to Port0
00:00:03.000416 PDM: Failed to construct 'ahci'/0! VERR_VD_IMAGE_READ_ONLY (-3205) - Image is read-only.
00:00:03.130013 ERROR [COM]: aRC=E_FAIL (0x80004005) aIID={db7ab4ca-2a3f-4183-9243-c1208da92392} aComponent={Console} aText={Failed to open image 'L:\myHDD.vdi' for writing due to wrong permissions (VERR_VD_IMAGE_READ_ONLY).
00:00:03.130062 Failed to attach driver below us! Image is read-only. (VERR_VD_IMAGE_READ_ONLY).
00:00:03.130063 AHCI: Failed to attach drive to Port0 (VERR_VD_IMAGE_READ_ONLY)}, preserve=false
00:00:03.157321 Power up failed (vrc=VERR_VD_IMAGE_READ_ONLY, rc=E_FAIL (0X80004005))
I've found other links on the Internet:
* vbox ticket 10627

And someone has suggested a fix to set the READONLY attribute on that storage device using VBoxManage:
VBoxManage setextradata VM_NAME "VBoxInternal/Devices/piix3ide/0/LUN#0/AttachedDriver/Config/ReadOnly" 1
I've tried to fiddle with this a bit, but struggling to find the correct device driver to use from the log file. Is it LUN#0, LUN#1, LUN#999?

The question is:
* Can someone confirm/deny, and clarify, the VBoxManage solution proposed to change ReadOnly attribute?

Re: Guest OS Crashed - VERR_VD_IMAGE_READ_ONLY

Posted: 16. Nov 2012, 01:49
by fermulator
Another thing I tried was cloning the VM: THREAD = 52638 -- ran into a problem there though as well.

I was unable to resolve this issue.

Someone in #vbox on freenode suggested simply creating the VM again from scratch, and selecting the same VDI disk -- this did the trick!

Had to re-create the VM manually (capturing all settings manually), and then it booted.