Virtualbox xml file empty.

Discussions related to using VirtualBox on Linux hosts.
Post Reply
phantom
Posts: 15
Joined: 30. Oct 2008, 08:52
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows 2000

Virtualbox xml file empty.

Post by phantom »

Hello. I am having a problem with Virtualbox on my Ubuntu Linux host.

I ran out of space in the partition in which I run Virtualbox and Ubuntu. Eventually Virtualbox tried to write to the settings file at some point, but it failed to do so and left an empty file. The specific file that is emptied is /home/phantom/.VirtualBox/Machines/Windows 2000/Windows 2000.xml

Here is the full error Virtualbox presents to me when I highlight the broken VM:
The selected virtual machine is inaccessible. Please inspect the error message shown below and press the refresh button if you want to repeat the accessibility check:

Code: Select all

Start tag expected, '<' not found.
Location: '/home/phantom/.VirtualBox/Machines/Windows 2000/Windows 2000.xml', line 1 (0), column 1.
/home/vbox/vbox-3.1.2/src/VBox/Main/MachineImpl.cpp[5821] (nsresult Machine::loadSettings(bool)).
Result Code: 
NS_ERROR_FAILURE (0x80004005)
Component: 
VirtualBox
Interface: 
IVirtualBox {2158464a-f706-414b-a8c4-fb589dfc6b62}
Is there any way to recover this virtual machine?
pgf
Posts: 1
Joined: 1. Jan 2010, 17:57
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Windoze

Re: Virtualbox xml file empty.

Post by pgf »

I have just started working with VirtualBox, but as far a I can see there is no backup kept of this file - a major shortcoming if I am correct. Rewriting it every time without making sure you can recover in case of corruption is definitely an issue.
MarkCranness
Volunteer
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: Virtualbox xml file empty

Post by MarkCranness »

Did the VM have any snapshots? If so, then perhaps it can be recovered. If no snapshots, then more likely it can be recovered.

Your real concern is to recover the VM's virtual disk, but the machine XML file is not as much of a concern because the XML can likely be recreated easily enough.

If you open VirtualBox then use menu File>Virtual Media Manager... can you still see your VM's virtual hard disk?
If the VM had snapshots, can you see a tree under the virtual hard disk (of {hexUUID{.vdi files) that seems the same as the snapshot structure?

If the answer to the above is YES, then please 'Upload attachment' your /home/phantom/.VirtualBox/VirtualBox.xml file and a list of VDI files with date-times and we can likely advise.
(General procedure would be to create a new VM close enough to what the old one looked like, and then attach the appropriate existing VDI file. Make sure you take backups first in case.)
phantom
Posts: 15
Joined: 30. Oct 2008, 08:52
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows 2000

Re: Virtualbox xml file empty.

Post by phantom »

Thank you for the replies, I was able to recover the virtual machine by creating a new VM and selecting the old intact disk image to boot from.

I'm certainly keeping more backups now.
sanjay alladi
Posts: 1
Joined: 3. Apr 2010, 18:00
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: OpenSolaris

Re: Virtualbox xml file empty.

Post by sanjay alladi »

Hi

I am facing similar problem. I am using Vista Ultimate on which I loaded VirtualBox and OpenSolaris.
I have shutdown my vista without shuting down OpenSolaris. When I restarted my machine, I am getting the following error.
Start tag expected, '<' not found.
Location: 'C:\Users\bharathi\.VirtualBox\Machines\OpenSolaris\OpenSolaris.xml', line 1 (0), column 1.
D:\tinderbox\win-3.1\src\VBox\Main\MachineImpl.cpp[5832] (Machine::loadSettings).
Result Code:
E_FAIL (0x80004005)
Component:
VirtualBox
Interface:
IVirtualBox {2158464a-f706-414b-a8c4-fb589dfc6b62}

I did not taken any snapshot. As Mark Craness Replie looks like a solution, can anyboxy provide detail steps to recover. In my system VirtualBox.xml file is not empty but OpenSolaris.xml file is.
phantom
Posts: 15
Joined: 30. Oct 2008, 08:52
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows 2000

Re: Virtualbox xml file empty.

Post by phantom »

You should be able to recover it the same way I did, by creating a new virtual machine through the virtualbox interface but selecting the old disk image instead of creating a new one.
rdpalmer70
Posts: 1
Joined: 16. Sep 2010, 21:17
Primary OS: Fedora 10
VBox Version: PUEL
Guest OSses: Windows 7

Re: Virtualbox xml file empty.

Post by rdpalmer70 »

I have a similar problem with my .xml file - when file system filled .xml file was written with 0 bytes. I do have a snapshot (shown in attached .png file). However, when I attempted to create another Win 7 64-bit VM and point to my main .vhd file - it gives BSOD before completing boot (system restore and safe mode don't bring anything positive to the situation). Appreciate any help (or direction) anyone can offer. Thanks in advance.

--Robert
Virtual Media Manager screen shot - the files are there but doesn't seem to attach.
Virtual Media Manager screen shot - the files are there but doesn't seem to attach.
Screenshot-Virtual Media Manager.png (41.72 KiB) Viewed 24662 times
bobb40
Posts: 9
Joined: 19. Sep 2010, 19:08
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: windows xp

Re: Virtualbox xml file empty.

Post by bobb40 »

I've gone through the same thing, as a result of filling my linux partition. I've re-installed vbox, created new machine identical to old one, used old virtual disk, so now I have the raw windows xp installation. But I have a few snapshots which contain configuration and applications and I'd like to install them (preferably the latest) but can't see how. The snapshots are in ~/.Virtualbox/Machines/xp0/Snapshots, but when I try to add a likely one to Virtual Media Manager, I get:

"Failed to open the hard disk /home/bobb/.VirtualBox/Machines/xp0/Snapshots/{ca0f2f83-19a8-473c-89a6-2d679585c1a7}.vdi.
Parent medium with UUID {767c9566-5cb7-42c5-8b27-70112338381c} of the medium '/home/bobb/.VirtualBox/Machines/xp0/Snapshots/{ca0f2f83-19a8-473c-89a6-2d679585c1a7}.vdi' is not found in the media registry ('/home/bobb/.VirtualBox/VirtualBox.xml')."

How can I fix this? Are all snapshots relevant? There are a couple of ".sav" files in the Snapshots directory with similar filenames; where do they fit in?
MarkCranness
Volunteer
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: Virtualbox xml file empty.

Post by MarkCranness »

bobb40 wrote:The snapshots are in ~/.Virtualbox/Machines/xp0/Snapshots, but when I try to add a likely one to Virtual Media Manager, I get:
Add them in date order: Find the one with the earliest date, and add that first, then the next by date order.
That should/might recreate the snapshot tree hierarchy.
Take a copy/backup of them first. You may have to also restore a copy of the base virtual disk, because if that is modified (or booted from even), that may break the snapshot links.

The one that gets added last is the 'Current State' of your VM. Either attach that to a new VM (check the 'Show differencing disks' checkbox, or clonehd that file to a new virtual disk to create a flattened copy (including snapshots).
zeek
Posts: 1
Joined: 28. Jun 2011, 18:24
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: BeOS

Re: Virtualbox xml file empty.

Post by zeek »

I can confirm this bug is not fixed in Vbox 4.0.12. However Vbox now makes a XXX.xml-prev backup file so you can recover your machine. Sadly, recovery is not automatic.
SteveSch
Posts: 1
Joined: 25. Nov 2011, 16:40
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: WinXP

Re: Virtualbox xml file empty.

Post by SteveSch »

Thank you phantom. This fixed my problem easily.

Steve
rdarius
Posts: 2
Joined: 7. Jan 2012, 18:15
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: Windows XP

Re: Virtualbox xml file empty.

Post by rdarius »

Estimado Phantom, probablemente no me entiendas, sin embargo agradezco tu publicación. Hice lo mismo que indicas aquí y mi máquina virtual funcionó nuevamente. ¡Gracias!
phantom wrote:Thank you for the replies, I was able to recover the virtual machine by creating a new VM and selecting the old intact disk image to boot from.

I'm certainly keeping more backups now.
Post Reply