Virtual Machines are fascinating software implementations that allow you to run operating systems. There are many virtualization software available including VMWare and VirtualBox. Even Microsoft offers an inbuilt hypervisor called ‘Hyper-V’ to create and run virtual machines.
But have you wondered whether you can run Ubuntu installed on a USB drive inside a Virtual Machine? Well, it is possible to do so. In this post, we will elaborate on how to run an operating system installed on a USB drive in VMware Workstation 16 Player. Without further ado, let’s hop into the details.
Why Run an Operating System Installed on a USB Drive in a Virtual Machine?
Well, technically you can run Ubuntu installed on a USB drive on your PC directly. You just have to go to the boot menu in BIOS and select the Ubuntu drive as your boot device. But even that has its limitations.
You cannot access or switch to the primary operating system on your PC. But in a virtual machine, you can easily access Ubuntu or any other operating system on your USB drive. You can minimize/suspend the virtualization software and access your primary operating system. No need to restart your system and then boot from the USB drive.
Everything You Need to Run Ubuntu on a Windows Virtual Machine
Here’s what you will need to run an OS installed on a USB drive inside a virtual machine.
- A USB drive with Ubuntu installed on it. Make sure that it boots up on your primary system without an issue. Check our guide on running Linux from a USB drive for more information.
- The latest version of VMware Workstation 16 Player. It should have a Virtual Machine with a hardware configuration that can run Ubuntu.
We will demonstrate the process of booting up Ubuntu installed on a USB drive inside a Windows virtual machine. Since Windows already has higher hardware requirements than Ubuntu, it should boot up without an issue.
Our host system for running VMware Workstation 16 Player is also Windows. Moreover, you won’t see any lag while using it inside the virtual machine. Check out our guide on the VirtualBox vs. VMware Player to understand the differences between the two virtualization programs.
How to Run Ubuntu Installed on a USB Drive in a Windows Virtual Machine
To run the Ubuntu USB drive inside a Windows virtual machine, you will need to first connect the USB drive to it. Once the drive connects and shows up in the virtual machine, then you need to access the boot menu options. We will split the method into two parts, and you must follow it in a linear manner to avoid any problems.
1. Connecting the USB drive to the Virtual Machine
To connect the USB drive to the Windows virtual machine, do the following steps:
- Press the Win + S key to launch the search window and type VMware. Click on the first relevant search result to launch the app.
- Plug the USB drive containing the Ubuntu installation into your system. Make sure that it shows up in the Device Manager.
- Now, go to the left-hand side and pick a virtual machine you want to use for running Ubuntu. We will use a Windows 11 Pro virtual machine that we have created for this demonstration.
- Right-click on your preferred Windows virtual machine and then select the Power on option from the context menu.
- Wait for the Windows virtual machine to boot up successfully.
- Press Ctrl + Alt to use the mouse outside the virtual machine. Hover over the top bar and click on the Player button.
- Then navigate to the Removable devices section. Here, you will see all the available USB devices that you can attach to the virtual machine.
- Locate the USB drive with Ubuntu installation and click on the Connect option. It will unmount the USB drive from your host system and attach it to the current virtual machine.
- Now, you have to check if the USB device shows up in the Windows virtual machine. It won’t appear in File Explorer because it contains an EFI partition and has restricted permissions.
- Press Win + X to launch the Quick Link menu. Click on the Device Manager option from the context menu.
- Go to the Disk Drives option and click on the arrow to expand the list. If the USB drive attachment was successful, you will see its name in the list.
Keep the Windows virtual machine running and then move to the next part.
2. Boot From the Ubuntu USB Drive in the Virtual Machine
In this part, you have to access the attached USB drive using the boot menu. Here’s how to do it.
- Close all apps running in the virtual machine and then press the Alt + F4 to bring up the shutdown utility. Select restart from the drop-down menu.
- As soon as the virtual machine restarts, mash the F10 key to get into the boot options menu. Timing is of absolute essence here, otherwise, you will boot to the desktop. Then you have to restart the virtual machine and press the F10 key again.
- Once you are in the boot menu, you will see the list of available boot options.
- Press the downward arrow key to navigate to the EFI USB Device option and select it. Then press the Enter key to boot using the selected device.
- The virtual machine will now attempt to boot from the USB drive. You will see a black screen for a few minutes. It is because the virtual machine is trying to boot from a new device for the first time.
- Enter the system password you set for Ubuntu. After successfully logging in, click on the Files icon.
- Click on other locations, and you will see that the virtual machine disk also shows up and is accessible.
- Now, go to the top bar of the VMware Workstation 16 Player app window and click on the Restart guest button.
- Press the F10 key as soon as the virtual machine restarts. You will enter the boot menu again. This time, you will see a ‘Ubuntu‘ boot option below the Windows boot manager.
So, you can power on the virtual machine, restart it and boot using the Ubuntu USB drive whenever required. You can also set it up as the default boot option if you want to.
3. Adding Some Final Touches
Using the above-mentioned method, you can easily access your Ubuntu USB drive in a VMware virtual machine. However, it will not run on full screen like your Windows virtual machine. You will have to change the screen resolution that matches your display size. After that, just click on the Enter Full-Screen mode button to utilize the maximum screen space.
Make sure to plug the Ubuntu USB drive into a USB 3.0 port. If you use a USB 2.0 port, the overall usability experience could be a little poor. But Ubuntu will still work! You can minimize VMware and access the host system. No need to shut down Ubuntu.
Use an Ubuntu USB in Your VMware Virtual Machine
It is possible to boot using a USB drive in VMware Virtual Machine. You can dedicate an apt amount of hardware resources to the virtual machine. It will ensure that Ubuntu doesn’t stutter while in use. And when you are done, simply power off the virtual machine and unplug your portable Ubuntu installation media.