Hi guys,
Upon coming booting my machine (Windows XP Pro) this Monday morning, I opened Sun VirtualBox 3.0.4 to find out, to my dismay, that all four of my VMs have disappeared from the list on the left-hand side.
I found them on my host's hard disk, however I do not know how to restore them.
C:\Documents and Settings\{username}\.VirtualBox\
C:\Documents and Settings\{username}\.VirtualBox\VirtualBox.xml
C:\Documents and Settings\{username}\.VirtualBox\Machines\{vm-name}\
C:\Documents and Settings\{username}\.VirtualBox\Machines\{vm-name}\{vm-name}.xml
C:\Documents and Settings\{username}\.VirtualBox\Machines\{vm-name}\Snapshots\
C:\Documents and Settings\{username}\.VirtualBox\Machines\{vm-name}\Logs\
C:\Documents and Settings\{username}\.VirtualBox\HardDisks\{vm-name}.vdi
I have the hard drive (vdi) image for these (including the most important one), and I realize I can create a new VM which uses this hard drive, but this would put me back in time (a few months), as I have created snapshots since (latest last Thursday).
I can't seem to find any simple guides to restoring my VMs (snapshots included), so any help would be much appreciated.
All the files seem to be there, so I just need a way of reminding VirtualBox what it was pointing to last week, as it appears it has simply forgotten.
Many thanks in advance.
VMs have disappeared
-
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: VMs have disappeared
The VMs should be listed in the main VirtualBox.xml file. Have you looked at the contents? Even a not so recent backup of this file would be useful as a template, and perhaps any corruption is minor. Reconstituting a snapshot chain inside this xml is not for the faint hearted, but is possible with care.
-
deizel
- Posts: 3
- Joined: 14. Sep 2009, 11:00
- Primary OS: MS Windows XP
- VBox Version: OSE other
- Guest OSses: Ubuntu
Re: VMs have disappeared
Hi mpack,
Thanks for this. It seems that VirtualBox had created a new main VirtualBox.xml file at C:\.VirtualBox\VirtualBox.xml and was using this instead.
Initially, I tried going into the general VirtualBox settings and changing the default hard disk/machine folder paths to those in the Documents and Settings directory, and restarting VirtualBox.. This didn't seem to have any effect.
I then thought about deleting all the C:\.VirtualBox directories, so that it would have to use the Documents and Settings ones.. however, at that point I read your reply.
I managed to fix the issue by copying the contents of C:\Documents and Settings\{username}\.VirtualBox\VirtualBox.xml to C:\.VirtualBox\VirtualBox.xml, and changing any relative paths to absolute ones.
I am not sure why this happened. The only thing I can link it to was some network issues that we had last week when VirtualBox was running. When the network went down, this might have caused VirtualBox to forget which user was logged in, and create files in the root of the C: drive.
*shrug*
Thanks again!
Thanks for this. It seems that VirtualBox had created a new main VirtualBox.xml file at C:\.VirtualBox\VirtualBox.xml and was using this instead.
Initially, I tried going into the general VirtualBox settings and changing the default hard disk/machine folder paths to those in the Documents and Settings directory, and restarting VirtualBox.. This didn't seem to have any effect.
I then thought about deleting all the C:\.VirtualBox directories, so that it would have to use the Documents and Settings ones.. however, at that point I read your reply.
I managed to fix the issue by copying the contents of C:\Documents and Settings\{username}\.VirtualBox\VirtualBox.xml to C:\.VirtualBox\VirtualBox.xml, and changing any relative paths to absolute ones.
I am not sure why this happened. The only thing I can link it to was some network issues that we had last week when VirtualBox was running. When the network went down, this might have caused VirtualBox to forget which user was logged in, and create files in the root of the C: drive.
*shrug*
Thanks again!
-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Re: VMs have disappeared
Another option is that somehow, the system (or user) environmental variable VBOX_USER_HOME got set, pointing to C:\, instead of your user profile.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
deizel
- Posts: 3
- Joined: 14. Sep 2009, 11:00
- Primary OS: MS Windows XP
- VBox Version: OSE other
- Guest OSses: Ubuntu
Re: VMs have disappeared
Thanks for the suggestion Sasquatch, it seems there only exists one system or user variable for VirtualBox and that is this system variable:
VBOX_INSTALL_PATH=C:\Program Files\Sun\xVM VirtualBox\
I guess it is possible that somehow the VBOX_USER_HOME user variable has been removed, maybe by a network policy change which ran at login, but I can neither confirm nor deny the previous existance of such a variable.
I am happy to have it working for the time being, and this thread should act as a good reference should anyone have a similar problem.
Cheers.
VBOX_INSTALL_PATH=C:\Program Files\Sun\xVM VirtualBox\
I guess it is possible that somehow the VBOX_USER_HOME user variable has been removed, maybe by a network policy change which ran at login, but I can neither confirm nor deny the previous existance of such a variable.
I am happy to have it working for the time being, and this thread should act as a good reference should anyone have a similar problem.
Cheers.
-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Re: VMs have disappeared
By default, the variable isn't on your system. You have to specifically create it and give it a value.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.