Disk read error occurrs while booting

This is for discussing general topics about how to use VirtualBox.

Disk read error occurrs while booting

Postby John Oracle » 8. Nov 2012, 14:35

My Windows XP VM will not boot. It displays the error message:

"A disk read error occurred
Press Ctrl+ Alt+Del to restart"

The machine was created using VMware Server, and plays fine in VMware Player. I have VMware VMs running Linux, Windows Server 2003 and 2008 R2 that I can run in VirtualBox. That is, I created machines in VirtualBox using the original VMDK files (not clones). However, the Windows XP VM is not working.

VBoxSVC.log says:
...
00:00:03.370000 Loading settings file "C:\Data\Virtual Machines\Windows XP\Windows XP.vbox" with version "1.12-windows"
00:00:25.272000 ERROR [COM]: aRC=VBOX_E_INVALID_VM_STATE (0x80bb0002) aIID={22781af3-1c96-4126-9edf-67a020e0e858} aComponent={Machine} aText={Machine is not locked for session (session state: Unlocked)}, preserve=false
00:00:25.694000 ERROR [COM]: aRC=VBOX_E_IPRT_ERROR (0x80bb0005) aIID={22781af3-1c96-4126-9edf-67a020e0e858} aComponent={SessionMachine} aText={Saved screenshot data is not available (VERR_NOT_SUPPORTED)}, preserve=false
...

Vbox.log says:
]...
00:00:03.278768 Guest Log: BIOS: ata0-0: PCHS=4161/16/63 LCHS=522/255/63 [1]
...
00:00:05.807246 Guest Log: BIOS: Booting from Hard Disk...
00:00:05.808962 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=0000000000000000 w=720 h=400 bpp=0 cbLine=0x0, flags=0x1
00:00:10.537215 Changing the VM state from 'RUNNING' to 'SUSPENDING'.

[1] I assume that PCHS = physical CHS and LCHS = logical CHS. CHS 4161/16/63 = 2,147,475,456 bytes, assuming that sector size = 512 bytes. The disk is actually 4 GB and is recognised as such in VirtualBox Manager, which I assume is because of the following lines in the .vmdk file:

# Extent description
RW 4193792 FLAT "Windows XP Professional-f001.vmdk" 0
RW 512 FLAT "Windows XP Professional-f002.vmdk" 0
RW 4192256 FLAT "Windows XP Professional-f003.vmdk" 0



How can I get the disk to boot in VirtualBox? I am trying to move from VMware to VirtualBox, but I cannot uninstall VMware until I solve this problem.
John Oracle
 
Posts: 6
Joined: 8. Nov 2012, 11:52

Re: Disk read error occurrs while booting

Postby mpack » 8. Nov 2012, 16:38

XP needs you to run MergeIDE before it can be easily migrated between different hardware platforms. Plus you should configure the guest to use an IDE disk controller.

You must also uninstall the VMware tools from inside the guest.

Also: VMs ported from VMWare typically need to have the "IO APIC" feature enabled.
mpack
Site Moderator
 
Posts: 33673
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Disk read error occurrs while booting

Postby John Oracle » 10. Nov 2012, 12:13

I uninstalled VMware tools, ran MergeIDE, and enabled IO APIC. My VirtualBox and VMware machines are both using IDE. I still got the same error. By the way, it is not a BSOD and I don't get the opportunity to try safe mode. The error happens before that. When I have some time I will try booting from a Windows XP CD.
John Oracle
 
Posts: 6
Joined: 8. Nov 2012, 11:52

Re: Disk read error occurrs while booting

Postby mpack » 10. Nov 2012, 12:55

Did the VMWare VM use snapshots? If yes then those will need to be merged before you do anything else. You could also try export/import as an appliance, though I've never used it myself.
mpack
Site Moderator
 
Posts: 33673
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Disk read error occurrs while booting

Postby John Oracle » 10. Nov 2012, 17:55

I did not use snapshots as part of my everyday work/testing/studies, but how can I tell?

By the way, I booted from an XP CD into a Recovery Console. My drive seems OK in the VirtualBox VM. Maybe if I go ahead and repair Windows it will "just work" and not mess up my programs, but I feel that there must be an easier way.
John Oracle
 
Posts: 6
Joined: 8. Nov 2012, 11:52

Re: Disk read error occurrs while booting

Postby mpack » 10. Nov 2012, 20:51

"Repair" in this context, is snake oil. Forget it. Even in the physical world that will not fix "Disk read errors".

The simplest solution is to run Disk2VHD inside the VMWare VM, imaging the entire system drive, writing the VHD to a shared folder or USB drive. Removing the VMware tools and running MergeIDE should be done first. Build a VirtualBox VM around the VHD.
mpack
Site Moderator
 
Posts: 33673
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Disk read error occurrs while booting

Postby John Oracle » 11. Nov 2012, 00:20

I really do not think that that will work. Nothing is actually wrong with my disk. I can run the machine in VMware player. I mean not just boot; I can connect to the Internet and shared folders on the host (MS Networking not VMware shared folders), run MS Office apps, you name it.

As for building a VirtualBox VM around the disk, that is exactly what I did. The VMware machine and the VirtualBox machine are using the *same* disk located at \path\to\disk\not\copied\nor\cloned.vmdk. I have two Windows Server 2003 VMs and a Windows 2008 R2 VM that were originally created in VMware that I am now running in VirtualBox using this exact approach.

Now, if my problem is the one described in the "Hard Disk Support" at How to migrate existing Windows installations to VirtualBox, which MergeIDE is supposed to solve but didn't, then repairing Windows may help. Still, I will try your suggestion first.
John Oracle
 
Posts: 6
Joined: 8. Nov 2012, 11:52

Re: [SOLVED] Disk read error occurrs while booting

Postby John Oracle » 11. Nov 2012, 11:44

It worked. Thank you very much. That tip about Disk2VHD really should be in the "How to migrate ..." article in the VirtualBox wiki.

For the benefit of anyone trying to boot from a Windows XP VMware disk in a VirtualBox VM, the following instructions worked for me.

1) Run the VMware machine and uninstall VMware Tools and run MergeIDE.
2) Run Disk2VHD with "Prepare for use in Virtual PC" selected. Save the resulting VHD where you can access it on the host.
3) Boot from the VHD in your VirtualBox VM.
4) You will see a new entry to the Windows boot menu entitled "Disk2vhd Microsoft Windows XP Professional" as the first item. For what it is worth, in boot.ini the new entry is a copy of the old one with the extra parameters:
/KERNEL=ntkrnlpa.exe /HAL=halacpi.dll
5) Boot from the Disk2vhd item (to be safe; either boot menu item works for me now, but maybe it is necessary to select the Disk2vhd item the first time).

Thanks again.
John Oracle
 
Posts: 6
Joined: 8. Nov 2012, 11:52

Re: Disk read error occurrs while booting

Postby mpack » 11. Nov 2012, 12:58

Ok, however mostly for future readers: This success proves that you must indeed have been using snapshots in the original VM (rather: differencing disks of any kind), as that is the only thing really fixed by switching to a different imaging technique. The internally made VHD image would of course have been of the current disk state regardless of whether the VMDK you previously tried to use was the base or a child in the chain (I suspect the latter, hence it was missing its boot sector etc). "Repair" would certainly not have worked.

Disk2VHD is very convenient, however VHD itself is an unreliable format, prone to data loss catastophes. Now that you have a working disk I suggest that you clone the VHD using CloneVDI. This will give you a VDI, which is VirtualBox's native format and much more reliable.

I don't think that "Prepare for use in Virtual PC" thing was necessary (though thanks for drawing my attention to a new Disk2VHD feature), but as long as it doesn't involve installing the VPC tools then the advice shouldn't be harmful.
mpack
Site Moderator
 
Posts: 33673
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Disk read error occurrs while booting

Postby John Oracle » 11. Nov 2012, 17:27

Converting the VHD was going to be my next step, but I needed to take a break from this problem.
John Oracle
 
Posts: 6
Joined: 8. Nov 2012, 11:52


Return to Using VirtualBox

Who is online

Users browsing this forum: No registered users and 7 guests