vdi corrupt but VM still boots into OS (kind of).

Discussions related to using VirtualBox on Windows hosts.
Post Reply
FullArmageddon
Posts: 3
Joined: 12. May 2013, 03:32

vdi corrupt but VM still boots into OS (kind of).

Post by FullArmageddon »

I won't go into the details of how it happened, but basically my host OS (Win7 x64) was improperly restarted before it could apply updates and some corruption occurred. VirtualBox was NOT running when the reboot occurred, but it seems the .vdi was not unaffected. After reformatting the host OS I tried launching the VM (guest OS = Win7 x86) and it does boot, but after it gets past the Windows boot screen the screen goes black (but the mouse cursor remains). However, it seems the guest OS is running. I'm able to browse the shared folders of the guest OS on my host OS over the network. I'm unable to Remote Desktop into the guest OS since I don't have a password set on it. I tried mounting the vdi in WinMount and it was unable to mount. Any suggestions on how I can restore the VM or recover my files? I'm becoming quite desperate so I'd appreciate any help.

btw, I'm using the same version of VirtualBox as I was before the reformat. I also tried running the VM on another computer and the same problem occurs. Also, I already tried creating a new profile for the vdi and that did not work.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: vdi corrupt but VM still boots into OS (kind of).

Post by noteirak »

If your host suffered corruption, there isn't anything you can do except restore a backup.

As for your guest, you don't tell us explicity what does not work, but if you manage to browse shared folder not much can be? But alas, if corruption occured, backup is the only way.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: vdi corrupt but VM still boots into OS (kind of).

Post by mpack »

FullArmageddon wrote:I tried mounting the vdi in WinMount and it was unable to mount
That part doesn't make sense to me. VirtualBox wouldn't start the VM if the VDI header was corrupted, and that's all that WinMount should care about too - assuming it supports VDI at all, which I don't know (someone just posted elsewhere that "WinMount supports most formats" - which is still a rather ambiguous comment).

Another thing I notice is that you are talking a lot about the VDI file, as if nothing else has importance. What about the VM itself? How did you recover that? E.g. your black screen on boot could easily be the result of recreating the VM around a VDI, and failing to get the hardware right. Did you create a new VM, or did you Machine|Add... the existing VM, or was the existing VM still registered? (i.e. VirtualBox.xml was preserved)?
FullArmageddon
Posts: 3
Joined: 12. May 2013, 03:32

Re: vdi corrupt but VM still boots into OS (kind of).

Post by FullArmageddon »

So here's what happened & everything I did:
When the host OS was corrupted, I ran the recovery disk to fix the boot files. After I restarted, it automatically ran chkdsk. After that completed, I was able to log into the host OS. Some system files were corrupted because some programs did not work and I could not reinstall them (VirtualBox being one of them). I also noticed that some of my saved Firefox sessions were corrupted. Anyway, I could browse all my files like normal, so I backed up my entire C:\Users folder (where the VM resided) and Program Files folders to an external drive and reformatted. After I reformatted, I installed VirtualBox and then added (Machine > Add) the virtual machine I had moved to my external drive. I started up the VM and I get the Windows loading screen, but after that I don't get my desktop but just a black screen with the mouse cursor. It didn't appear to have crashed so I checked my network shares to see if the VM was showing up, and sure enough, I could access the network shares of the VM. So the VM is running (I think?). Booting the VM in safe mode results in the same outcome.

@mpack - I read somewhere that only fixed-size virtual disks can be mounted, not dynamic. Don't know if that's true (hope it's not).
FullArmageddon
Posts: 3
Joined: 12. May 2013, 03:32

Re: vdi corrupt but VM still boots into OS (kind of).

Post by FullArmageddon »

So I added a linux live disk ISO to the VM's IDE controller and booted into that. I'm able to mount the virtual disk and browse all the files on it. Now I just need to figure out how to transfer them to my hard drive (I'm not very proficient with linux).
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: vdi corrupt but VM still boots into OS (kind of).

Post by mpack »

FullArmageddon wrote:Anyway, I could browse all my files like normal
That doesn't really mean much, except the the directory structures you visited were intact. It doesn't say anything about the linked files.

If the WinMount docs say that only fixed size drives are supported, then that is undoubtedly the case, and you shouldn't test the claim (at least not without making a backup). Basically it only supports flat images, it can't handle sparse ones. Even if it let you copy files off, they would be garbage. Read the docs. AFAIK it's ImDisk that only supports fixed size disks, but WinMount could be the same.
Post Reply