What Is The Best Way To Archive A VM?

Discussions about using Windows guests in VirtualBox.
saberman
Posts: 292
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, 7, 8.1, 10

What Is The Best Way To Archive A VM?

Post by saberman »

I have setup a number of VMs to mimic a clients environment for specific projects. When a project ends I would like to archive the VM associated with the project.

I looked at the export function but that changes the UUID.

Can I simply copy the machine folder (contains machine definition and logs) and the VDI(s) for that machine using CloneVDI to compact the VDI(s) without changing the UUID(s) Is there anything else that needs to be saved?

After I copy the above can I just remove the machine from VirtualBox or do I have first use Virtual Media Manager to unregister and delete the VDI(s) associated with the machine?

Having done the above how do I recreate the VM if I need to do more work on the project. Can I just copy the files back and use Machine\Add? Will that reregister the VDI(s)?
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: What Is The Best Way To Archive A VM?

Post by loukingjr »

Personally I just back up the entire VM Folder without CloneVDI. mpack would know more about using it for compaction than I since he wrote it. :)

You can remove the VM by right clicking on its icon in VirtualBox Manager and select Remove>Delete all files.
You can recreate the VM by copying it from the back up and use "Add…" from the Machine menu and selecting its .vbox file.

All of this info is in the manual.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
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: What Is The Best Way To Archive A VM?

Post by mpack »

CloneVDI is only worth it if you want to minimize space on the backup drive - which IMHO this isn't usually a priority. I would simply copy the VM folder, with contents. If you periodically compact anyway, then backing up right afterwards does make sense.
saberman
Posts: 292
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, 7, 8.1, 10

Re: What Is The Best Way To Archive A VM?

Post by saberman »

loukingjr wrote:You can recreate the VM by copying it from the back up and use "Add…" from the Machine menu and selecting its .vbox file.

All of this info is in the manual.
I can find Remove in the manual. I cannot find Add. Since the location of the VDI(s) is maintained in the VirtualBox xml file how does the Add command add the VDI(s) into the VirtualBox xml file -- especially if they are in a non-standard location.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: What Is The Best Way To Archive A VM?

Post by loukingjr »

The information is there. You have to glean it yourself however. i didn't realize it isn't covered in it's own section.
None the less, see: Moving a VM
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
saberman
Posts: 292
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, 7, 8.1, 10

Re: What Is The Best Way To Archive A VM?

Post by saberman »

>all files belonging to a VM are stored in a single folder, the "VM folder
I do not have that file structure. The VDIs for the many VMs I have are spread over several disks. Does the add command request the location of the VDI(s) that are used by the VM being added back?

>i didn't realize it isn't covered in it's own section.
Is there a section of the manual that includes a description of the Add menu item?

I think I will just have to setup a dummy VM and go through the process of copying it to a new location, removing it, copying it back and adding it and see what happens.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: What Is The Best Way To Archive A VM?

Post by loukingjr »

You're in big trouble if you moved .vdi files out of their default folders. it was set up that way for a reason. One reason was to make it easy to back up VMx.

No, there is no section covering the Add menu.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
saberman
Posts: 292
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, 7, 8.1, 10

Re: What Is The Best Way To Archive A VM?

Post by saberman »

loukingjr wrote:You're in big trouble if you moved .vdi files out of their default folders. it was set up that way for a reason. One reason was to make it easy to back up VMx.
I use a Surface Pro 3 512GB running Windows 8.1 Pro as a host. As the SSD drive is only 512GB I only have high use VMs' VDIs on the internal drive that I always want available when out of the office. The medium use ones are on Aegis Padlock - USB 3.0 drives that I can take with me if I am traveling. The low use ones are on desk top internal drives on another machine.

The .VirtualBox folder that is usually under C:\Users\<Username> has been redirected to be with the rest of the VirtualBox stuff on a pseudo partition. That way I can backup everything from one folder tree. I can also copy everything to another machine with VirtualBox installed and everything will run fine there.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: What Is The Best Way To Archive A VM?

Post by loukingjr »

Then I don't understand the original question. If your setup allows you to easily back up everything from different locations. It should be able to restore them back to their original locations from the backups.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
saberman
Posts: 292
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, 7, 8.1, 10

Re: What Is The Best Way To Archive A VM?

Post by saberman »

I want to archive a number of the VMs and get them completely off my drives -- probably to two copies on 50 GB DVDs -- one copy onsite in case I need it in a hurry and the other offsite in case my machines melt.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: What Is The Best Way To Archive A VM?

Post by loukingjr »

I see. Well honestly you're not asking a VirtualBox question but a how to set up a backup strategy. Beyond the "Moving a VM" page, you're kind of on your own.

It would have been much easier had you kept the .vdi's in their folders. You could have moved them anywhere you wanted then.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
saberman
Posts: 292
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, 7, 8.1, 10

Re: What Is The Best Way To Archive A VM?

Post by saberman »

>Beyond the "Moving a VM" page, you're kind of on your own.
That is the only question I needed an answer to and it appears I'll have to run some tests to figure out exactly how to do it.

>It would have been much easier had you kept the .vdi's in their folders. You could have moved them anywhere you wanted then.
As I said my host only has a 512GB SSD drive -- not big enough to keep all the VDIs on it.
Last edited by saberman on 23. Dec 2015, 05:39, edited 1 time in total.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: What Is The Best Way To Archive A VM?

Post by loukingjr »

Which is why I said you could put them anywhere you wanted. Such as a drive with more space.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
saberman
Posts: 292
Joined: 21. Dec 2009, 00:32
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, 7, 8.1, 10

Re: What Is The Best Way To Archive A VM?

Post by saberman »

>Which is why I said you could put them anywhere you wanted. Such as a drive with more space.
As I ran out of room on the host I moved the least used VDIs to another drive -- I just didn't move the machine definition.
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: What Is The Best Way To Archive A VM?

Post by loukingjr »

Yes, I gathered that. Which is not how to move a VM. Maybe you don't know this, you can change the default location where VMs are created in the VirtualBox preferences. Such as to an external drive.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Post Reply