Michael Pietroforte
Latest posts by Michael Pietroforte (see all)
- Results of the 4sysops member and author competition in 2018 - Tue, Jan 8 2019
- Why Microsoft is using Windows customers as guinea pigs - Reply to Tim Warner - Tue, Dec 18 2018
- PowerShell remoting with SSH public key authentication - Thu, May 3 2018
The official way to move the VirtualBox folder is to first export your virtual machines to an OVA file and then import the OVA file at the new location:
- Click File > Export Appliance.
- While holding the CTRL key, click the virtual machines you want to export.
- Choose the location of the OVA file, click Next, and then export.
- Change the Default Machine Folder under File > Preferences > General.
- Click File > Important Appliance, select the OVA file, and import.
The downside of this option is that the export and import of the OVA file is extremely slow and error prone.
The faster option is to simply move the VirtualBox folder with the virtual machines to a new location with File Explorer:
- You can usually find the VirtualBox folder in your Documents folder. If you can’t find the folder, check File > Preferences > General > Default Machine Folder.
- Ensure that the VirtualBox VM Manager is closed and all VMs are offline. Then, move the VirtualBox folder to the new location with File Explorer.
- Open the VM Manager and remove all VMs that are marked as inaccessible: hold the CTRL key and click all VMs, and then right-click and select Remove.
- Click File > Virtual Media Manager and remove all hard drives, optical disks, and floppy disks.
- Navigate to each folder in the new VirtualBox directory in File Explorer and double-click the VBOX file to import the corresponding VM.
- Change the Default Machine folder under File > Preferences > General.
Depending on how many VMs you have, step 5 can mean a lot of click-click; however, in my experience, it will always be much faster than with the export/import method.
Are you an IT pro? Apply for membership!
Your question was not answered? Ask in the forum!
Thank you for this good clear explanation. It worked well for me, and it certainly sounds easier than the official method.
Thanks!
You didn't say, but does this work even if you are moving from one OS to another? In my case I have a handful of VirtualBox VMs on an Linux computer that I want to move to a newly installed VirtualBox on a Mac (both machines have Intel CPUs).
I didn't try that, but I don't see any reason why this shouldn't work.
The 2nd method was easy and worked. Thanks for taking the time to write this!
Thanks for this. Was a great help!
Thanks for the article. Just curious - if the machine is in a saved state, can the virtual machine be moved to another folder or drive?
I never tried this, but my (wild) guess is that the first method works. You will probably get an error message if it doesn't. If you try it with the second method, I recommend that you create a second copy of the VM at another location. If it doesn't work, you can restore the original configuration. You might also want to try it first with a test VM.
I changed my user account and folder name and lost access to my VMS. The fast option did the trick.
Thanks for the Article. One minor update you might include.
After moving the files to their new location you don't need to change manually stuff in the GUI. Make sure that VirtualBox is not running. Then just go to "C:\Users\MyUser\.VirtualBox" and open VirtualBox.xml
Replace all occurrences of "C:\Users\MyUser\VirtualBox VMs"
with your new path with an editor of your choice.
No clicking required and this will also change the default path, so you can just start VirtualBox now and use your VMs in the new location.
Tried using both methods and hosed both vms in old location and new location. tried reinstalling the program and still gives fatal erros count not boot media
Great article, thanks! Quick and successful procedure, helped a lot!
Thanks for this.
With VirtualBox 5.2.12 on Ubuntu, at your step 5 I found the syntax is slightly different.
You can't just click on a .VDI file in File Manager (pcmanfm) as nothing recognises what to do with it (neither does Virtualbox, if I point it there).
BUT instead, at the top menu of VirtualBox, if I choose "Machine > Add" - that then invites me to import a VBOX file - so then completing your step 5, works fine.
Thanks again
Mike, London
Step 5 worked for me, I'm running Kubuntu 16.04.
If you have trouble again, jut go into system settings/applications/File Associations and look for .vbox then set the application that you want it to be opened by.
I don't know why it worked for me without doing that first, maybe it's something your system missed!
Awesome man... Thanks a lot. Cheers.
Very clear explanation. Thanks!
Worked flawlessly
Thanks for posting this tip
Hi
I'm getting error whole opening virtual machine.
It gives me failed to open virtual machine located at my new path.
In details tab of the error, it shows Could not find an open hard disk with UUID.
Look for the UUID entry in VM's '.vbox' file. If it is data disk remove the entry and try again.
VirtualBox 6.0 allows you to move an image and it's fast.
Tried this method but lost everything, don't use the fast if you're changing harddrive. it will fail.
You can move VM files and delete the VM item in the list of virtualbox manager, and then ADD the moved VM to the virtualbox manager. That's it. I am using VirtualBox6.0 . Thank you Michael and Jose.