Page 1 of 1

Unable to launch Vms Ubuntu Hardy/host interface network

Posted: 23. May 2008, 12:17
by jmoliere
Hi all,
running my Vms with NAT worrks well but I want to setup something like this:

Host
|
|
Guest 1 ------------- guest 2 -----------Guest3


so I think I must put in place host interface network...
I ran the script as provided in docs/wiki...
But as far as I check (in dropdown list) host interface network VMs refuse to run (don't see GRUB menu) and complain with this message:


Failed to initialize Host Interface Networking.
VBox status code: -3100 (VERR_HOSTIF_INIT_FAILED).

Code de résultat :
0x80004005
Composant :
Console
Interface :
IConsole {1dea5c4b-0753-4193-b909-22330f64ec45}



Any clue/suggestion?
I'm a newbie with your product so I may have done something wrong

Cheers
Jerome

PS:
I want to setup on my laptop an environment for simulating HA features of openmq so I need 2 Vms (running java application)sharing a database

Posted: 23. May 2008, 13:52
by Sasquatch
As I see it, you want VM1 to be the gateway for VM2, and VM2 for VM3, right? If that is the case, then you need Internal Network too. With that, your VMs will communicate with each other without problems and the use of the Host system. If you want to separate the VMs individually, that is let VM3 not see VM1 and vice versa unless they go through VM2, use a different name for the Internal Network. Default is intnet, use any name you want. The name is the name of the switch you give it, so every other name represents a different separate switch. Then you can just follow the manual to use Host Interface on VM1 if you want it to be a two-way communication.

With NAT, you can have a one-way communication of the VM to the Host, not vice versa. Use IP 10.0.2.2 to connect to your Host using NAT.

Please, say if this is what you want, or clarify the situation a bit more. Also useful is the Host OS you're using. As this is the Linux Host system, what distribution do you use? Ubuntu, Debian, Fedora, CentOS, SuSE?

Posted: 23. May 2008, 14:06
by jmoliere
Sasquatch wrote:As I see it, you want VM1 to be the gateway for VM2, and VM2 for VM3, right? If that is the case, then you need Internal Network too. With that, your VMs will communicate with each other without problems and the use of the Host system. If you want to separate the VMs individually, that is let VM3 not see VM1 and vice versa unless they go through VM2, use a different name for the Internal Network. Default is intnet, use any name you want. The name is the name of the switch you give it, so every other name represents a different separate switch. Then you can just follow the manual to use Host Interface on VM1 if you want it to be a two-way communication.

With NAT, you can have a one-way communication of the VM to the Host, not vice versa. Use IP 10.0.2.2 to connect to your Host using NAT.

Please, say if this is what you want, or clarify the situation a bit more. Also useful is the Host OS you're using. As this is the Linux Host system, what distribution do you use? Ubuntu, Debian, Fedora, CentOS, SuSE?

Oops my schema ( -) ) was truncated while being layed out by the forum program,
in fact I want to have my OS (ubuntu hardy8.04 as stated in the title) running on a Dell XPS 1330 with 4 gb RAM, serving 3 Vms (debian etch r3) with 512Mo RAM each.
I want to set up a configuration where each Vm can see ech others and acces to Internet...If the host can access the guests its good but not mandatory for me (could be just simpler for delivering common programs and files)...

My VMs must see others because they will use broadcast (it's a cluster with a ping like mechanism on a special port for testing living of other members, used too for auto discovery)...

I hope to be clear
Thanks for your help

Posted: 23. May 2008, 15:55
by jmoliere
jmoliere wrote:
Sasquatch wrote:As I see it, you want VM1 to be the gateway for VM2, and VM2 for VM3, right? If that is the case, then you need Internal Network too. With that, your VMs will communicate with each other without problems and the use of the Host system. If you want to separate the VMs individually, that is let VM3 not see VM1 and vice versa unless they go through VM2, use a different name for the Internal Network. Default is intnet, use any name you want. The name is the name of the switch you give it, so every other name represents a different separate switch. Then you can just follow the manual to use Host Interface on VM1 if you want it to be a two-way communication.

With NAT, you can have a one-way communication of the VM to the Host, not vice versa. Use IP 10.0.2.2 to connect to your Host using NAT.

Please, say if this is what you want, or clarify the situation a bit more. Also useful is the Host OS you're using. As this is the Linux Host system, what distribution do you use? Ubuntu, Debian, Fedora, CentOS, SuSE?

Oops my schema ( -) ) was truncated while being layed out by the forum program,
in fact I want to have my OS (ubuntu hardy8.04 as stated in the title) running on a Dell XPS 1330 with 4 gb RAM, serving 3 Vms (debian etch r3) with 512Mo RAM each.
I want to set up a configuration where each Vm can see ech others and acces to Internet...If the host can access the guests its good but not mandatory for me (could be just simpler for delivering common programs and files)...

My VMs must see others because they will use broadcast (it's a cluster with a ping like mechanism on a special port for testing living of other members, used too for auto discovery)...

I hope to be clear
Thanks for your help

But even if my explanation was not clear and my configuration is not the good one, why VirtualBox fail as soon as I choose a host network configuration on one ethernet controller?The VM fails before booting and boot menu.

Cheers
Jerome

Posted: 23. May 2008, 16:01
by Sasquatch
That is because you need a virtual interface on your host, you can't point it to your physical interface. If you want what you described, the easiest is to use Interna Networking along with NAT. NAT provides internet, IntNet provides communication between the VMs. That way, the Host won't be affected by the broadcast.

Posted: 23. May 2008, 16:12
by jmoliere
Sasquatch wrote:That is because you need a virtual interface on your host, you can't point it to your physical interface. If you want what you described, the easiest is to use Interna Networking along with NAT. NAT provides internet, IntNet provides communication between the VMs. That way, the Host won't be affected by the broadcast.
Oops but I think that the virtual interface was created..Bridge br0 was created with 3 TAPi ?
using scripts provided on your wiki ...
I will try your solution
Keep in touch...
thanks
Jerome

Posted: 23. May 2008, 18:33
by jmoliere
jmoliere wrote:
Sasquatch wrote:That is because you need a virtual interface on your host, you can't point it to your physical interface. If you want what you described, the easiest is to use Interna Networking along with NAT. NAT provides internet, IntNet provides communication between the VMs. That way, the Host won't be affected by the broadcast.
Oops but I think that the virtual interface was created..Bridge br0 was created with 3 TAPi ?
using scripts provided on your wiki ...
I will try your solution
Keep in touch...
thanks
Jerome

Hi,
I'm trying to follow suggestions from using private networking (that was one of the possible solution ) but I must say that I don't have backgrounds necessary to fully understand the virtualization black magic. my V Ms start with 2 itfs :one for public, the second for internal networking Ok... But in the :etc/networking/interfaces I don't know what is the correct gateway for this LAN? I think that the section of the manual dedicated to this subject is a little bit rude... -)

I read the wiki page:testing networks but I don't understand what are the pseudo scripts at the bottom of the page and where they are coming from ?

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=192.168.10.200
USERCTL=no
PEERDNS=yes
GATEWAY=192.168.1.101
TYPE=Ethernet
IPV6INIT=no


These scripts must be attached to the interfaces using vboxmanage ?hanks for your patience

Cheers
Jerome

Posted: 23. May 2008, 19:11
by Sasquatch
That script is for distributions like Fedora.

As for the settings in the Guests with the networking, the NAT interface, probably eth0, should be DHCP. Eth1, the second interface with Internal Networking, can have any IP address you want. See http://en.wikipedia.org/wiki/Private_Network for info on what IP range you can use. There shouldn't be any gateway needed. Depending on your preference of configuring, I would put the following in /etc/network/interfaces as I don't use Network Manager. You can use NM with the manual config too though, but that is the same as using System > Administration > Network.

Code: Select all

auto eth0 eth1
iface eth0 inet dhcp

iface eth1 inet static
address 172.16.0.1
netmask 255.255.0.0
Change 172.16.0.1 with any address you want, for each VM a different ending number, so VM2 would have 172.16.0.2 and so on. Good luck. This has to work.

Posted: 23. May 2008, 23:29
by jmoliere
Hi,
I'm still facing strange behaviours...
I've set 2 Vms with private networking..
With 2 /etc/network/interfaces containg the same definition for eth0 in DHCP (NAt mode)
while eth1 is configured on 192.168.1.x class C network...
Ok!!!!
I thought that it works while ping one vm to the other (VM1 pinging vm2 and vm2 pinging vm2)
I tried to follow the advice with removing gateway and I get a very strange behaviour:
each time I'll restart the networking service (/etc/init.d/networking restart on debian)
I see that eth1 is the only remaining interface with loopback (so eth0 is lost)
and IT(s VERY STRANGE that VMs configured with static routes swap their addresses!!!
That is to say that VM1 with an adress :192.168.1.11 and VM2 with IP :192.168.1.12
see their addresses swap after restarting the 2 services!!!!
So I guess that nothing works at all!!

Any clue welcome

Cheers
jerome

Posted: 24. May 2008, 00:15
by jmoliere
Hi once again,
someone can answer me one direct question?
Does the GUI over vboxmanage command works ?
I having very strange results and I wonder about this GUI...
It's the official ubuntu package as provided with Ubuntu hardy....
Now trying with latest package from sun after removal from all vms all dvi files and from previous package....

Cheers
Jerome

Posted: 24. May 2008, 01:40
by jmoliere
Hi,
just a small word to say that I succeed in doing my plans...
But with the 1.6 release from Sun..standard one shipped with ubuntu makes strange effects...
Just encountered a small problem with VmBoxManage while trying to clone an image file .vdi... The command succeeded in but the result was very strange :
* GUi reported configuration different from the one set (128Mo RAM instead of 512, no system type instead of debian etc..)
* Networking was not the same as defined in my previous VM...


Whatever, the result is that I'm running 3 Vms in a private network, Internet works well and
I can ssh and ping through them....(among them and to the host os)

Cheers
Jerome