Je veux que ma machine virtuelle XP puisse avoir une connectivité normale sur le LAN à mon travail.
Il semble qu'il faille utiliser l'option 'host interface' dans la section network de ma machine virtuelle.
Voici la doc trouvée chez virtualbox, cela ne fonctionne pas popur l'instant.
Dynamically created TAP interfaces
With this method, VirtualBox will create a TAP device every time the VM is started, and destroy
the TAP device again when the VM is no longer running.
Note
In order to create a dynamic TAP interface, the VirtualBox process needs to have write ac-
cess to /dev/net/tun. Either make sure the access bits allow access or add the user of the
VirtualBox process to the group owning that device file.
As with the static interfaces described previously, the dynamically created TAP interfaces require a
37
Configuring virtual machines
networking bridge and your Ethernet adapter in promiscous mode. However, as opposed to the con-
figuration for static devices, bridging with dynamically created devices effectively consists of two
components:
1. There is one part that sets up an Ethernet bridge and puts your Ethernet controller in promiscu-
ous mode; this needs to be performed only once after startup. For a setup with eth0 and DH-
CP, the following commands (run as root) will perform these steps:
/sbin/brctl addbr br0
/sbin/ifconfig eth0 0.0.0.0 promisc
/sbin/brctl addif br0 eth0
/sbin/dhclient br0
2. A second part must be run by VirtualBox every time the TAP interface is created and des-
troyed, to add the interface to the bridge or remove it from the bridge, respectively. Since the
names of the TAP interfaces (and your bridge) are not known at the time you are configuring
your VM, VirtualBox instead calls two scripts that configure the TAP interfaces:
a. a setup script, which will be called by VirtualBox during VM startup, right after it has
created the TAP interface; this script must then bring up that TAP interface (using if-
config up) and add it to the bridge you have set up;
b. optionally, a termination script, which VirtualBox will call prior to destroying the TAP
interface again.
So instead of adding a static TAP interface name to the bridge (as described earlier), you must
supply one or two scripts that do this for the TAP devices created by VirtualBox. These scripts
each receive two parameters:
a. the interface file descriptor (numeric value >= 0)
b. the TAP interface name (typically from tap0 to tapx)
Using the following TAP setup script for the above bridge configuration, the dynamically cre-
ated host interface will be added to the bridge. Note that bridge manipulation requires root per-
missions.
#!/bin/sh
sudo /sbin/ifconfig $2 up
sudo /sbin/brctl addif br0 $2
The corresponding termination script looks as follows:
#!/bin/sh
sudo /sbin/brctl delif br0 $2
In certain configurations, the VirtualBox VM process (e.g. VirtualBox, VBoxSDL, or VBoxVRDP)
is wrapped into a parent process which allocates the required TAP devices and lets VirtualBox in-
herit the file handles. For this to work, the file descriptor has to be passed to the VirtualBox VM
configuration using VBoxManage. In this case, the setup and termination scripts will not be called.