Page 1 of 1

New vs. old directory structure

Posted: 24. Feb 2011, 00:35
by slimemold
I'm running Virtualbox 4.0.4, steadily upgrading on each release since some 3.x version. Host is OSX 10.6.

I have my virtual machines in ~/Library/VirtualBox.

I noticed that at some point, the directory structure for virtual machines has changed. Previously, virtual disks were stored in a folder called HardDisks, and the virtual machine settings were in Machines.

Recently, though, I installed a new Win7 virtual machine, and noticed that it placed everything in a Windows 7 folder.

I'd like to migrate to this new directory scheme. How do I go about converting my old stuff to the new scheme?

Re: New vs. old directory structure

Posted: 26. Feb 2011, 17:26
by Sasquatch
There isn't a real conversion for it. If you have snapshots, will be a disaster getting it to work properly (involves manual editing of the config files where you can fubar it pretty bad when done wrong). If you don't have snapshots, then simply unregister the VDI files from the VM, keep the file itself and move it to the VM folder and register it again.

Re: New vs. old directory structure

Posted: 18. May 2012, 11:49
by davids_dad
So if we can edit the config file, but it is easy to mess it up. Has anyone written a script to do it?

I am running Debian, so files are in different location, but I would imagine a script could be written for mac and gnu/linux. Ms-windows may be harder.

Re: New vs. old directory structure

Posted: 18. May 2012, 13:04
by davids_dad
I have just discovered that making a clone will migrate the vm to the new format with all snapshots. You have to do a full clone, all states.

The problem is it can take a long time and you need enough temporary (you can delete the original afterwards) disk space for 2 copies of the vm. I would like a tool that does not have to copy all the files.

Re: New vs. old directory structure

Posted: 19. May 2012, 11:05
by mpack
Such a tool would be a minority interest to begin with, and of course guarantees its own obsolesence, so I doubt resources will be spent on it. In any case, as you have pointed out yourself, it isn't needed. Those who know how will quickly edit the xml. Those who don't can use cloning, and live with the one off time cost.

Re: New vs. old directory structure

Posted: 21. May 2012, 11:41
by davids_dad
Thank you for telling be why it will probably not be none. I had not realised the problem.

I have 3 VMs 2 I migrated using the cloning technique, because that was quickest. (my time is worth more the cpu time). But for the other I do not have enough disk space. If I write a script I will publish it here, (IF).

There are 2 types of people in the world, those that can explain why it can not or will not be done, and those that do it.

Re: New vs. old directory structure

Posted: 21. May 2012, 12:00
by ChipMcK
Months (years?) ago I used an OS X script to export and then import my VMs.
I no longer have record of where it was acquired.
The processing went quickly as I recall and the VMs were import into the new directory structure

Re: New vs. old directory structure

Posted: 21. May 2012, 12:07
by mpack
davids_dad wrote:Thank you for telling be why it will probably not be none. I had not realised the problem «sarcasm mode off».
Why the sarcasm? If you knew that it couldn't be done, then why did you ask anyway? And given that you asked: what other answer should I have given except the accurate and factual answer to your request?

Btw: in future, please keep a civil tone. Abuse will not be tolerated.