Page 1 of 1

Virtual Boxes keep getting corrupt!!

Posted: 10. Sep 2009, 17:12
by daviddoria
I have a windows XP virtual box on my portable hard drive that I run from a few desktops. I find that about once a month, windows decides that something has gone terribly wrong and goes through a huge list of the following when trying to boot:
Deleting corrupt attribute record (128, "") from file record segment XYZAB.
Correcting error in index $I30 for file XYZAB
Sorting index $I30 in index XYZAB
Then once it boots, there are a million errors about registry problems, etc and nothing works. I have to reinstall the virtual box.

Has anyone else had a problem with their virtual boxes getting corrupted? Is there anyway to tell what went wrong or prevent this? It is very annoying!

Thanks,

David

Re: Virtual Boxes keep getting corrupt!!

Posted: 10. Sep 2009, 17:26
by Sasquatch
Is the Guest XP and giving those disk checks, or is it a Windows Host that's saying that? I know that if you share an NTFS drive with Linux, a defrag on Windows can cause this behaviour.

Re: Virtual Boxes keep getting corrupt!!

Posted: 10. Sep 2009, 17:34
by daviddoria
My main OS (host?) is Fedora 11 and I am running Windows XP in a virtual box. It is this guest Windows XP that is giving those disk checks. The drive is only used with linux machines, but it is an NTFS partition. I have not run any defrags.

David

Re: Virtual Boxes keep getting corrupt!!

Posted: 10. Sep 2009, 17:43
by Perryg
I suspect that the error you are having is the same that I found when using a USB pen drive. If I did not unmount the drive before unplugging it I would get this kind of error sometimes. I suspect that the drive was writing at the time I pulled it. Not sure, but since I unmount the drive first now I have not seen this error.

Re: Virtual Boxes keep getting corrupt!!

Posted: 10. Sep 2009, 17:49
by daviddoria
I don't mind the disk checking so much - but the problem is that apparently the registry gets corrupt and I have to reinstall the operating system! After all that nonsense, the virtual machine reboots and the windows xp progress bar goes across a few times and then the machine just shuts down!

Re: Virtual Boxes keep getting corrupt!!

Posted: 10. Sep 2009, 19:22
by mpack
I think you must be doing something nasty which causes this. Like, unplugging the drive while the VM is still running. Or, unplugging a drive that hasn't been "stopped" but needs to be. Or, powering down the VM instead of sending the shutdown signal or selecting "Shutdown" from the start menu.

Something along those lines.

The errors you see are I suspect caused by writes to the MFT (Master File Table) being only partially completed, NTFS has code to detect this, which would kick off the recovery steps you see. Unfortunately those recovery steps will only recover the MFT and ensure a bootable drive, it doesn't guarantee non-filesystem files are recovered (and the registry is an OS feature, not part of the filesystem).

Do you actually need the VDI to be on a portable drive? Could you copy it to the hard drive at the start of a session?

Re: Virtual Boxes keep getting corrupt!!

Posted: 10. Sep 2009, 19:50
by daviddoria
I have indeed stopped the virtual machine without a proper "shutdown" in the case that it locks up entirely (as I don't know what else to do in that case - like in real computer when you would hold the power button to get it to turn off). I really make a concious effort never to unplug the drive before stopping it. And that should cover not unplugging it with the VM running.

I don't think running the VM from somewhere besides the portable drive would fix the problem if that is the only "bad" thing I did, right?

Re: Virtual Boxes keep getting corrupt!!

Posted: 10. Sep 2009, 21:23
by mpack
Before I forget, I've been meaning to suggest that you update your profile to say what your usual host OS is, and your usual guest. I realize that you provided that info in this thread, but having it in your profile means you won't have to repeat yourself in future.

Ok, so you "usually" flush the portable drive properly. That still leaves room for occasional mishaps, and problems with the drive or driver. Imho, you should certainly try running from the host HDD for a while.

Is it a USB drive? I would personally never think of running XP off a USB drive, for performance reasons alone.

How much memory did you give to the guest btw?

Re: Virtual Boxes keep getting corrupt!!

Posted: 10. Sep 2009, 21:52
by daviddoria
I added the info to my profile - good idea.

Of course there will be occasional mishaps - but that shouldn't force a reinstall!! (but it seems to!)

Yes, it is a USB drive. The performance seems quite good actually. I gave it 1gb of ram.