New vs. old directory structure

This is for discussing general topics about how to use VirtualBox.
Post Reply
slimemold
Posts: 1
Joined: 24. Feb 2011, 00:31
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Ubuntu, WinXP

New vs. old directory structure

Post 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?
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: New vs. old directory structure

Post 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.
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.
davids_dad
Posts: 11
Joined: 18. May 2012, 11:08
Primary OS: Debian Squeeze
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, windos, others
Location: England

Re: New vs. old directory structure

Post 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.
davids_dad
Posts: 11
Joined: 18. May 2012, 11:08
Primary OS: Debian Squeeze
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, windos, others
Location: England

Re: New vs. old directory structure

Post 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.
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: New vs. old directory structure

Post 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.
davids_dad
Posts: 11
Joined: 18. May 2012, 11:08
Primary OS: Debian Squeeze
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Ubuntu, windos, others
Location: England

Re: New vs. old directory structure

Post 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.
Last edited by davids_dad on 21. May 2012, 12:25, edited 1 time in total.
ChipMcK
Volunteer
Posts: 1095
Joined: 20. May 2009, 02:17
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, OSX
Location: U S of A

Re: New vs. old directory structure

Post 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
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: New vs. old directory structure

Post 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.
Post Reply