Thursday, December 11, 2008

Can Psoriasis Cause Blood Pressure

VirtualBox. USB ports on Ubuntu.

In this article we will see how to activate the USB ports that can be used in virtual machines we have created with VirtualBox. The host system is Linux Ubuntu 8.04. VirtualBox

has two versions: OSE (Open Source Edition) and PUEL (Personal Use and Evaluation License). I have always worked with the OSE version. PUEL version is not free and, therefore, is not free, although there is a trial version for personal use (PUEL). In the official VirtualBox page shows how to download this version along with the use of the product key.

When I raised the need for USB ports in my virtual machines, I found information online on how to setup, but, surprise: the USB ports can only be used with version PUEL!.

Como, in the electronic computer addition to time, there must be something bold, I decided to test the information I found online in the OSE version, to avoid having to switch to the version PUEL, and something has happened that is not very common: WORKED !. The test I performed with versions 2.0.6 (the latest at the time of this writing) and 1.6.0 and Linux virtual machines with Ubuntu 8.04 and Windows XP in both versions and everything worked properly. The devices I've used have been a printer, external hard drive and a USB.

Here are the actions to be taken to use the USB ports in VirtualBox OSE (assuming that PUEL version would also work, but not proven, my courage has a limit.)

First, we must edit / etc / init.d / mountdevsubfs.sh and find the following paragraph:

#
# Magic to make / proc / bus / usb work
#
# mkdir-p / dev / bus / usb / .usbfs
# domount usbfs "" / dev / bus / usb / .usbfs-obusmode = 0700, devmode = 0600 , 0644 listmode =
.usbfs # ln-s / devices / dev / bus / usb / devices
# mount - Rbind / dev / bus / usb / proc / bus / usb

file / etc / init.d / mountdevsubfs.sh is a script that mounts special devices on your file system. The system treats it as a service ( is in the directory / etc / init.d ) .

We have to modify the previous block file / etc / init.d / mountdevsubfs.sh uncommenting the executable lines, as follows:

#
# Magic to make / proc / bus / usb work
#
mkdir-p / dev / bus / usb / .usbfs
domount usbfs "" / dev / bus / usb / .usbfs-obusmode = 0700, devmode = 0600, 0644 listmode =
.usbfs ln-s / devices / dev / bus / usb / devices
mount - rbind / dev / bus / usb / proc / bus / usb

then have to edit the file / etc/udev/rules.d/40-permissions.rules and search the following paragraph:

# USB serial converters
SUBSYSTEM == "usb_device", GOTO = "usb_serial_start"
SUBSYSTEM == "usb", ENV {DEVTYPE} == "usb_device" GOTO = "usb_serial_start"
GOTO = "usb_serial_end"
LABEL = "usb_serial_start"
ATTRS {idVendor} == "0403", ATTRS {idProduct} == "6001" \\
MODE = "0660", GROUP = "dialout"
LABEL = "usb_serial_end"

In the file / etc/udev/rules.d/40-permissions.rules defined users and groups can access the system devices, must add the group vboxusers (this group is using VirtualBox) so we can access from our virtual machines USB ports. The order is added in the previous block, in line ATTRS {idVendor} , as follows (I've written in bold the amendment added) :

# USB serial converters
SUBSYSTEM = = "usb_device", GOTO = "usb_serial_start"
SUBSYSTEM == "usb", ENV {DEVTYPE} == "usb_device", GOTO = "usb_serial_start"
GOTO = "usb_serial_end"
LABEL = "usb_serial_start"
ATTRS {idVendor} == "0403", ATTRS {idProduct} == "6001", \\
, GROUP = "vboxusers" MODE = "0660", GROUP = "dialout"
LABEL = "usb_serial_end"

Next, edit the file / etc/udev/rules.d/40-basic-permissions.rules and find the following paragraph:

# USB devices (usbfs replacement)
SUBSYSTEM == "usb", ENV {DEVTYPE} == "usb_device" MODE = "0664"
SUBSYSTEM == "usb_device", MODE = "0664"

In the file / etc/udev/rules.d/40-basic-permissions.rules defined types access to system devices that allow users and groups. We have to change the permissions so that all users can read and write to USB ports, leaving the paragraph as follows (I've written in bold the modification) :

# USB devices (usbfs replacement)
SUBSYSTEM == "usb", ENV {DEVTYPE} == "usb_device", MODE = "0666"
SUBSYSTEM == "usb_device", MODE = "0666"

For this configuration to take effect you must restart the computer (probably will be services, restarting, enabling this setting, but do not know).

Once restarted, you must configure each virtual machine to activate the USB ports to boot. To do this, you must access from VirtualBox, the virtual machine configuration and open the USB option, agreeing to a new window where you have to enable USB ports and click the Add Filter icon from device. View Figure 1.



Figure 1 Access the window in Figure 2.

Figure 2

This window shows the USB devices currently connected to the system. If any device is not shown because they are not connected. We have to select the devices you want and go back into the window of Figure 1, must repeat this process for each of the devices. Once this action will display a window similar to Figure 3.

Figure 3

In this example we have added a printer, external hard drive and a USB. This means that devices, from this moment, you can use this virtual machine. Each time you connect one of these devices and the virtual machine is running, the device will be accessible from the virtual machine, but not from the host computer. If you do not want to use one of these devices from the virtual machine, we have to turn off your box in the window of Figure 3 and then run the machine. Thus, the device will be accessible only from the host computer.

0 comments:

Post a Comment