Page 1 of 2

Need help for Network multiple Guests an IPs

Posted: 25. Oct 2009, 16:05
by huppsi
Hello,

first off all my english is not so well :-)
Many thanks to all of you, bringing me so far on Virtualbox, reading this forum.
Now here come´s the problem:

I have a guest machine running debian lenny and already installed virtualbox with one guest. This one runs fine with NAT.
I have 2 more ip`s configured on the host with eth0:1 and eth0:2. Now i want to install 2 more guests on this machine, one using eht0:1 with a static IP, and the other using eht0:2 with static IP. The host is headless.
How do i configure this with VBoxManage ?
The guests need to talk to each other and have Internet in both ways. (in and out)
If i can configure this guests with eth0:1 and eth0:2 do i need to setup different ports for rdp connections? And where can i change network settings for guests? (root/.virtualbox/...........?)

Thanks

huppsi

Re: Need help for Network multiple Guests an IPs

Posted: 25. Oct 2009, 16:13
by Sasquatch
You have to do everything through the VBoxManage interface. Note the IP addresses of the aliased interface and the gateway and DNS server(s) of the Host. Remove those IP addresses from the Host configuration. Install the Guests, set their NIC to bridged and give the VMs the IP address you want them to have. The IP is set inside the VM, not through VB settings.

Re: Need help for Network multiple Guests an IPs

Posted: 25. Oct 2009, 17:39
by huppsi
Hello Sasquatch,

thanks for your quick replay.

How do i set bridged networking?

Code: Select all

VBoxManage modifyvm "VMachine" --nic1 bridged
??
How do i set the ip??

Re: Need help for Network multiple Guests an IPs

Posted: 26. Oct 2009, 11:55
by huppsi
OK now i have it bridgeg with bridgeadapter eth0, setup an IP and the guest says "network unreachable"

Code: Select all

<Network>
        <Adapter slot="0" enabled="true" MACAddress="080027E202FE" cable="true" speed="0" type="Am79C973">
          <BridgedInterface name="eth0"/>
Thats what the .xml file tells me about the network for the guest. What Information do you need to help me on?

Re: Need help for Network multiple Guests an IPs

Posted: 26. Oct 2009, 23:39
by Sasquatch
This is all that's needed for the Guest to have Bridged network:

Code: Select all

<Adapter slot="1" enabled="true" MACAddress="080027EB1A42" cable="true" speed="0" type="82540EM">
          <BridgedInterface name="wlan"/>
And as your XML file has the same, it should have a proper connection to the outside. All the Guest now needs is a valid IP and gateway with DNS and you're good to go.
The Unreachable error means that there is no valid IP address or gateway set.

Re: Need help for Network multiple Guests an IPs

Posted: 29. Oct 2009, 15:19
by huppsi
OK,

this doesn`t work for me.
On the guest :
arp -a ? (192.0.0.0) auf <unvollständig> auf eth0
ifconfig -a give´s me
eth0 Link encap:Ethernet Hardware Adress 08:00.00.00.00 Inet Adress
with an IP

So it should run, but it does not!

Reinstalled the guest no changes.

ping on localhost runs; ping on some domain: unknown host. DNS is in resolv.conf.

ANY Ideas?

Re: Need help for Network multiple Guests an IPs

Posted: 29. Oct 2009, 15:52
by Sasquatch
Gateway? What does route or route print show?

Re: Need help for Network multiple Guests an IPs

Posted: 29. Oct 2009, 16:28
by huppsi
route
Ziel Router Genmask Flags Metric Ref Use Iface
localnet * 255.255.255.192 U 0 0 0 eth0
default 192.40.112.129 0.0.0.0 UG 0 0 0 eth0

Re: Need help for Network multiple Guests an IPs

Posted: 1. Nov 2009, 17:19
by huppsi
no ideas?

Re: Need help for Network multiple Guests an IPs

Posted: 1. Nov 2009, 17:59
by huppsi
is it a problem to use nat and bridge on one interface (eth0)?

Re: Need help for Network multiple Guests an IPs

Posted: 1. Nov 2009, 23:02
by Sasquatch
I'm out of ideas. The full command should be like this:

Code: Select all

VBoxManage modifyvm <vmname> --nic1 bridged --bridgedadapter1 eth0
To bridge the first NIC to eth0. With that, all VB configuration is done and the rest is up to the Guest OS.

You can have two virtual interfaces, one with Bridged, one with NAT.

Solved

Posted: 4. Nov 2009, 15:27
by huppsi
It is working!!!!!!!!
The Solution is herehttp://wiki.hetzner.de/index.php/Xen_au ... d_4_IP%27s

Thanks alot.

Now i have to solve the problem, that when i start my vm the following error shows up:

Code: Select all

Waiting for the remote session to open...
ERROR: Virtual machine 'Mailserver' has terminated unexpectedly during startup
Details: code NS_ERROR_FAILURE (0x80004005), component Machine, interface IMachine, callee <NULL>
It is not because of a missing graphical userinterface (that´s what i found on asking aunt google).

Any Ideas??

Re: Need help for Network multiple Guests an IPs

Posted: 4. Nov 2009, 15:32
by Sasquatch
You didn't install the xen kernel, did you? VB will not run on that, because Xen itself is a virtualizer.

Re: Need help for Network multiple Guests an IPs

Posted: 4. Nov 2009, 15:54
by huppsi
OK,
do i have to install all this:

Code: Select all

aptitude install xen-linux-system-2.6.26-1-xen-686 xen-hypervisor-3.2-1-i386 xen-tools xen-utils-3.2-1 xenstore-utils xen-shell xenwatch
or which packages?

VBoxHeadless startvm "name" works

Re: Need help for Network multiple Guests an IPs

Posted: 4. Nov 2009, 20:44
by Sasquatch
huppsi wrote:OK,
do i have to install all this:

Code: Select all

aptitude install xen-linux-system-2.6.26-1-xen-686 xen-hypervisor-3.2-1-i386 xen-tools xen-utils-3.2-1 xenstore-utils xen-shell xenwatch
or which packages?

VBoxHeadless startvm "name" works
You didn't understand what I just said, you must NOT install those packages, that's the whole point. You linked to a Xen page which has nothing to do with VB and following that howto could very well break VB.

Now, I always assumed you were using a fairly recent version of VB that does NOT need a virtual interface and manual bridges, but which version are you running?