Page 1 of 2

What Is The Best Way To Archive A VM?

Posted: 22. Dec 2015, 16:25
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)?

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

Posted: 22. Dec 2015, 16:43
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.

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

Posted: 22. Dec 2015, 17:08
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.

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

Posted: 22. Dec 2015, 18:38
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.

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

Posted: 22. Dec 2015, 20:10
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

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

Posted: 22. Dec 2015, 20:26
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.

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

Posted: 22. Dec 2015, 20:42
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.

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

Posted: 22. Dec 2015, 23:19
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.

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

Posted: 22. Dec 2015, 23:56
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.

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

Posted: 23. Dec 2015, 04:59
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.

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

Posted: 23. Dec 2015, 05:05
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.

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

Posted: 23. Dec 2015, 05:37
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.

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

Posted: 23. Dec 2015, 05:38
by loukingjr
Which is why I said you could put them anywhere you wanted. Such as a drive with more space.

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

Posted: 23. Dec 2015, 05:43
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.

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

Posted: 23. Dec 2015, 05:46
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.