VirtualBox on USB Drive?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
IliyanIlievUXUI
Posts: 10
Joined: 6. Jan 2021, 17:05

VirtualBox on USB Drive?

Post by IliyanIlievUXUI »

Hello,

First of all I don't know if this is the right place to post this topic, if not I am sorry its my first time posting here.
So I am wondering how can I run VirtualBox from Usb drive (not boot it as startup, but just plugging it while my Windows Host is running and running VirtualBox like its installed on my Host but actually its installed on the USB drive)

I will be happy to hear your opinion regarding my question

Best,
Iliyan
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: VirtualBox on USB Drive?

Post by scottgus1 »

You will always have to install Virtualbox on the host computer to run Virtualbox VMs. Can't get around that. You cannot install Virtualbox in the USB drive and switch the drive around to different computers and just have it start up: DLLs and services need to be registered with the host computer. Also, permissions for a USB drive may not be correct for running a program installed on the drive itself.

You can have a VM on a USB drive if you account for these things:

Only USB 3 & greater has any chance of a decent OS activity speed.

USB thumb drives are not designed to handle the constant writes that a full OS causes, and the device will overheat and break quickly. A USB 3 SSD drive can handle running an OS, though, because it's an SSD.

You can install Virtualbox on the computer and store the VM on the USB SSD drive. Just be careful to not disconnect the drive while the VM is running, or data loss can occur.
IliyanIlievUXUI
Posts: 10
Joined: 6. Jan 2021, 17:05

Re: VirtualBox on USB Drive?

Post by IliyanIlievUXUI »

I think installing VM on USB is what I am actually looking for.

So I can store my VM (for example Whonix) on my USB and in order to run it, the host machine to which I plug my USB must have VirtualBox in order to run, am I correct so far?

What is the process of having my VM on USB?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: VirtualBox on USB Drive?

Post by scottgus1 »

IliyanIlievUXUI wrote:I can store my VM (for example Whonix) on my USB and in order to run it, the host machine to which I plug my USB must have VirtualBox in order to run, am I correct so far?
Correct.

The USB must be a platter drive or an SSD. A regular thumb drive will be destroyed.
IliyanIlievUXUI wrote:What is the process of having my VM on USB?
After you get Virtualbox installed on the computer and make a working VM on the computer's hard drive, shut down the VM. Right-click the VM in the main Virtualbox window and click Move. You can then move the VM to the USB SSD or platter drive.

On other computers, after you install Virtualbox, you can double-click the VM's .vbox file to register the USB VM with the Virtualbox on the new computer.
IliyanIlievUXUI
Posts: 10
Joined: 6. Jan 2021, 17:05

Re: VirtualBox on USB Drive?

Post by IliyanIlievUXUI »

scottgus1 wrote:
IliyanIlievUXUI wrote:I can store my VM (for example Whonix) on my USB and in order to run it, the host machine to which I plug my USB must have VirtualBox in order to run, am I correct so far?
Correct.

The USB must be a platter drive or an SSD. A regular thumb drive will be destroyed.
IliyanIlievUXUI wrote:What is the process of having my VM on USB?
After you get Virtualbox installed on the computer and make a working VM on the computer's hard drive, shut down the VM. Right-click the VM in the main Virtualbox window and click Move. You can then move the VM to the USB SSD or platter drive.

On other computers, after you install Virtualbox, you can double-click the VM's .vbox file to register the USB VM with the Virtualbox on the new computer.
I just did all of the steps and it works. Thanks!

My USB is Kingston SE9 G2 32GB / 3.0.

One thing I noticed is (since Im using Whonix) when I moved the VMs to the USB and then clicked "Start" the Whonix Gateway said "less than 1950mb ram , creating swampfile.." I did not got this error when I was setting up the same VM while it was on my Host hard drive. Then I started the Whonix Workstation and I did not get this error and it did not created swampfile.
Is there any particular reason for this?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: VirtualBox on USB Drive?

Post by scottgus1 »

No ideas about the swapfile, here.
IliyanIlievUXUI wrote:Kingston SE9 G2
scottgus1 wrote:USB thumb drives are not designed to handle the constant writes that a full OS causes, and the device will overheat and break quickly.
scottgus1 wrote:The USB must be a platter drive or an SSD. A regular thumb drive will be destroyed.
The Kingston SE9 G2 is not an SSD or a platter drive. It may die soon from running a VM on it.
IliyanIlievUXUI
Posts: 10
Joined: 6. Jan 2021, 17:05

Re: VirtualBox on USB Drive?

Post by IliyanIlievUXUI »

scottgus1 wrote:No ideas about the swapfile, here.
IliyanIlievUXUI wrote:Kingston SE9 G2
scottgus1 wrote:USB thumb drives are not designed to handle the constant writes that a full OS causes, and the device will overheat and break quickly.
scottgus1 wrote:The USB must be a platter drive or an SSD. A regular thumb drive will be destroyed.
The Kingston SE9 G2 is not an SSD or a platter drive. It may die soon from running a VM on it.
I will have that on my mind.

Thank You for the help!
Post Reply