Hello,
I've noticed that (at least for the VirtualBox version supplied by Debian) the "new" format for storing machine descriptions, which was introduced with VirtualBox 4.0, seems to be much more robust.
For machines stored in the "old" format, VirtualBox sometimes crashes when I try to revert the machine state to some snapshot: On clicking the "revert" button, it creates a new differencing VDI file, updates some data in the configuration files (or the "parent" VDI? - no idea), so the machine knows that the freshly created VDI should store all the upcoming changes to the machine's hard drive contents, but then crashes before registrering the new VDI in the media registry which is found in the "global" configuration file. On the next start, VirtualBox then is unable to access the freshly created VDI (it is not found in the media registry, so VirtualBox does not know where it is stored), and so I can't use the machine. To get it working again, I usually manually modify the media registry - which is quite annoying and can also introduce bad errors into my machine configuration.
For machines stored in the "new" format, VirtualBox also crashes sometimes when reverting to a present snapshot - however, when I start VirtualBox again, I find the machine in the exactly same state it had before attempting to revert to the snapshot, and simply clicking the "recvert" button does the job.
I can live with these crashes, since they don't happen too often. However, I'd like to convert my pre-4.0 machines to the "new" 4.0 machine format, since for this format, a crash while reverting to a snapshot seems not to corrupt any configuration files, and I need no manual modifications to any config files to get the machine up and running again.
So my question is: Is there an easy way to do this conversion?
convert machine configuration from pre-4.0 to 4.0 format
-
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: convert machine configuration from pre-4.0 to 4.0 format
You can try the new VM cloning feature. Note that this will change hard disk and VM UUIDs.stormhead wrote:So my question is: Is there an easy way to do this conversion?
I have used the new cloning feature to clone a legacy VM, and it does get converted to the v4 format. However none of my VMs use snapshots, so I can say nothing about that aspect.
-
stormhead
- Posts: 5
- Joined: 10. Aug 2011, 08:59
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Windows 7/2000/NT, Debian Squeeze/Sid
Re: convert machine configuration from pre-4.0 to 4.0 format
Thanks a lot; the cloning feature does the trick. VirtualBox detetcs that I use snapshots with the machine I'd like to clone, and it asks me if I want to clone all snapshots or only the current state - so it also works with snapshots.
However, since cloning the VDIs takes quite some time, it would be nice if there was a way to convert an existing VM from the old machine format to the new one without cloning the VDIs, but by simply re-creating the machine description file in the new format (e.g. by reading the pre-4.0 .xml file and central media registry, and then creating a 4.0 .vbox file with basically the same information, while using the exact same VDI files in both machine descriptions).
Maybe this would be a nice addition if the machine file format changes again in the future!
However, since cloning the VDIs takes quite some time, it would be nice if there was a way to convert an existing VM from the old machine format to the new one without cloning the VDIs, but by simply re-creating the machine description file in the new format (e.g. by reading the pre-4.0 .xml file and central media registry, and then creating a 4.0 .vbox file with basically the same information, while using the exact same VDI files in both machine descriptions).
Maybe this would be a nice addition if the machine file format changes again in the future!
-
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: convert machine configuration from pre-4.0 to 4.0 format
There is a way - you can manually edit the xml. In fact what I did (pre v4.1) to convert mine was create a new VM similar to the old VM, giving me the basic skeleton, then I edited the VM UUID and the UUIDs and filenames in the media registry. However I still cloned the VDI because I was not about to try out a new VM hardware recipe on an existing VDI without taking a backup first! Like I said before, I don't use snapshots so everything I've mentioned was easy.stormhead wrote:However, since cloning the VDIs takes quite some time, it would be nice if there was a way to convert an existing VM from the old machine format to the new one without cloning the VDIs
-
stormhead
- Posts: 5
- Joined: 10. Aug 2011, 08:59
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Windows 7/2000/NT, Debian Squeeze/Sid
Re: convert machine configuration from pre-4.0 to 4.0 format
Sure, manually editing the XML (or vbox) files works. But since these files get more and more complex with an increasing number of snapshots (maybe with hardware changes between two snapshots, the chance of messing things up also becomes larger. Which is why a "format conversion" function within VirtualBox would be a really nice feature. I'll put that in the "which features would you like to see" thread.
-
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: convert machine configuration from pre-4.0 to 4.0 format
I can't see the devteam putting effort into a feature like that: the feature would have a short window of usefulness, and of course will bring no praise - only bitching from the noobs who somehow find a way to break their VMs with it.