VirtualBox

Ticket #2267 (closed defect: fixed)

Opened 6 years ago

Last modified 4 years ago

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

Reported by: luposlip Owned by:
Priority: major 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

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

Change History

Changed 6 years ago by luposlip

The latest log file from virtualbox..

comment:1 Changed 6 years ago by sandervl73

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

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

  • Status changed from closed to reopened
  • Resolution invalid deleted

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

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

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

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

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

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

  • Status changed from closed to reopened
  • Resolution invalid deleted

comment:8 Changed 6 years ago by sandervl73

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

comment:9 Changed 6 years ago by steved424

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

HFS+ Journaling docco:

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

Doesn't sound like it deliberately truncates open files.

comment:11 Changed 6 years ago by frank

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

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.

comment:13 in reply to: ↑ description Changed 6 years ago by jvb

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

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

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

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).

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use