Using Soft links in linux, VirtualBox can access USB devices.
Source: Internet
Author: User
Using Soft links in linux, VirtualBox can access USB devices-Linux Enterprise applications-Linux server applications. For more information, see below. VirtualBox is a good Virtual Machine in linux. It can be used to install a second operating system, such as windows, in linux. What if the virtual system needs to access a USB device? There are at least three methods:
1. Direct Access
There are a lot of articles on enabling USB restrictions on VirtualBox on the Internet, which is a little troublesome, not to mention.
2. Access through shared folders
"Shared folder" is a good way for VirtualBox to exchange data with the host machine. This method adds the folder attached to the USB device (automatically) to the shared folder.
You can add a virtual machine before it is opened, or add a virtual machine after it is opened. However, if the USB device is not connected to the host after it is added, the Virtual System in VirtualBox cannot be opened. You need to remove the "shared folder" setting of the USB device. The trouble is obvious. In addition, it seems that after the VM is opened, it may cause an exception when accessing the shared folder linked to the USB device, and VirtualBox suddenly exits. Obviously unstable.
3. Access through soft links
In this method, you first need to have a folder on the local disk of the host machine as the shared folder. I don't think there will be any problem, because I think that since a virtual machine is used, data exchange is inevitable, therefore, setting at least one shared folder is inevitable. This is a required step of the method, but it cannot be included in the step of the method, that is, the complexity of setting shared folders cannot be included in the complexity of the "access through soft links" method.
No nonsense.
It's easy to create a soft link to the mount point of the USB device in the folder of the host (your linux) with the shared folder configured.
For example, if there is a USB flash drive in ubuntu and the volume is marked as WKUSB, the plug-in will appear (mounted to)/media/WKUSB. The shared folder with VirtualBox is/home/waken/share, in order to allow the virtual system to access USB instantly, create a soft link to/media/WKUSB in/home/waken/share.
The command can be as follows:
Ln-s/media/WKUSB [myusbname]
[Myusbname] is optional. It is not a problem to rename the soft link (file.
In this way, there will be no problems with the first two methods. It is convenient, reliable, simple, and effective. USB connection and disconnection are irrelevant.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.