Virtualbox - load VMs from USB

1 minute read

Virtualbox - use external machines

Problem

​ 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). ​

Solution

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 VirtualBox, Preferences, 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. ​

  1. Close all VirtualBox processes (running vms, VirtualBox main window).
  2. Create dedicated directory on external drive for VMs: mkdir /media/root/mydrive/VMs, where /media/root/mydrive is path to your mounted drive.
  3. Copy existing VMs on your machine to external drive: cp -r ~/VirtualBox\ VMs /media/root/mydrive/VMs
  4. Verify if everything is copied successfully.
  5. Remove VBox directory rm -rf ~/VirtualBox\ VMs.
  6. Create link to external drive: ln -s /media/root/mydrive/VMs ~/VirtualBox\ VMs.
  7. Now open VirtualBox, machines should be still visible.

Tags:

Categories: ,

Updated: