« VirtualBox 3.0.4 ebuildsVirtualBox 3.0.2 ebuilds »

VirtualBox 3.0.2 and HostOnly Networking via headless mode

30/07/09

Permalink 09:18:29 pm, by X-Drum Email , 257 words   English (GB)
Categories: English, VirtualBox, Gentoo

VirtualBox 3.0.2 and HostOnly Networking via headless mode

Problem:
You are using VirtualBox in headless mode and you have to setup
hostonly networking with a specific VirtualMachine,
adding a new hostonly interface with an enabled dhcp server.

Step 1 - (Create a new interface):
First you have to add a new hostonly/dhcp interface using the command:

/opt/VirtualBox/VBoxNetAdpCtl add

Note that at the moment the interface name is harcoded/determined by the
"VBoxNetAdpCtl" command, so you can't call it for istance
"foobarif0", a fixed name "vboxnetN" will be assigned (eg: vboxnet1)

Step 2 - (Add and enable a dhcp server)
Now you can add, if you wish to, a dhcp server to the new interface
"vboxnet1" and configure a dhcp range, for example, with the command:

VBoxManage dhcpserver modify --ifname vboxnet1 \
--ip 192.168.1.254 --netmask 255.255.255.0 \
--lowerip 192.168.1.0 --upperip 192.168.1.250 --enable

Step 3 - (Register the interface and enable HostOnly newtworking)
Now you can register the "new" hostonly, dhcp enabled,
interface "vboxnet1" with an existing VirtualMachine with the
following commands:

VBoxManage modifyvm wxp --nic1 hostonly
VBoxManage modifyvm wxp --hostonlyadapter1 vboxnet1

Step 4 - (Start the VM with VBoxRDP)
Finally you can start the VirtualMachine (and connect later to it
via RDP with an rdp client, rdesktop for example), let's fire up the
VirtualMachine with the command:

VBoxVRDP -s MachineName

Enjoy :)

Notes:
Not sure if it is a bug or a default behaviour but keep in mind
that a new/different hostonly adapter must be first created
manually with "VBoxNetAdpCtl" and then registered later with the
virtualmachine, on the official manual this is not reported[1].

[1] http://www.virtualbox.org/manual/UserManual.html#vboxmanage-dhcpserver

Trackback address for this post

Trackback URL (right click and copy shortcut/link location)

1 comment

Comment from: schtebo [Visitor]
thx!

searched long time for this option

Version 3.1.4 Debian Lenny

you can find

VBoxNetAdpCtl

in

/usr/lib/virtualbox/VBox
06/03/10 @ 15:54

Comments are closed for this post.

Search

May 2012
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

XML Feeds

multiblog engine