Wednesday, 2 November 2016

Accessing a USB drive in Oracle VirtualBox



In this blog, I would be talking about how to access a USB drive in Oracle VirtualBox. The reason I am writing about this is that generally, I would download all the installable files on a local filesystem or hard disk and then move it onto my virtual machine. In order to do this, I prefer using the USB drive since it gives me some amount of flexibility.
Now, by default, when you start up a virtual machine in Oracle VirtualBox, the guest operating system will not have access to any of the Host USB drives. In order to enable the USB drives, we need to add USB filters for the virtual machine as shown in the below snapshots.
The below snapshot shows the general settings of the Linux box.
I click on the USB button, to access the USB filters assigned for the virtual machine. This is shown in the next snapshot.


Observe that in the above snapshot, no USB filters are defined for the machine. I click on the add button as shown in the below snapshot to display the list of USB drives tagged to the system. 



The snapshot after adding a JetFlash Mass Storage device is as shown in the below snapshot. This means that whenever I connect the JetFlash drive to my machine and I have the guest OS running, the USB device will be detected by my guest operating system and not the host operating system. Thus, the USB filter that I have defined acts as a semaphore ensuring that only my Linux machine has access to the drive when it is running. 
I now power on my virtual system which is a Fedora 24 workstation. This is shown in the below snapshot. 
I now go to the File Explorer as shown in the below snapshot. Observe the 4.00GB Volume drive on the left hand side of the below snapshot. 
On clicking the drive, I can see the contents of the USB drive as shown in the below snapshot. 










No comments:

Post a Comment