VirtualBox

Opened 16 years ago

Closed 14 years ago

Last modified 10 years ago

#2267 closed defect (fixed)

After an unfriendly shutdown of a Windows Guest I can't boot Windows anymore (osx leopard host)

Reported by: luposlip Owned by:
Component: virtual disk Version: VirtualBox 2.0.2
Keywords: disk read error crash Cc:
Guest type: Windows Host type: Mac OS X

Description

I use Windows XP as a guest on OSX Leopard (on a macbook pro) using VirtualBox 2.0.2.

Yesterday I'd started the Windows XP guest (as always), when suddenly there were no more power on the laptop battery. It was late, so instead of attaching the power supply, I just closed the lid. I shouldn't have done that..

Because today when I booted OSX and afterwards tried to start the Windows XP host, I just got this error: {{{A disk read error occurred Press Ctrl+Alt+Del to restart}}}

I have my email on this disk (ok, perhaps that was a little bit stupid..), so I'm really desperate to get the disk working again.

Please advise! Thanks in advance..

Attachments (1)

VBox.log (37.0 KB ) - added by luposlip 16 years ago.
The latest log file from virtualbox..

Download all attachments as: .zip

Change History (17)

by luposlip, 16 years ago

Attachment: VBox.log added

The latest log file from virtualbox..

comment:1 by Sander van Leeuwen, 16 years ago

Resolution: invalid
Status: newclosed

I'm sorry, but this is not a VirtualBox bug. I suggest you post this question on our forum, since you're much more likely to get help there.

comment:2 by luposlip, 16 years ago

Resolution: invalid
Status: closedreopened

This seems to be an issue that more are seeing: http://forums.virtualbox.org/viewtopic.php?p=38349

Could you please verify once more that this is not a bug in the way virtualbox for osx handles the virtual disk of a Windows XP installation?

Please advice. Thank you.

comment:3 by Sander van Leeuwen, 16 years ago

Resolution: invalid
Status: reopenedclosed

Have you ever pulled the plug on a real computer running Windows (or any other OS for that matter)? That can completely kill it. It's no different in VirtualBox.

You can corrupt virtual machines just like real machines. You said yourself you killed the session.

comment:4 by Steve Dodd, 16 years ago

From the originally posted log:

684 	00:00:03.333 PIIX3 ATA: LUN#0: disk read error (rc=VERR_EOF iSector=0x1fd3ca7 cSectors=0x1)
685 	00:00:03.334 Guest Log: BIOS: int13_harddisk: function 42, error 02 !

I'm not familiar with VBox internals, but I assume a hard error on a "virtual" disk means the structure of the .VDI got corrupted, rather than merely the contents? Which would make it a VBox bug, or perhaps "missing feature."

comment:5 by Sander van Leeuwen, 16 years ago

If you turn off your real machine incorrectly and the file system gets corrupted, then there's really not much we can do. Apparently the file was cut off or its contents corrupted.

comment:6 by Steve Dodd, 16 years ago

Ah - interaction with journalling on the underlying fs, perhaps (XFS also seems to like to truncate files on an unclean shutdown.) In which case, yes, rather out of your hands :(

comment:7 by Sander van Leeuwen, 16 years ago

Resolution: invalid
Status: closedreopened

comment:8 by Sander van Leeuwen, 16 years ago

We'll try to reproduce this here as one user claims he can reproduce this every time. See the original forum topic.

comment:9 by Steve Dodd, 16 years ago

Assuming it's not the underlying fs causing the problem (see the end of the first message here: http://zork.net/~nick/mail/why-reiserfs-is-teh-sukc for an example of why it might be), could the solution be as simple as bullet-proofing the code that grows a VDI?

Presumably that's the only bit that messes with the internal structure. If it was made effectively atomic (store enough state during the transaction so that on restart the change can be completed or backed out), that should do the trick - the guest OS can deal with the data corruption (or not)..

comment:10 by Steve Dodd, 16 years ago

HFS+ Journaling docco:

http://developer.apple.com/technotes/tn/tn1150.html#Journal

Doesn't sound like it deliberately truncates open files.

comment:11 by Frank Mehnert, 16 years ago

Note that the VirtualBox code (as every normal user space application) assumes that the date written by a write operation which finished successfully is actually written to the disk. And some write operations are done not before the file descriptor was properly closed (which is done automatically when the application terminates). In case of an unpredicted shutdown of the host it is most likely that some data are not written to the disk and therefore the VDI image file might be corrupt. This is not a bug in the code. If this does not happen with other products it might be that the probability of data loss on unexpected shutdown is smaller but not zero.

comment:12 by Christian Pötzsch, 16 years ago

I tried to reproduce this behavior without success. I removed the accu of my MacBook several times during a running Win XP VM. The VM was downloading some files & the host had some hdd load also. After the host reboot the VM started without problems. So I guess there is no generally problem with our implementation. As Frank said there might be a smaller risk in other products. Maybe someone of the original reporter can explain the *reproducibility* in more detail.

in reply to:  description comment:13 by Jan van Bergen, 16 years ago

Replying to luposlip:

Hi,

I got the same problem: disk error occurred etc. (After clicking the question mark in the shutdown dialog my Mac Mini with Tiger hung, or in fact got an extreeeemely slow shifting mouse pointer and didn't react on any key combination. So I was forced to just shut the power off. Then XP didn't start anymore).

I did a repair from CD, first with 'fixmbr' because it didn't see an existing installation, then rebooted the CD, choose repair again, did a chkdsk, but that one stopped at 50% (dynamic disk?). Rebooted, but then XP couldn't boot because 'hal.dll' was corrupt or missing. I copied it from CD, again after booting with CD and choosing repair. Then XP couldn't boot because ntoskrnl.exe was missing. So, preventing an endless CD-boot, repair, copy of all sorts of files I decided to start a new installation, alongside the existing one, so without formatting. This didn't work out. Halfway the installation something about 'corrupt filesystem' or s.th. like that.

I will do a completely new installation, with formatting, but I think this is really different from a real PC. I've shut the power down many times with real PC's but never got into this trouble.

Jan.

I use Windows XP as a guest on OSX Leopard (on a macbook pro) using VirtualBox 2.0.2.

Yesterday I'd started the Windows XP guest (as always), when suddenly there were no more power on the laptop battery. It was late, so instead of attaching the power supply, I just closed the lid. I shouldn't have done that..

Because today when I booted OSX and afterwards tried to start the Windows XP host, I just got this error: {{{A disk read error occurred Press Ctrl+Alt+Del to restart}}}

I have my email on this disk (ok, perhaps that was a little bit stupid..), so I'm really desperate to get the disk working again.

Please advise! Thanks in advance..

comment:14 by vijaybk, 16 years ago

I ran into this issue on MacBook Pro OS X 10.5.5 and XP Pro guest. Following steps should reproduce:

  1. Boot host - OS X.
  1. Start guest - XP Pro.
  1. Go to Apple menu click "Sleep".
  1. OS X fails to resume after - only spinning wheel forever (I waited for 45 min).
  1. Used power button to power off.
  1. Restart.
  1. Start guest fails :(

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

As mentioned above chkdsk stopped at 50% and subsequent attempts failed as well with: .. 'hal.dll' was corrupt or missing..

I just reinstalled XP. Next time remember first to shutdown/freeze guest before putting host to sleep.

comment:15 by aeichner, 14 years ago

Resolution: fixed
Status: reopenedclosed

It is possible to disable the host cache for image files since VirtualBox 3.2. Data is directly written to the disk instead of being held into RAM (except for a small writeback cache inside VirtualBox which can be disabled too, see the manual).

comment:16 by Glen Gorman, 10 years ago

Virtual Box 4.3.12 basicaly reading the thread as i got this error. I noted however the virtual disk itself is no longer usable so its not an operating system error as indicated its an oracle vm error.

Picture if you will in the non virtual world you shut of your computer it fails to boot to fix you can re-install/repair new version of windows using the install CD/DVD. Problem solved.

this process fails on the oracle vm telling me that the represented virtual hardware disk drive is no good anymore. Ergo the problem is the interaction with the Oracle VM software. It may or may not be that the original problem was caused by a bad shutdown, but clearly theres a problem with the VM software.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use