USB Bridge

jeudi 30 avril 2009
par  mk
popularité : 0%

To allow USB support under VirtualBox :

* close VirtualBox if it were open

* sudo nano /etc/init.d/

* approx 40. row ("Magic to make /proc/bus/usb work") remove # from the following rows :

mkdir -p /dev/bus/usb/.usbfs

domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644

ln -s .usbfs/devices /dev/bus/usb/devices

mount —rbind /dev/bus/usb /proc/bus/usb

* save (F3) and quit nano (F2)

* sudo /etc/init.d/ stop

* sudo /etc/init.d/ start

* sudo /etc/init.d/vboxdrv reload

Sometimes there is needed another hack entered from command line :

VBOX=$(grep vboxusers /etc/group | sed ’s/vboxusers:x :\(.*\) :.*/\1/’)

sudo mount -t usbfs -o devgid=$VBOX,devmode=664,nodev,noexec,nosuid none /proc/bus/usb

... or add these rows into /etc/rc.local to have load these at boot.

Some more reading :

To allow VirtualBox machines use external router :

* sudo apt-get update

* sudo apt-get install bridge-utils

* sudo nano /etc/network/interfaces and add the following rows :

auto br0

iface br0 inet dhcp

bridge_ports eth0

* check, that to file /etc/network/interfaces will be one empty row (EOF - End-of-File, which
can be entered by pressing Enter)

* save and do restart to networking :

sudo /etc/init.d/networking restart

* add virtual network adapter to the user (will be written into /etc/vbox/interfaces) and
repeat it as many times as you need virtual adapters for your virtual machines (e.g. vbox1, vbox2,
etc.) :

sudo VBoxAddIF vbox0 username br0

* sudo chmod 666 /dev/net/tun

To check bridge, type : brctl show

You should see something like :

bridge name bridge id STP enabled interfaces

br0 8000.00024476a5ba no eth0


Certainly, if you have someting else as eth0 - replace it with your interface. Each virtual
interface, e.g. vbox0 has its own MAC-address (which can be easily change through VirtualBox
graphical interface) and other network parameters as regular network interface.

Now when you create new VirtualBox machine, choose "host interface" and into field "Interface name"
type appropriate virtual interface name, e.g. vbox0. Note - you can use each virtual network
interface with one virtual machine at the same time.

Shared folder in Windows Vista
****************************** - one bug is recorded about that.

To have permanent share mount, type at Vista prompt :

net use X : \\VBOXSVR\shared-folder-name /PERSISTENT:YES

....where X : replace with desired drive.

To remove, type :

net use X : /DELETE

Shared folders don’t work if user is not member of Administrators group. Regular user without
administrator rights can access shared folders if user with administrator rights has accessed at
least once the shared folder. This is annoying but so it is. Currently.

Clone virtual hard disk :

VBoxManage clonevdi /place/where/is/located/original/virtual_hard_disk.vdi

Then also Windows SID’s will be removed and you can the same virtual hard disk with already
installed OS use in the same VirtualBox in the same computer.

Perfomance and other compare with freeware VM Ware server

Perfomance is increadibly faster than in freeware VM Ware Server. Especially by switching between
full and windowed screen. VM Ware has true BIOS emulator, which could be sometimes cool to teach it
to somebody. VirtualBox has just graphical configuration for BIOS before you run virtual machine,
when VM Ware BIOS will be accessible when you run virtual machine, which is more similar for true
situation. VM Ware has better shared folder system if you have commercial VM Ware Workstation.
Freeware VM Ware server doesn’t have shared folder but you can share folders over network. I used VM
Ware before but now I use VirtualBox and it works for me. I even use Estonian ID-card with
USB-cardreader SC Micro 3110 under VirtualBox and under Estobuntu Linux
But you can try these virtual machine programs yourself and have your own experience. I like
VirtualBox but it’s my decision - you can have different likes. Here is one good list and comparison
of available virtual machine programs -

Some more reading : - Ubuntu 8.04 has also Kernel Virtual Machines also with
graphical manager



Articles de la rubrique