Page 1 of 1

[SOLVED] Lost Vista validation on host reinstall

Posted: 11. Oct 2011, 18:56
by jmburton2001
Hello,

I have two Vista VM's (on a secondary drive) on a Vista host. It came to the point of having to wipe and reinstall the host OS using my original disks. When I reattached the previously validated VM's (through the MS call-in system), they lost their validation and now request to be revalidated. What's the solution?

Thanks in advance for your replies!

Re: Lost Vista validation on host reinstall

Posted: 11. Oct 2011, 21:22
by Sasquatch
You probably didn't back up the settings file, which holds the key to the activation. Settings or the hardware UUID can be the reason for this message. See the sticky in Windows Guests for more info.

As for the solution: validate them again. Not really our problem, or a problem caused by VB if you had the settings file backed up so you could add that as a new VM.

Re: Lost Vista validation on host reinstall

Posted: 11. Oct 2011, 23:59
by jmburton2001
Hi Sasquatch,

It's not that I "probably didn't"... I flat out didn't. My bad! For future reference, can you point me to a post or thread that explains what to do (and what to backup) to keep from losing validation when reinstalling the host system?

Thanks again!

Re: Lost Vista validation on host reinstall

Posted: 12. Oct 2011, 00:13
by Sasquatch
Take note of the VM file location (which can be changed in the VB preferences) and back it up. Then after a wipe, you simply restore it. Default location used to be %userprofile%\.VirtualBox, but it recently changed to "VirtualBox VMs". Since I don't use Windows as Host, you have to look in your user profile yourself to see where the VMs are stored.

Note that if you did a Windows backup of the user profile, you would have backed up the VMs as well. I do find it odd that you got the VDI files, but not the rest. Usually when someone knows how to change a location to put a file also knows how to look in the program settings to see if there are any other paths that may be changed if the user would wish to.

Re: Lost Vista validation on host reinstall

Posted: 12. Oct 2011, 00:54
by jmburton2001
Thanks again Sasquatch!

In the VirtualBox general settings I have my default machine folder set to "D:\Virtual Machines" which is where I always setup my VM's (just in case of catastrophic failure :shock: ). I guess that isn't exactly how it goes... Upon closer review I find that VirtualBox also creates a .VirtualBox directory inside my user profile on the host system. This directory includes subdirectories for HardDisks and Machines with associated xml and log files.

Is this the information I should have backed up?

Re: Lost Vista validation on host reinstall

Posted: 12. Oct 2011, 20:02
by Etepetete
jmburton2001 wrote:Upon closer review I find that VirtualBox also creates a .VirtualBox directory inside my user profile on the host system. This directory includes subdirectories for HardDisks and Machines with associated xml and log files.
It looks like you have residues of a default installation of a VBox version 3.x :!:
If you are using version 4.x you should have .vbox files for VMs.
I am using WinXP and also have my machines on a separate drive. The only files I have under the .VirtualBox directory settings in my user profile are VBoxSVC.log, VirtualBox.xml and VirtualBox.xml-prev
It looks like you need to cleanup the .VirtualBox directory. Make sure that the VM .vbox files as well as the .vdi files for your machines have been saved to another drive/folder as well as the three files listed above before doing anythng. Best thing to do would be to back up all of them. Who knows if your machines are really under your D drive.

Re: Lost Vista validation on host reinstall

Posted: 12. Oct 2011, 21:09
by jmburton2001
Hi etepetete,

I believe you may be correct about the leftovers. I've been using VB for quite a few years now... Currently using -> VirtualBox 4.1.2. My vdi's are physically located on my secondary drive and show the "modified" date and time in conjunction with their actual usage. So I know that I'm accessing the secondary drive vdi's.

In my user profile on the host under .Virtualbox\, the following files are updated according to my vdi usage on the secondary drive:
VBoxSVC.log
VirtualBox.xml
VirtualBox.xml-prev

In addition, the .VirtualBox\Machines folder contains a subdirectory for each machine (vdi) that exists on my secondary drive. Each of those contains an xml and xml-prev file as well as a "Logs" directory that corresponds to the access date for the vdi.

How can I get all this to exist and point to my secondary drive so I don't run into this in the future? It's a rarity for me to format the host system, but it does happen.

This brings up another question...
If I procure a new computer and install my secondary drive into it... How do I make sure I don't run into the validation problem again (i.e. lose my VM's)?

Re: Lost Vista validation on host reinstall

Posted: 13. Oct 2011, 12:47
by Etepetete
Hey jmburton2001,
If you really want to clean up your installation you are going to need some time, patience and concentration to get it right. After going through the process, you will probably have to validate your Vista VMs again, which is nothing serious or problematic. The following instructions are to get your installation and your VMs into the newer 4.x format. One advantage of the newer format is that all VMs and their VDIs, logs and snapshots are stored in one corresponding folder. This makes it easier to backup VMs and VDIs, as you only need to copy the the corresponding folders to another location. Also, it is very important to copy/backup the contents of the .VirtualBox folder as well. This is the only way to insure that future transferring to another Host or restoring backups actually works.
jmburton2001 wrote:If I procure a new computer and install my secondary drive into it... How do I make sure I don't run into the validation problem again (i.e. lose my VM's)?
Well, if you install your secondary drive into a new computer, the drive letter may have changed and you will be required to edit the VirtualBox.xml and the VM xml files to reflect that change. It is important that you have backups and understand what you are doing, editing the VirtualBox.xml or the VM vbox files can cause severe problems if done incorrectly. If you lose your VMs and don't have backups, you are screwed. If you loose your VirtualBox.xml file but still have your VMs, you'll have to follow the steps listed below.
jmburton2001 wrote:In addition, the .VirtualBox\Machines folder contains a subdirectory for each machine (vdi) that exists on my secondary drive. Each of those contains an xml and xml-prev file as well as a "Logs" directory that corresponds to the access date for the vdi.
If you don't have VDIs in your default VM folder, then I would assume, that the above mentioned VDIs are the ones you need for the steps below. If you do have VDIs in the default VM folder, you need to figure out which ones are actually being used by your VMs (check in the settings for each VM (GUI)).

A tip before I describe how to setup your installation to reflect the new format of the 4.x version of VBox: You will need an editor for at the least, viewing the xml and vbox files. I use Notepad++ and can recommend it. One nice thing is you can setup the program to display vbox files as xml files (in essence that is what they are). Under Settings -> Styler Configurator, select language XML and add the extension 'vbox' (without the preceding '.') in the "User extension" edit box. (To add multiple extensions separate them using space.) This makes reading the vbox files much easier.

:!: If you are using snapshots the first thing you need to do is merge them.
  1. Backup all files, i.e. everything under your user profile/.VirtualBox and the "D:\Virtual Machines" folder :!:
  2. Start the VBox GUI.
  3. Uninstall the extension pack.
  4. Exit the VBox GUI.
  5. Uninstall VBox.
  6. Reboot your host.
  7. Delete the user profile/.VirtualBox folder and all its contents.
  8. Delete "D:\Virtual Machines" and all its contents.
  9. I normally clean my registry. I use a combination of automated tools and editing by hand. I won't suggest any tools as it has happened that some forum user have reacted vehemently against them. If you don't have experience editing the registry by hand, forget it! You can cause serious damage to your host system if you make mistakes. Otherwise I make sure that under HKLM\SOFTWARE\Oracle\VirtualBox the VirtualBox entry is deleted.
  10. Reboot your host so that the new registry is loaded.
  11. Install VirtualBox. (I use WinXP as host OS. From what I've read in other threads in the forum, it is often better to install VBox in Vista and above using the 'Run as Administrator' option on the installer.)
  12. Start the VBox GUI and under Global Settings install the extension pack (if you haven't already downloaded it, now is the best time to do it).
  13. Create the folder on your other drive which is to contain your VM files. (In your case 'D:\Virtual Machines'. I use the folder "VirtualBox VMs", using the default leaves me with one thing less to remember.)
  14. Under Global Settings/General set the default path for VMs to the folder you created above.
  15. For each of your previous VMs create a corresponding VM using the GUI. Go ahead and create a new VDI, this will be removed later.
  16. Important is to make sure the settings of this new VM are exactly the same as in the previous VMs. To do this open the previous VM xml files in your editor and check to make sure things such as CPU count, HardwareVirtEx, HardwareVirtExNestedPaging, Chipset type, etc. are the same. Make changes to your newly created VMs only through the GUI! (Be aware that the contents of the xml files have been extended and that there are settings available in the 4.x versions, which were not present in the 3.x version. An example for this would be 'HID Pointing'. This also contains the setting for 'Absolute pointing device' I would deactivate that in the new VMs.)
  17. Once you have finished creating the VMs detach the newly created VDIs from them, yes, you can let VBox delete them.
  18. Close the VBox GUI.
  19. Using Windows Explorer, copy the previous VDIs (and only the VDIs) into the corresponding folders in the default folder for your VMs (the same folder as the vbox files are in).
  20. Start the VBox GUI.
  21. Attach the copied VDIs to their corresponding VMs.
  22. Now you should be able to start each VM, and more than likely, have to activate them. (If the Guest Additions for the current installation have already been installed, fine. If not, install them now. You might need to reboot into safe mode for this.)
So, now once you are sure you have all your VMs working, you can delete all the crud from the previous installation (maybe in a few days time).

Okay, now it is important to keep up-to-date backups of your user profile/.VirtualBox files and all the folders/files in the default folder for your VMs.
Let's assume, you have to wipe and re-install your host OS. Once that is done:
  1. Install VirtualBox.
  2. Install the extension pack.
  3. Set the default folder for your VMs (exactly as it was previously!).
  4. Exit the VBox GUI.
  5. Copy the VirtualBox.xml file that you backed up to the user profile/.VirtualBox directory (you don't need the other files and can delete them).
  6. Copy all the VM folders, including sub-folders, you backed up to the default folder location.
  7. Start the VBox GUI and everything should be exactly as it was before the new installation of your OS. This works even with snapshots. All necessary information and data is contained in the files and folders you just restored.
Have fun :lol: