Fail: How to move a VM to another disk (same machine)

This is for discussing general topics about how to use VirtualBox.
actionmystique
Posts: 28
Joined: 28. Feb 2013, 10:18
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: Ubuntu 15.04, Windows 7, Windows Server
Location: Paris, France

Re: Fail: How to move a VM to another disk (same machine)

Post by actionmystique »

That's the difference between nice and great products. Great products don't need a lot of knowledge to use them. It is still possible for VB to become a great product:
  • How difficult is it to add a simple "move..." in the machine menu (which is of course different from copying the VM), with the Snapshots and Logs folders location automatically updated?
    This could be done locally across different folders/drives or even remotely across different hosts through the network.
Jean-Christophe Manciot
G+/+jeanchristopheManciot-IT/posts
Twitter @jc_manciot
GitHub /jean-christophe-manciot
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Fail: How to move a VM to another disk (same machine)

Post by mpack »

You should post that sort of comment in the Suggestions forum.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Fail: How to move a VM to another disk (same machine)

Post by Perryg »

How difficult is it to add a simple "move..."
There you go, that's the real question isn't it. A simple move is not that simple to code especially across various supported OSes. If it were then it would be done already.
VirtualBox does not simply support Windows but also Mac, Linux, Solaris.

It is really simple to add the words to the GUI but now you must make it actually work. Of course as always, VirtualBox is open source and contributions are always welcome.
VickersNick
Posts: 41
Joined: 10. Jan 2014, 21:38
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: XP, 7, Ubuntu, Mint

Re: Fail: How to move a VM to another disk (same machine)

Post by VickersNick »

pancakesaregood wrote:Hello All, not sure if any of you are having this issue still but I've got the easiest and quickest way to do this for you.

Step 1: Close and make sure VirtualBox isn't running (make sure the service isn't running in the background)
Step 2: Copy the VirtualBox VMs folder to the desired location in a new folder/drive
Step 3: Backup and then open up the VirtualBox.xml file (for me its located in C:\Users\me\.VirtualBox) then make your way down to the <MachineRegistry> section there you can change the path that VirtualBox looks for the machines vdi's etc
Step 4: Save the VirtualBox.xml file and delete the old VirtualBox VMs
Step 5: Start up VirtualBox and all of your machines will now run from the new location

This took me a total of 5 minutes aside from copying the VMs, its much easier then trying to do it through the GUI because an XML file doesn't complain about duplicate GUIDs.
Thanks for this method. Super easy.

Edit: I used Notepad++ to edit the XML file.
RavingNoah
Posts: 3
Joined: 17. Sep 2014, 19:34
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: MS Windows XP Home, MS Windows 98, MS Windows 95 Plus!, MS-DOS 6.22, MS-DOS 7.1
Location: Salem, OR USA
Contact:

Re: Fail: How to move a VM to another disk (same machine)

Post by RavingNoah »

Oh, boy. I hope all this has worked itself out. I've been having issues (unrelated to Virtualbox) with my Win7 machine and was thinking of consolidating, reorganizing my PC, which started its life as a Vista 64-bit machine. Some bluescreen/bad graphics card compatibility issues are making me consider moving all my files around, deleting both OS's and establishing Vista as the main OS (seems to like my hardware better) and perhaps just use Win 7 as another VM (if I need it...not sure I do).

Anyhow, all that to say...I created my current few VMs (from my old disks), of Win95/98, XP Home (my pride and joy VM)...an MS-DOS 6.22 one and a 7.1 version. I created these on a Windows 7 64-bit OS, and my only real trepidation is that I won't be able to import them into Virtualbox running on Windows Vista 64-bit. Technically, I'm still working out the kinks of being a Virtualbox user and if I had to just create all new ones...I guess it wouldn't break my heart, but the more I begin to rely on Virtualbox, the more agitated I get at the thought of being uncertain about what level of expertise I'm supposed to have to use it.

I guess I could do a test run and see how it turns out by following the many competing step-by-step instructions fought over in this thread. ...sigh, wish me luck...
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Fail: How to move a VM to another disk (same machine)

Post by mpack »

See the tutorials section for a clearer discussion.
RavingNoah
Posts: 3
Joined: 17. Sep 2014, 19:34
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: MS Windows XP Home, MS Windows 98, MS Windows 95 Plus!, MS-DOS 6.22, MS-DOS 7.1
Location: Salem, OR USA
Contact:

Re: Fail: How to move a VM to another disk (same machine)

Post by RavingNoah »

Yeah, the whole thing is moot, I guess. I suppose since my concern is about moving a virtual machine between two OSs on one computer (but separate drives), we might as well be talking about a different 'system.' As such, it doesn't fall under the scope of "same machine," and the 'export appliance' process was pretty dummy-proof. I'm staring at a perfectly-rendered new instance of my soon-to-be-deleted old XP VM on Windows 7, so I'm pretty happy with it.

:)
Pavel_22
Posts: 1
Joined: 6. Jun 2015, 01:32

Re: Fail: How to move a VM to another disk (same machine)

Post by Pavel_22 »

Thanks for help. I was too lazy to look for an option but there it is (I found it after I had to explore menus in the manager):
File -> Preferences [ctrl+G] -> general (the first option - I have it in Czech language). There are two radioboxes and in the first one you can choose where you want to place the files regarding to that machine. Very simple
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Fail: How to move a VM to another disk (same machine)

Post by mpack »

No, that option does not move existing machines, it just sets the default parent folder for new machines (ones that don't exist yet).

For the correct way to move a VM see HOWTO move a VM.
h2oplr11
Posts: 1
Joined: 9. Oct 2010, 18:28
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Windows Home Server

Re: Fail: How to move a VM to another disk (same machine)

Post by h2oplr11 »

Zunny, thanks tons. This was easily done on my Windows 10 host.
Post Reply