Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have installed opennebula and I have followed this tutorial. Unfortunately I cannot ssh to the virtual machines that appear to be in a running state and already have an IP. The problem might be that I have one NIC and although I read that I should use bridging I am not sure if this is possible and how.

brctl show command output is

bridge name    bridge id            STP enabled    interfaces
br0            8000.50e549b5e2aa    no             eth0
                                                   vnet0
virbr0         8000.000000000000    yes       

vnet0 is the interface of the VM. If I construct a VM to use the virtual bridge virbr0 I have the same problem.

my interfaces file is

iface br0 inet static
address X.X.X.172
netmask 255.255.255.0
gateway X.X.X.200
pre-up ifconfig eth0 down
pre-up brctl addbr br0
pre-up brctl addif br0 eth0
pre-up ifconfig eth0 up
post-down ifconfig eth0 down
post-down brctl delif br0 eth0

iface eth0 inet manual

In ifconfig br0 has been assigned the IP defined in interfaces (which is public) while vnet0 appears to send data (TX bytes > 0) but never receive (RX bytes = 0). Am I missing something? Is it possible to ssh to a VM having one NIC or I need to have a second one?

share|improve this question
add comment

1 Answer

What OpenNebula assumes in its documentation here is that the hosts use two physical interfaces one for private network and one for internet connectivity. Of course if a host has only one interface it can connect to only one of the networks. The solution I tried so that do not lose internet connectivity was to change interfaces file so that the br0 interface is automatically assigned IP by DHCP

iface br0 inet dhcp

I also changed network definition file so that it contains leases of public IP addresses that were not assigned by dhcp. The virtual machine I instantiated was successfully assigned a public IP. Although I was able to ssh to that virtual machine then so can anybody on the internet so I am not going to keep this configuration.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.