<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.umbo.fr/skins/common/feed.css?301"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
		<id>http://wiki.umbo.fr/index.php?action=history&amp;feed=atom&amp;title=Virtualbox</id>
		<title>Virtualbox - Historique des versions</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.umbo.fr/index.php?action=history&amp;feed=atom&amp;title=Virtualbox"/>
		<link rel="alternate" type="text/html" href="http://wiki.umbo.fr/index.php?title=Virtualbox&amp;action=history"/>
		<updated>2026-06-19T05:20:24Z</updated>
		<subtitle>Historique pour cette page sur le wiki</subtitle>
		<generator>MediaWiki 1.17.0</generator>

	<entry>
		<id>http://wiki.umbo.fr/index.php?title=Virtualbox&amp;diff=1677&amp;oldid=prev</id>
		<title>Admin le 9 septembre 2009 à 17:25</title>
		<link rel="alternate" type="text/html" href="http://wiki.umbo.fr/index.php?title=Virtualbox&amp;diff=1677&amp;oldid=prev"/>
				<updated>2009-09-09T17:25:13Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Version précédente&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Version du 9 septembre 2009 à 17:25&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 1 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 1 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;minus;&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Virtual Box Virtualbox ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Virtual Box Virtualbox ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://wiki.umbo.fr/index.php?title=Virtualbox&amp;diff=1669&amp;oldid=prev</id>
		<title>82.227.229.68 le 9 septembre 2009 à 17:15</title>
		<link rel="alternate" type="text/html" href="http://wiki.umbo.fr/index.php?title=Virtualbox&amp;diff=1669&amp;oldid=prev"/>
				<updated>2009-09-09T17:15:18Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== Virtual Box Virtualbox ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://en.gentoo-wiki.com/wiki/VirtualBox&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{TOC/Virtualization}}&lt;br /&gt;
'''VirtualBox''' is a computer emulator which allows you to create virtual computers inside your OS.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
VirtualBox can be installed either from the closed source binaries or directly from the sources. The closed source version contains some features that the open source edition lacks (see [http://en.wikipedia.org/wiki/VirtualBox#Licensing Licensing]), but its use is restricted to personal use and evaluation. The open source edition is published under the GPL. For more details on the features and license terms of each edition, have a look at: http://www.virtualbox.org/wiki/Editions.&lt;br /&gt;
&lt;br /&gt;
=== OpenSource distribution (OSE) ===&lt;br /&gt;
The VirtualBox ebuild provides the following USE flags:&lt;br /&gt;
* {{USEFlag|additions}} - Install Guest System Tools ISO. These speed up video, allow you to have a seamless mouse between the host and the window that the guest OS resides in, and shared folders access between the host and the guest OS.&lt;br /&gt;
{{Note| Package  {{Package|app-emulation/virtualbox-ose-additions|direct=yes}} has fetch restrictions turned on, so you will need to manualy download it and put into distfiles dir}}&lt;br /&gt;
* {{USEFlag|alsa}} - enable [[ALSA]] support&lt;br /&gt;
* {{USEFlag|headless}} - Build without any graphic frontend&lt;br /&gt;
* {{USEFlag|python}} - Adds support/bindings for the Python language&lt;br /&gt;
* {{USEFlag|qt4}} - Build qt4 frontend&lt;br /&gt;
* {{USEFlag|pulseaudio}} - Adds support for PulseAudio sound server&lt;br /&gt;
* {{USEFlag|sdk}} - Enable building of SDK&lt;br /&gt;
&lt;br /&gt;
After you have enabled/disabled required USE flags, install the package:&lt;br /&gt;
{{Root|emerge -av  app-emulation/virtualbox-ose}}&lt;br /&gt;
{{Note| You can only build VirtualBox with &amp;lt;sys-devel/gcc-4.3 installed and enabled via gcc-config}}&lt;br /&gt;
&lt;br /&gt;
===Binary distribution===&lt;br /&gt;
The binary distribution provides the following additions to the OSE version:&lt;br /&gt;
* Direct access to USB devices from guest operating system&lt;br /&gt;
* Remote Desktop access to the virtual machine&lt;br /&gt;
* Direct access / raw access to a hard disk (partition) (NOTE: You may also use the binary edition to create VMDK files that point to hard disks and partitions, and subsequently these can be used with the OSE version)&lt;br /&gt;
&lt;br /&gt;
Usage of binary distribution is limited to personal or evaluation usage.  A more complete list of differences between the binary edition &amp;amp; OSE is available at http://www.virtualbox.org/wiki/Editions&lt;br /&gt;
&lt;br /&gt;
If you have gcc 3.3 installed and enabled, you can install VirtualBox just by emerging the main package with its dependencies:&lt;br /&gt;
{{Root|emerge -av  app-emulation/virtualbox-bin}}&lt;br /&gt;
&lt;br /&gt;
If using gcc later than 4.x, you must install all the required packages individually, without dependencies.  VirtualBox requires libstdc++ which requires that you emerge this manually if running gcc 4.x or later.  &lt;br /&gt;
{{Note|If you don't install without dependencies, virtualbox-bin will attempt to emerge gcc 3.3 and then the version of libstdc++ which must be built from within a gcc-3.3.x environment. Compiling gcc-3.3 with gcc-4.3 may also fail.  Using sys-libs/libstdc++ is quicker and can be compiled by gcc-4.x}}&lt;br /&gt;
{{root|&amp;lt;pre&amp;gt;&lt;br /&gt;
emerge --oneshot sys-libs/libstdc++-v3&lt;br /&gt;
emerge --oneshot media-libs/libmng&lt;br /&gt;
emerge --nodeps app-emulation/virtualbox-modules&lt;br /&gt;
emerge --nodeps app-emulation/virtualbox-bin&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
====Installing masked versions of VirtualBox====&lt;br /&gt;
If you wish to install a version of VirtualBox newer than that listed as stable in the Portage tree, you must unmask it by adding the following lines to your package.keywords file. Don't forget to replace ~x86 with ~amd64 if using 64 bit.&lt;br /&gt;
{{File|/etc/portage/package.keywords|&amp;lt;pre&amp;gt;&lt;br /&gt;
app-emulation/virtualbox-modules ~x86&lt;br /&gt;
app-emulation/virtualbox-bin ~x86&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
=====Update and Tip=====&lt;br /&gt;
As of today, last stable version 1.6.6 uses qt3 while latest keyworded versions (2.2.4) uses qt4. It also compiles directly with gcc-4.x (no need to emerge individually).&lt;br /&gt;
&lt;br /&gt;
==Run==&lt;br /&gt;
Users that run VirtualBox must be a member of the &amp;quot;vboxusers&amp;quot; group. The user you added will not be able to access VirtualBox until they relogin.&lt;br /&gt;
{{Root|gpasswd -a youruser vboxusers}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also the vboxdrv module should be loaded prior to starting VirtualBox.&lt;br /&gt;
{{Root|modprobe vboxdrv}}&lt;br /&gt;
To make the module load at boot, run following commands:&lt;br /&gt;
&lt;br /&gt;
For baselayout-2:&lt;br /&gt;
{{Root|&amp;lt;nowiki&amp;gt;echo 'modules=&amp;quot;${modules} vboxdrv&amp;quot;' &amp;gt;&amp;gt; /etc/conf.d/modules &amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
For baselayout-1:&lt;br /&gt;
{{Root|echo vboxdrv &amp;gt;&amp;gt; /etc/modules.autoload.d/kernel-2.6}}&lt;br /&gt;
&lt;br /&gt;
{{Note|Refer to the [[Load modules upon boot|appropriate article]] to load modules on boot.}}&lt;br /&gt;
{{Note|Keyworded versions of virtualbox-modules include a new module vboxnetflt that must also be loaded. Some may include vboxnetadp.}}&lt;br /&gt;
&lt;br /&gt;
And to finally start VirtualBox, you can either click the menu entry (Sun xVM VirtualBox) or via the terminal using:&lt;br /&gt;
{{Command|VirtualBox}}&lt;br /&gt;
&lt;br /&gt;
==Service==&lt;br /&gt;
To run VirtualBox in headless mode as a service you will need to add the following scripts to your system.&lt;br /&gt;
&lt;br /&gt;
{{File|/etc/conf.d/virtualbox.example|&amp;lt;pre&amp;gt;&lt;br /&gt;
# Username to start vbox as, must be part of vboxusers group.&lt;br /&gt;
VM_USER=&amp;quot;nobody&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Virtual Machine Name&lt;br /&gt;
VM_NAME=&amp;quot;Windows Server 2003&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Shutdown Method: pause|resume|reset|poweroff|savestate|acpipowerbutton|acpisleepbutton&lt;br /&gt;
VM_SHUTDOWN=&amp;quot;savestate&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Nice Priority: -20 (most favorable scheduling) to 19 (least favorable)&lt;br /&gt;
VM_NICE=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{File|/etc/init.d/virtualbox|&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/sbin/runscript&lt;br /&gt;
&lt;br /&gt;
# Not sure why but gentoo forgot to add /opt/bin to the path.&lt;br /&gt;
VBOXPATH=&amp;quot;/usr/bin:/opt/bin&amp;quot;&lt;br /&gt;
VBOXNAME=&amp;quot;${SVCNAME#*.}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
depend() {&lt;br /&gt;
	need net&lt;br /&gt;
	&lt;br /&gt;
	if [ &amp;quot;${SVCNAME}&amp;quot; != &amp;quot;virtualbox&amp;quot; ] ; then &lt;br /&gt;
		need virtualbox&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
checkconfig() {&lt;br /&gt;
	if [ ! -r /etc/conf.d/$SVCNAME ] ; then&lt;br /&gt;
		eerror &amp;quot;Please create /etc/conf.d/$SVCNAME&amp;quot;&lt;br /&gt;
		eerror &amp;quot;Sample conf: /etc/conf.d/virtualbox.example&amp;quot;&lt;br /&gt;
		return 1&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	return 0&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
checkpath() {&lt;br /&gt;
	local r=0&lt;br /&gt;
&lt;br /&gt;
	if ! su $VM_USER -c &amp;quot;PATH=$VBOXPATH command -v VBoxHeadless &amp;amp;&amp;gt;/dev/null&amp;quot; ; then&lt;br /&gt;
		eerror &amp;quot;Could not locate VBoxHeadless&amp;quot;&lt;br /&gt;
		r=1&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if ! su $VM_USER -c &amp;quot;PATH=$VBOXPATH command -v VBoxManage &amp;amp;&amp;gt;/dev/null&amp;quot; ; then&lt;br /&gt;
		eerror &amp;quot;Could not locate VBoxManage&amp;quot;&lt;br /&gt;
		r=1&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if [ $r -gt 0 ] ; then &lt;br /&gt;
		eerror &amp;quot;Please verify the vm users path.&amp;quot;&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	return $r&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
isloaded() {&lt;br /&gt;
	lsmod | grep -q &amp;quot;$1[^_-]&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
isvm() {&lt;br /&gt;
	[ $SVCNAME != &amp;quot;virtualbox&amp;quot; ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
loadmodules() {&lt;br /&gt;
	if ! isloaded vboxdrv ; then&lt;br /&gt;
		if ! modprobe vboxdrv &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 ; then&lt;br /&gt;
			eerror &amp;quot;modprobe vboxdrv failed.&amp;quot;&lt;br /&gt;
			return 1&lt;br /&gt;
		fi&lt;br /&gt;
	fi &lt;br /&gt;
&lt;br /&gt;
	if ! isloaded vboxnetflt ; then&lt;br /&gt;
		if ! modprobe vboxnetflt &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 ; then&lt;br /&gt;
			eerror &amp;quot;modprobe vboxnetflt failed.&amp;quot;&lt;br /&gt;
			return 1&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
	&lt;br /&gt;
	return 0&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
unloadmodules() {&lt;br /&gt;
	if isloaded vboxnetflt ; then&lt;br /&gt;
		if ! rmmod vboxnetflt &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 ; then&lt;br /&gt;
			eerror &amp;quot;rmmod vboxnetflt failed.&amp;quot;&lt;br /&gt;
			return 1&lt;br /&gt;
		fi&lt;br /&gt;
	fi&lt;br /&gt;
&lt;br /&gt;
	if isloaded vboxdrv ; then&lt;br /&gt;
		if ! rmmod vboxdrv &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 ; then&lt;br /&gt;
			eerror &amp;quot;rmmod vboxdrv failed.&amp;quot;&lt;br /&gt;
			return 1&lt;br /&gt;
		fi&lt;br /&gt;
	fi &lt;br /&gt;
&lt;br /&gt;
	return 0&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
start() {&lt;br /&gt;
	# If we are the original virtualbox script [ $SVCNAME = &amp;quot;virtualbox&amp;quot; ]&lt;br /&gt;
	if ! isvm ; then&lt;br /&gt;
		ebegin &amp;quot;Starting Virtualbox&amp;quot;&lt;br /&gt;
		loadmodules&lt;br /&gt;
		eend $?&lt;br /&gt;
	else&lt;br /&gt;
		checkconfig || return $?&lt;br /&gt;
		checkpath   || return $?&lt;br /&gt;
&lt;br /&gt;
		ebegin &amp;quot;Starting Virtualbox: $VBOXNAME&amp;quot;&lt;br /&gt;
		su $VM_USER -c &amp;quot;PATH=$VBOXPATH nice -n $VM_NICE VBoxHeadless -startvm \&amp;quot;$VM_NAME\&amp;quot; &amp;amp;&amp;gt;/dev/null&amp;quot; &amp;amp;&lt;br /&gt;
		pid=$!&lt;br /&gt;
		sleep 1&lt;br /&gt;
		&lt;br /&gt;
		kill -CHLD $pid &amp;amp;&amp;gt;/dev/null&lt;br /&gt;
		eend $?&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stop() {&lt;br /&gt;
	# If we are the original virtualbox script [ $SVCNAME = &amp;quot;virtualbox&amp;quot; ]&lt;br /&gt;
	if ! isvm ; then&lt;br /&gt;
		ebegin &amp;quot;Stopping Virtualbox&amp;quot;&lt;br /&gt;
		unloadmodules&lt;br /&gt;
		eend $?&lt;br /&gt;
	else&lt;br /&gt;
		checkconfig || return $?&lt;br /&gt;
		checkpath   || return $?&lt;br /&gt;
&lt;br /&gt;
		ebegin &amp;quot;Stopping Virtualbox: $VBOXNAME&amp;quot;&lt;br /&gt;
		su ${VM_USER} -c &amp;quot;PATH=$VBOXPATH VBoxManage controlvm \&amp;quot;$VM_NAME\&amp;quot; $VM_SHUTDOWN &amp;amp;&amp;gt;/dev/null&amp;quot;&lt;br /&gt;
&lt;br /&gt;
                while [ &amp;quot;$(su ${VM_USER} -c &amp;quot;PATH=$VBOXPATH VBoxManage showvminfo \&amp;quot;$VM_NAME\&amp;quot; | grep State | grep runn&amp;quot;)&amp;quot; != &amp;quot;&amp;quot; ]&lt;br /&gt;
                do&lt;br /&gt;
                    echo -n &amp;quot;.&amp;quot;&lt;br /&gt;
                    sleep 1&lt;br /&gt;
                done&lt;br /&gt;
&lt;br /&gt;
		sleep 1&lt;br /&gt;
                echo&lt;br /&gt;
&lt;br /&gt;
		eend $?&lt;br /&gt;
	fi&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
To add a new virtual machine to startup you will need to create a conf.d file and symbolic link for the virtual machine.&lt;br /&gt;
{{Note|You '''DO NOT''' need vboxdrv (and if needed vboxnetflt) in your /etc/modules.autoload.d/kernel-2.6 file when using this script.  The modules will be automatically loaded as needed by the base script.  This will make upgrading virtualbox in production simpler as it seems to freak out when the modules are updated while in use.  If there is an issue with this behavior please contact me in the discussion section so a resolution can be reached.}}&lt;br /&gt;
{{Root|&amp;lt;pre&amp;gt;&lt;br /&gt;
# cp /etc/conf.d/virtualbox.example /etc/conf.d/virtualbox.NEW_VM&lt;br /&gt;
# cd /etc/init.d&lt;br /&gt;
# ln -s virtualbox virtualbox.NEW_VM&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Now modify the newly created /etc/conf.d/virutalbox.NEW_VM file.  Be sure the VM_USER is in the vboxusers group and that VM_NAME is the correct case.&lt;br /&gt;
&lt;br /&gt;
==Networking==&lt;br /&gt;
VirtualBox supports networking via NAT and via bridges. NAT networking is very simple and works out of box.&lt;br /&gt;
&lt;br /&gt;
===NAT===&lt;br /&gt;
Works perfectly when you set NAT and keep &amp;quot;Cable connected&amp;quot; checked on. VirtualBox then uses internal DHCP and NAT. Disadvantages are that ICMP doesn't work (no ping - [http://www.virtualbox.org/ticket/1247 #1247]) and you can't connect to virtual machine unless you set up port-forwarding rules.&lt;br /&gt;
&lt;br /&gt;
However your virtual machine will be able to connect to other machines on your LAN without any issues and LAN name resolution should work providing you have that functionality on your LAN.&lt;br /&gt;
&lt;br /&gt;
===Bridged===&lt;br /&gt;
If you need your guest OS to have a different IP address in the same subnet on the same Ethernet interface, then you should use bridging.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: The following steps are not necessary for setting up Host Interface on VirtualBox &amp;gt;= 2.1.&lt;br /&gt;
&lt;br /&gt;
====VirtualBox Version &amp;gt;= 2.1====&lt;br /&gt;
&lt;br /&gt;
You no longer need the TUN/TAP and bridging support, as VirtualBox has built the bridging functionality directly into the software. However, for those of you have it already configured and recently upgraded from VirtualBox 2.0 to 2.1+, you may find that you you get an error when you try to start your VM. The error, ERR_HOSTIF_INIT_FAILED, will prevent you from stating the VM.&lt;br /&gt;
&lt;br /&gt;
In order to fix it, you will need to modprobe the new vboxnetflt kernel module. You can find it in: /lib/modules/&amp;lt;kernel&amp;gt;/misc/vboxnetflt.ko. Simply change into that directory and run modprobe on the module, then restart your vm. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====VirtualBox Version &amp;lt; 2.1====&lt;br /&gt;
&lt;br /&gt;
Do only this:&lt;br /&gt;
{{Root|modprobe vboxnetflt&lt;br /&gt;
echo vboxnetflt &amp;gt;&amp;gt; /etc/modules.autoload.d/kernel-2.6}}&lt;br /&gt;
 &lt;br /&gt;
=====Preparing=====&lt;br /&gt;
You should enable bridging support and tun/tap in kernel (or compile them as modules).&lt;br /&gt;
{{Kernel|802.1d Support|&amp;lt;pre&amp;gt;&lt;br /&gt;
Networking ---&amp;gt;&lt;br /&gt;
    Networking Options ---&amp;gt;&lt;br /&gt;
    &amp;lt;*&amp;gt; 802.1d Ethernet Bridging&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Kernel|TUN/TAP Support|&amp;lt;pre&amp;gt;&lt;br /&gt;
Device Drivers  ---&amp;gt;&lt;br /&gt;
    Network device support  ---&amp;gt;&lt;br /&gt;
    &amp;lt;*&amp;gt; Universal TUN/TAP device driver support&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
You can read about bridges here: [[Bridging]]&lt;br /&gt;
&lt;br /&gt;
=====Configure network=====&lt;br /&gt;
{{File|/etc/conf.d/net (baselayout-2)|&amp;lt;pre&amp;gt;&lt;br /&gt;
config_eth0=&amp;quot;null&amp;quot;&lt;br /&gt;
# For every VM create an interface,&lt;br /&gt;
# set user to the one who going to use the&lt;br /&gt;
# interface.&lt;br /&gt;
tuntap_vbox0=&amp;quot;tap&amp;quot;&lt;br /&gt;
tunctl_vbox0=&amp;quot;-u &amp;lt;user&amp;gt;&amp;quot;&lt;br /&gt;
config_vbox0=&amp;quot;null&amp;quot;&lt;br /&gt;
tuntap_vbox1=&amp;quot;tap&amp;quot;&lt;br /&gt;
tunctl_vbox1=&amp;quot;-u &amp;lt;user&amp;gt;&amp;quot;&lt;br /&gt;
config_vbox1=&amp;quot;null&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Add here all interfaces that you want to bridge&lt;br /&gt;
# eg eth0, but make sure to add config_eth0=&amp;quot;null&amp;quot;&lt;br /&gt;
rc_need_br0=&amp;quot;net.vbox0&amp;quot;&lt;br /&gt;
# For my baselayout 1.12.11.1 it is:&lt;br /&gt;
# RC_NEED_br0=&amp;quot;...&amp;quot;&lt;br /&gt;
bridge_br0=&amp;quot;vbox0 vbox1 eth0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# The following will be the host IP, it can be the default router&lt;br /&gt;
# for the VM in routing mode.&lt;br /&gt;
# You can use dhcp here if you like, it makes sense if you want&lt;br /&gt;
# to bridge your VM into the real network.&lt;br /&gt;
#config_br0=&amp;quot;dhcp&amp;quot;&lt;br /&gt;
config_br0=&amp;quot;192.168.1.2/24&amp;quot;&lt;br /&gt;
routes_br0=&amp;quot;default via 192.168.1.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
brctl_br0=&amp;quot;setfd 0&lt;br /&gt;
sethello 0&lt;br /&gt;
stp off&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{File|/etc/conf.d/net (baselayout-1)|&amp;lt;pre&amp;gt;&lt;br /&gt;
#the interface is really replaced by br0 for outgoing, so if you had dhcp here, you'll use dhcp in br0&lt;br /&gt;
config_eth0=( &amp;quot;null&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
#this specifies that interface vbox0 will be a tap interface and use the tunctl command to generate itself&lt;br /&gt;
tuntap_vbox0=&amp;quot;tap&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#ALL interfaces part of a bridge should be null, otherwise oddities may occur.&lt;br /&gt;
config_vbox0=( &amp;quot;null&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
# you can specify an owner of the interface if you want to run virtual box as a non root user&lt;br /&gt;
# [COMMENT from a reader: VirtualBox should never be run as root]&lt;br /&gt;
tunctl_vbox0=(&amp;quot;-u &amp;lt;user&amp;gt;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
tuntap_vbox1=&amp;quot;tap&amp;quot;&lt;br /&gt;
tunctl_vbox1=( &amp;quot;-u &amp;lt;user&amp;gt;&amp;quot; )&lt;br /&gt;
config_vbox1=( &amp;quot;null&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
#If you'd prefer a dynamic ip address for the machine, use&lt;br /&gt;
#config_br0=( &amp;quot;dhcp&amp;quot; )&lt;br /&gt;
config_br0=( &amp;quot;192.168.1.2 broadcast 192.168.1.255 netmask 255.255.255.0&amp;quot; )&lt;br /&gt;
routes_br0=( &amp;quot;default via 192.168.1.1&amp;quot; ) &lt;br /&gt;
#this specifies the bridging information&lt;br /&gt;
bridge_br0=&amp;quot;eth0 vbox0 vbox1&amp;quot;&lt;br /&gt;
#Make sure your baselayout is recent enough to support this&lt;br /&gt;
depend_br0() &lt;br /&gt;
{&lt;br /&gt;
         need net.eth0&lt;br /&gt;
         need net.vbox0&lt;br /&gt;
         need net.vbox1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
brctl_br0=( &amp;quot;setfd 0&amp;quot; &lt;br /&gt;
&amp;quot;sethello 0&amp;quot;&lt;br /&gt;
&amp;quot;stp off&amp;quot; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Now create interface symlinks:&lt;br /&gt;
{{Root|ln -s net.lo /etc/init.d/net.vbox0&lt;br /&gt;
ln -s net.lo /etc/init.d/net.vbox1&lt;br /&gt;
ln -s net.lo /etc/init.d/net.br0&lt;br /&gt;
rc-update add net.br0 default&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=====Configure virtual machine=====&lt;br /&gt;
Run virtualbox and click &amp;quot;Settings&amp;quot; for your virtual machine&lt;br /&gt;
* Click Network&lt;br /&gt;
* Set &amp;quot;Attached to&amp;quot; to &amp;quot;Host interface&amp;quot;&lt;br /&gt;
* Set &amp;quot;Interface name&amp;quot; to &amp;quot;vbox0&amp;quot; (Don't forget this or you'll get a VERR_HOSTIF_INIT_FAILED)&lt;br /&gt;
&lt;br /&gt;
=====Configure udev=====&lt;br /&gt;
In older versions of udev, the default permissions of /dev/net/tun do not allow all users to access the device, this is due to pre-capabilities period. Nowdays it is perfectly safe to allow all users to access the device, while only root is able to manipulate the device.&lt;br /&gt;
&lt;br /&gt;
If you get '''other''' output of the following command you need to install an extra rule.&lt;br /&gt;
{{Command|# ls -l /dev/net/tun&lt;br /&gt;
crw-rw-rw- 1 root root 10, 200 2008-07-23 16:45 /dev/net/tun}}&lt;br /&gt;
&lt;br /&gt;
{{File|/etc/udev/rules.d/60-tun.rules|&amp;lt;pre&amp;gt;&lt;br /&gt;
KERNEL == &amp;quot;tun&amp;quot;, MODE=&amp;quot;0666&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Refresh rules&lt;br /&gt;
{{Root|udevcontrol --reload_rules&lt;br /&gt;
udevadm trigger}}&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
{{FixMe|Troubleshooting section needs cleanup}}&lt;br /&gt;
This section contains some troubleshooting guides provided by other users.&lt;br /&gt;
&lt;br /&gt;
===Framebuffer in Guest OS: Missing Half the Screen===&lt;br /&gt;
If you happen to want framebuffer support for a guest OS using either vesafb or the newer uvesafb you may notice that you can't see half of your screen. I am not entirely sure why this is a problem for VirtualBox, but you can use uvesafb or vesafb without any problems. Simply remove consolefont from the boot runlevel as follows:&lt;br /&gt;
{{Root|rc-update del consolefont boot}}&lt;br /&gt;
This seems to fix the problem and doesn't cause any other side effects.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another user: This did not help on my machine, but setting mtrr:4 and redraw instead of ywrap in grub.conf helped. So here's the complete video option string I'm using:&lt;br /&gt;
 video=uvesafb:800x600-16,mtrr:4,redraw&lt;br /&gt;
I'm not sure about mtrr:4, but at least the kernel doesn't complain about invalid mtrr settings anymore. Using &amp;quot;redraw&amp;quot; instead of &amp;quot;ywrap&amp;quot; is slower according to the (u)vesavfb docs, but in VirtualBox it's flying.&lt;br /&gt;
&lt;br /&gt;
===Error: interface vbox0 does not exist!===&lt;br /&gt;
You need to ensure you have the tun / tap module compiled into your kernel and modprobed. Also, ensure you have sys-apps/usermode-utilities which now provides the tunctl app.&lt;br /&gt;
&lt;br /&gt;
===Virtual Windows XP Installation Crashes During Format of the Partition With 0% Progress===&lt;br /&gt;
You might have a crash during formatting of the partition while installing your virtual Windows XP. If you get the error above, please check that the assigned amount of memory for the virtual machine is less than the real memory of your PC. The combination when you have 1GB of real memory and 2GB of memory assigned for your virtual machine will crash your Windows XP installation on the first access to the HDD, which is actually attempt to perform format during installation!&lt;br /&gt;
&lt;br /&gt;
The problem also exists during the creation of Linux virtual machines. Behavior is the same: virtual machine crashes during first access to the HDD.&lt;br /&gt;
&lt;br /&gt;
===Guest Does Not Receive Packets In Bridge Mode===&lt;br /&gt;
If the guest does not receive packets in bridge mode, check for bugs [http://bugs.gentoo.org/show_bug.cgi?id=150791 #150791] and [http://bugs.gentoo.org/show_bug.cgi?id=171356 #171356]. The problem is because of the txqueuelen:0 setting in the assigned tap device.&lt;br /&gt;
&lt;br /&gt;
If you followed this guide and still have some issues with bridged networking, then take a look at this [http://forums.gentoo.org/viewtopic-t-713799.html forum thread]&lt;br /&gt;
&lt;br /&gt;
===Stalling at &amp;quot;Spawning&amp;quot;===&lt;br /&gt;
If your virtual machine never gets past 0% when you click &amp;quot;Start Machine&amp;quot;, one way to fix it might be:&lt;br /&gt;
{{Root|killall --verbose --signal KILL VBoxSVC}}&lt;br /&gt;
&lt;br /&gt;
I thought I was being real smart when I put Virtual Machine Related support in my kernel. VirtualBox does not need anything in your kernel to run a machine. Once I took out that support, everything worked.&lt;br /&gt;
&lt;br /&gt;
I had the same problem, however, I didn't have anything related to virtualization in my kernel. The last log messages were ALSA related, and switching the VirtualBox sound to OSS (although that's actually alsa's OSS emulation) got me to boot the machine :)&lt;br /&gt;
&lt;br /&gt;
My virtual box used to work, but after accidental deletion of an image, VirtualBox refused to start a new machine and also stalled at spawning. After a simple &amp;quot;killall VBoxSVC&amp;quot; (which is a daemon process running in background), everything works well.&lt;br /&gt;
&lt;br /&gt;
===VirtualBox Constantly Uses CPU===&lt;br /&gt;
When the guest is idle VirtualBox should consume very little CPU. This will vary by system but should generally be less than 10%. For example, on a quad core system the VirtualBox process consumes ~1% CPU with an idle WinXP guest. You can experience high VirtualBox CPU usage even when the guest XP session shows no activity via Task Manager. A possible remedy is to examine the WinXP applications and services. As stated in the VirtualBox built in help file, this behavior can be caused by anti-virus software and the recommendation given there is to disable anti-virus. Further examination of the services can be done to eliminate any unneeded processes. I found that a VNC server inside of the WinXP guest caused a constant load of 50% on one CPU core in a quad core system.  Skype causes similar inactive cpu load issues.&lt;br /&gt;
This issue can also arise from running the guest with an XP hardware profile copied from a native multicore ACPI system. Change the system type in the virtual profile to 'Standard PC' to reduce CPU overhead from BIOS ACPI calls.&lt;br /&gt;
&lt;br /&gt;
===USB Devices Grayed Out===&lt;br /&gt;
If you can see your devices, but they are greyed out it is a permission problem:&lt;br /&gt;
&lt;br /&gt;
====VirtualBox Advice====&lt;br /&gt;
The VirtualBox [http://www.virtualbox.org/wiki/User_FAQ User FAQ] specifies, &amp;quot;If USB doesn't work, check your usbfs permissions. See &amp;quot;Troubleshooting&amp;quot; -&amp;gt; &amp;quot;Linux hosts&amp;quot; in the User Manual for a solution.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The pertinent section of that section of the VirtualBox [http://www.virtualbox.org/download/1.6.0/UserManual.pdf User Manual] specifies:&lt;br /&gt;
&lt;br /&gt;
If USB is not working on your Linux host, make sure that the current user has permission to access the USB filesystem (usbfs), which VirtualBox relies on to retrieve valid information about your host’s USB devices. As usbfs is a virtual filesystem, a chmod on /proc/bus/usb has no effect. The permissions for usbfs can therefore only be changed by editing the /etc/fstab file. For example, most Linux distributions have a user group called usb or similar, of which the current user must be a member. To give all users of that group access to usbfs, make sure the following line is present:&lt;br /&gt;
{{File|/etc/fstab|&amp;lt;pre&amp;gt;&lt;br /&gt;
# 85 is the USB group&lt;br /&gt;
none /proc/bus/usb usbfs devgid=85,devmode=664 0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
Replace 85 with the group ID that matches your system (search /etc/group for &amp;quot;usb&amp;quot; or similar).&lt;br /&gt;
{{Command|getent group usb}}&lt;br /&gt;
&lt;br /&gt;
====How Gentoo does it specifically====&lt;br /&gt;
Note that udev supports fstab settings. And the pertinent group to be added as the devgid is the plugdev group (ensure your user is a member of this group). Reference Chapter 11 of the Gentoo Handbook. So,&lt;br /&gt;
{{Command|getent group plugdev}}&lt;br /&gt;
&lt;br /&gt;
Use the number that is retrieved as the devgid=## in /etc/fstab line quoted above.&lt;br /&gt;
&lt;br /&gt;
Log out and log back in.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
*[http://www.freesoftwaremagazine.com/articles/using_virtualbox_to_run_ubuntu Example on getting Ubuntu to work inside VirtualBox] (Skip the ''Getting VirtualBox'' part)&lt;br /&gt;
* [[Virtualbox Gentoo as Guest]]&lt;br /&gt;
&lt;br /&gt;
== Headline text ==&lt;br /&gt;
&lt;br /&gt;
[[tr:VirtualBox]]&lt;/div&gt;</summary>
		<author><name>82.227.229.68</name></author>	</entry>

	</feed>