Page 1 of 1

Data deletes after freeze/shutdown

Posted: 4. Sep 2016, 05:29
by Bread
So I spent 48 hours troubleshooting and installing everything I needed to get Xubuntu running so that I can test some things on linux for my work; twice it has happened that VirtualBox froze after I shutdown and twice after each freezing the xubuntu.iso I was using dismounted and when it did -everything- I had done was gone. My installs, my username. I thought the .vdi would have saved that data or even the previous xubuntu install but it didn't. (Note normal shut down so far is fine, data remains the same on reboot; it's when VirtualBox freezes and I have to kill task that it dismounts my .iso and I lose everything).

When I go through the steps to install Xubuntu again (because that's the only option it gives me it says):
The installer has detected that the following disks have mounted partitions:
/dev/sda
do you want the installer to try to unmount the partitions on these disks before continuing?
^ I don't know what that is referrting to.

So I click "Yes" and go to the next page and it says:
"This computer currently has Ubuntu 16.04.1 LTS on it." What would you like to do?
It seems the VDI is referring to the last time I had successfully closed Virtual Box entirely over 24 hours ago when I was running Ubuntu. But had settled on installing Xubuntu. So all data from the session is gone?

I want to use VirtualBox so I don't have to constantly reboot back and forth when switching from development to design and other windows specific task that I rely on daily (I hate rebooting more than anything), I use teamviewer a lot and have settled on virtualbox on a solution. But I need a way to prevent this type of data loss.

1. How do I stop data loss after VirtualBox freezes?
2. How do I prevent Virtualbox from locking up and needing to 'kill task'?
3. Do I need to just constantly back-up every hour when running VirtualBox?
4. Is this a type of bug and does it have a workaround?

Re: Data deletes after freeze/shutdown

Posted: 4. Sep 2016, 13:32
by Perryg
It sounds like you are running from the LiveCD and using the saved state and not shutting down. If you have not already installed the guest do so and this probably will not happen.

Re: Data deletes after freeze/shutdown

Posted: 4. Sep 2016, 16:18
by Bread
I forgot to mention that this isn't a livecd, this happened after installing it more than once. To give a step by step rundown on what has happened (and I found this to be repeateable, same pattern each time it has happened):

1. I installed Linux
2. Once linux is installed I install: virtualbox guest additions, new browsers, software etc.
3. After working in it for up to 24 hours, I shut down the guest OS.
4. Virtualbox freezes, I'm unable to close out or do anything with it, it just sits on top of my screen.
5. I kill the task in task manager.
6. I reboot it, to find my .iso has dismounted, and that it has gone back to the state by which Virtualbox was last shutdown normally (not the Guest OS). All other settings are normal.
7. I remount the .iso
8. I reinstall the Linux.
9. If I'm using my Guest OS open for a while, and have the VirtualBox Manager as well the same thing happens.
10. Closing VirtualBox Manager may or may not help; as I'm trying to find a reason for why VirtualBox has done this and a clear solution to protect my data before doing anything sensitive with it (Tips to prevent this and whether this is a bug or not would be helpful)

Re: Data deletes after freeze/shutdown

Posted: 4. Sep 2016, 16:50
by Perryg
Post the guests log file ( as an attachment ). Right click on the guest in the Main Manager then click show log. Save and post as an attachment. Compress if it is too large to post.

Post the results of VBoxManage list hdds from the host terminal/command window

From the hosts terminal/command window type VBoxManage showvminfo <VM Name> --details and post here. Replace <VM Name> with the actual name of the VM. Use " " if the name has a space in it.

Note if the host is Windows you need to be in the directory that has VBoxManage.exe for the command to work.

Re: Data deletes after freeze/shutdown

Posted: 4. Sep 2016, 20:58
by Bread
You lost me after VBoxManage list from the host terminal/command window as I don't know where that is located, if it's 'my' command prompt on my main machine I don't know the command to call u p the VBoxManage list.

However I did manage to get the guests logs, and hope it will be of help.

I don't know how much use it will be/if it will be of any use as I have a habit of deleting the entire .vdi and starting over (usually deleting all files when I do that when something goes wrong). I think this most recent time that it happened I simply remounted another .iso rather than uninstall, but can't recall if I deleted it completely or not.

Re: Data deletes after freeze/shutdown

Posted: 4. Sep 2016, 21:29
by Perryg
VBoxManage is a command that you run from the Windows command window. You need to be in the directory that actually has the VBoxManage.exe ( use search to find it ).

The next time this happens instead of deleting everything and starting over, first look in the guests folder for two files. One called <guest>.vbox, and the other called <guest>.vbox-prev.

See if they are the same size and if not replace the <guest>.vbox with the <guest>.vbox-prev and see if it allows you to boot the guest.

Replace <guest> with the actual name of the guest.

Also you could make a backup of the above file so you can recover from this, and of course you could backup the entire guest folder so you can replace the original if and when this occurs again.

As for what is causing your hang/freeze, the log does not show anything wrong, nor something that would cause this and from what you are saying it does not happen all the time. I would look at the host for something that is either eating all the resources or some other program that might be causing a conflict.