Virtualbox - use external machines
We don’t want to no longer use default path for external drives, because of i.e lack of space on our main drive so we want to use external (or we just don’t want to use our main drive for this).
Scenario 1: we don’t have machines
This solution is the best if you don’t have any existing virtual machines already created. Then just go to
General and change Default machine folder.
Scenario 2: you have already created machines
This solution is a bit more complicated and dedicated for situation we have already some machines created and you want to easly transform them to the external drive without changing ther config files.
- Close all VirtualBox processes (running vms, VirtualBox main window).
- Create dedicated directory on external drive for VMs:
mkdir /media/root/mydrive/VMs, where
/media/root/mydriveis path to your mounted drive.
- Copy existing VMs on your machine to external drive:
cp -r ~/VirtualBox\ VMs /media/root/mydrive/VMs
- Verify if everything is copied successfully.
- Remove VBox directory
rm -rf ~/VirtualBox\ VMs.
- Create link to external drive:
ln -s /media/root/mydrive/VMs ~/VirtualBox\ VMs.
- Now open VirtualBox, machines should be still visible.