HD filled up, corrupted disk image

This is for discussing general topics about how to use VirtualBox.
Post Reply
FloatingCoder
Posts: 2
Joined: 30. Jul 2013, 04:26

HD filled up, corrupted disk image

Post by FloatingCoder »

Hi,

So apparently my real HD ran out of space while the VHD was trying to expand and it corrupted the image. I was trying to make the disk smaller, I heard I should first run a command in the VM (Windows 7 ) to wipe out the unused bytes from deleted files and such, setting them back to 0. When I did this, it apparently decided it needed to do that to all the bytes n the virtual HD, even those not allocated yet. The image was about 20GB, but the allowed size was 127GB. Sadly, it got to 111GB and ran out of room. I was able to gracefully shut down the VM, but then it wouldn't restart. I've cleared more space on my HD, but it doesn't seem to help.

I've trued mounting the image directly under windows, but that fails too.

Any ideas how to correct this? Anyone have similar issues?

EDIT: Forgot the error message, VB doesn't let you actually copy it (so helpful) but its...
VD: error VERR_SHARING_VIOLATION repairing corrupted image file....

I've made sure nothing else is using the file, rebooted, etc...

Thanks,
Bryan
FloatingCoder
Posts: 2
Joined: 30. Jul 2013, 04:26

Re: HD filled up, corrupted disk image

Post by FloatingCoder »

Weird, it just started working... I tried several tools, downloaded VMWare Converter to see if that could read it (nope) tried random stuff to resize the vhd or change anything on it, nothing worked. Then, I noticed the VBox xml file for the macine was empty. I was trying to add the drive image to a new machine, but just for kicks I used the backup that was in that folder (did vbox put it there?) and then virtual box could add the VM, but it still wouldn't boot. One more restart of VBox, and suddenly it booted. Weird. Seems to be ok for now... windows can mount the vhd too. Once I get it shrunk back down to a manageable size I'll need to get it backed up :).
Post Reply