Run Virtual Machines Off an External Hard Drive


Run Virtual Machines Off an External Hard Drive

Often when I lab, running virtual machines will quickly fill up my computer space. This is especially an issue for networking multiple virtual machines in larger endeavors. A better computer could fix this, or the option I might take is to run them off an external drive.

Can you run a virtual machine off an external drive? Virtual machines like the VMWare suite have the ability to run off an external hard drive. The setup is simple and can be done for current or previous running virtual machines (VMs) by storing the VM file to the external drive. To run these VMs, navigate the virtual workstation to the external drive.

To test this out, I bought a USB drive to run my virtual machine from. There was noticeable lag, but it worked. That’s when I learned that some external drives are more efficient than others when it comes to running VMs.

How to Run VMs Off an External Hard Drive

Running VMs off an external drive can be done for hypervisors such as VirtualBox and VMWare Workstation. Because they’re so common, I’ll mostly be writing about these with more detail.

I’ll mostly describe the basics of VM storage and running them externally. An experienced VM user will find this process pretty intuitive. I’ll just help show you the locations of where your local VMs are typically stored. It’ll save you some time so you don’t have to go searching for them. Then you can copy your current VMs off to an external drive and run them. 

For currently running VMs, you can simply just choose to save your current instance off an external drive. The next time you want to spin them up, just make sure your drive is plugged in and your good to go.

With VMs that have already been created and saved locally. Make sure you have VM optimized redundancy elsewhere when you decide to move or copy them to an external drive. At least, this is best practice anyway.

If you’re using VirtualBox, the default storage for your VMs will be in  C:\Users\username\VirtualBox VMs. Locate your VMs you want to move to your external drive. If it helps the VM file extension will end with .vdi ie VirtualBoxVM.vdi.

Similarly, VMWare Workstation will store VMs by default onto C:\Users\username\Documents\Virtual Machines. The VM file extension will be .vmdk.

Once they are moved over, you can navigate to File then click Open and navigate to the VM off the external drive.

Viola! You are now running a VM off an external drive!

You may notice a few things that are different when you’re running on your external drive. It could be very laggy or have a little lag. This is common.

If the process is seamless to your normal usage, that’s great you’ve already optimized for an external drive for VMs. Else, there are other things that can be done to avoid this.

Efficient External Drives that can Run VMs

If you have a USB drive sitting around, you could immediately try running your VMs off of the USB.

You’ll quickly notice that running off the USB drive is significantly more laggy than running the VMs on your local drive. There are multiple reasons for this. For instance, you can’t beat communication speeds with a drive directly integrated on the motherboard compared to a drive plugged to an external port. It would be ideal if the bus speeds were the same for the external drive. You can’t really change that. But you can control other factors that contribute to lag.

Lab like the cool kids, with one of THESE!

The good news is you can run your VMs of an external drive without noticing the lab by using faster drives.

The best way to improve the user experience is to run your VMs on fast drives. For example, choosing a solid-state drive over a spinning hard drive will improve performance. Furthermore, choosing between solid states means that the benchmark for faster speeds will also improve performance.

You can run the VMs off a USB drive like this thumb drive. This has 128 GB of storage with bus speeds compatible up to USB 3.0. This is portable and can fit a few VMs. But you will notice lag immediately when you boot your VMs from this USB. If you’re looking into something like this, it would be better that your VMs be created locally and then transferred off. This way you can run the VMs off the USB in the background. Which is okay if your lab only requires resources from the VMs in the USB over having to configure the VM while live.

If you are trying to configure VMs live and with significantly better performance I would advise in getting a external drive that is VM optimized. Because the drive is meant to fit with an enclosed motherboard, it will need an external enclosure. This will allow you to connect this drive to an external USB port. You’ll notice the that the performance of this is suited for running VMs. It is a bit heftier on the price, but if considered an investment this will be a huge value add. It’s 1 TB of fast read and write speeds for solid-state as well as fast bus speeds compatible up to 3.0 USB drives. Good luck filling this drive up with your VMs.

For the budget-friendly, without compromising performance I would look into this lower storage that’s optimized for VM. The biggest difference here versus the one directly above is that the storage is 250 GB. You can do a lot with that. If you don’t plan on scaling your lab environment much more than that, this would be a good purchase.

Port Types Matter

Aspects that contribute to the speed which VMs run off an external drive include RAM, and port types. Unless you’re getting a new laptop to run create your virtual labs, RAM will probably be not part of your consideration. With purchasing an external drive to run VMs, your port types should be considered.

USB ports are not standardized across the board with traffic throughput. With more reasons for faster data to come from external ports for the consumer market, USB port versions evolved over time. USB ports with higher speeds would be categorized with a higher version number and a different symbol.

To find the version of your USB ports, you can scroll through your computer’s device manager to find the ports with the highest version. Or you can look for the symbol that should be stamped beside the USB port. This is probably going to be your easiest bet.

You will want to connect the external drive for your VMs on the USB port with the highest version.

  • USB 2.0 will have a symbol that looks begins with a dot and three lines branching out to the right.
  • USB 3.0 will begin with SS and have three lines branching out to the right.

Most new laptops will have USB 3.0, just default to memorizing that port and plugging your external drive in there whenever you start labbing. This way you optimize your read and write speeds by having a quality external drive by having a fast speed throughput to your motherboard.

Related Questions

What’s the most highly optimized external drive to run VMs?

Building virtual machines is an iterative process. There are a lot of times when new labs require deleting old labs because of space issues. Which is super unfortunate because you start to anticipate the regret of deleting it because you will probably have to rebuild it again.

An external drive that has higher storage capacity that scales to your lab would be the most optimal. For some this looks like 128 GB, and others 256 GB. For really large environments or when more iterations for virtual machines are required, 1TB+ would be worth looking into.

Don’t forget it is super important that the external drive doesn’t give VM lag. The external drive should have medium to high read and write speeds, along with fast USB throughput to deal with this.

What are recommended laptops for virtual machines?

People don’t consider display when shopping for laptops for virtual machines. A big advice is to not get a laptop with 4k resolution. Virtual machines are not supported when running on these screens. You can still run your virtual workstation environment but your applications within them will look very clunky. For instance the resolution will display larger or smaller in an inconvenient way. This makes applications within the virtual machines not clickable or understandable.

Beyond that, the basics for the best laptops the run virtual machines will have a faster processor and other primary hardware components that are also fast. Usually this means having a newer processor core (or cores newer i7 or newer XEONs are great), for RAM 16GB is a safe number but could reach more if you get super fancy, and finally have a 1TB+ solid-state drive (many newer laptops are coming out with M2 drives).

Recent Posts