Little Girl's Mostly Linux Blog

VirtualBoxAccessToUSB

VirtualBox Access to USB

This page was last updated on January 05, 2019.

I wrestled for quite some time to get USB access from a virtual machine (VM) inside of VirtualBox in Ubuntu MATE. After checking several pages worth of “Just do this…” advice to no avail and after consulting with friends and family for suggestions, the following finally worked and I’m able to access a USB stick from within any VM in VirtualBox. Since I’ve seen that many of you also have trouble with this, hopefully the steps below will solve it for you, too.

Add Yourself to the vboxusers Group

  1. Close VirtualBox.
  2. Add yourself to the vboxusers group on the host OS with this command in a terminal window:
    sudo adduser $USER vboxusers
  3. Reboot the host computer or log out and log back in again.

Configure the VM

  1. Select the VM you’d like to use a USB stick with.
  2. Right-click it and choose Settings.
  3. Choose USB.
  4. Make sure there’s a check in the Enable USB Controller checkbox.
  5. Choose USB 1.1 or USB 2.0, or USB 3.0 (USB 1.1 is the default).
  6. Click the OK button.

Mount the USB Stick in the VM

  1. Choose one of these:
    1. Boot the VM.
    2. Insert the USB stick into the host computer. It will be automatically mounted by the host computer. DO NOT DISMOUNT IT.

    or:

    1. Insert the USB stick into the host computer. It will be automatically mounted by the host computer. DO NOT DISMOUNT IT.
    2. Boot the VM.
  2. Choose one of these:
    1. Right-click the USB icon in the bottom right of the VM’s window (not the icon on the desktop).
    2. Click to put a check in the box next to the USB stick in the pop-up. The USB stick will be automatically mounted inside the VM and will vanish from the host OS.

    or:

    1. Click Devices in the VM window’s top menu.
    2. Click USB in the drop-down menu that opens.
    3. Click to put a check in the box next to the USB stick in the drop-down that opens. The USB stick will be automatically mounted inside the VM and will vanish from the host OS.

Use the USB Stick

Use the USB stick normally from within the VM.

When You’re Finished Using the USB Stick

DO NOT DISMOUNT THE USB STICK FROM THE DESKTOP ICON.

  1. Choose one of these:
    1. Right-click the USB icon in the bottom right of the VM’s window (not the icon on the desktop).
    2. Click the box next to the USB stick in the pop-up to uncheck it. The USB stick will be automatically dismounted from inside the VM and will reappear as mounted in the host OS.

    or:

    1. Click Devices in the VM window’s top menu.
    2. Click USB in the drop-down menu that opens.
    3. Click to remove the check in the box next to the USB stick in the drop-down that opens. The USB stick will be automatically dismounted from inside the VM and will reappear as mounted in the host OS.

Interesting Observation

The checkmark you used to mount and dismount the USB stick acts as a dynamic toggle for where the USB stick is mounted. You can toggled the USB stick back and forth between the guest and host at will simply by checking and unchecking that box.

Still Not Working? Try One or Both of These

Install VirtualBox Guest Additions (probably unnecessary, but may be worth trying)

  1. Save the VirtualBox Guest Additions ISO to the host computer by running this command in a terminal window on the host computer, entering your password at the prompt:
    sudo apt-get install virtualbox-guest-additions-iso
  2. Boot the VM.
  3. Click Devices in the VM window’s top menu.
  4. Click Insert Guest Additions CD Image… in the drop-down menu that opens. A window will open with Open Autorun Prompt selected.
  5. Click the OK button to mount the Guest Additions CD. A warning will be displayed about running software you trust.
  6. If you’re willing to run the software, click the Run button.
  7. Enter your password at the prompt and click the Authenticate button.
  8. Press the Enter key to close the window when it’s finished installing.
  9. Right-click the VirtualBox CD on your desktop and click Eject in the context menu.

Install the VirtualBox Extension Pack (probably unnecessary, but may be worth trying)

  1. Go to the https://www.virtualbox.org/wiki/Downloads page on the host machine.
  2. Download the Extension Pack for your version of VirtualBox on the host machine.
  3. Open VirtualBox.
  4. Click File.
  5. Click Preferences.
  6. Click Extensions.
  7. Check if you have an older version of the Extension Pack already installed. If you do, select it and click the Removes selected package button to remove it.
  8. Click the Adds new package button.
  9. Browse to the Desktop (or wherever you downloaded the file to) on the host machine.
  10. Click OK.
  11. Type in your password at the prompt. You’ll receive a notification that it installed successfully.

Obligatory Happy Ending

And they all lived happily ever after. The end.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post.

Comment:

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: