2NICs eth0 to physical DHCP and eth1 to virtual network


i have a problem.
i created a debian 8.1 VM.
i configured it as following:

eth0 is bridged to xenbr on the physical network. opennebula only handles MAC-Addresses and the IP should come from the local DHCP from the physical network.

eth1 should stay connected in a virtual network.

when i only connect 1 nic and configure /etc/network/interfaces to use dhcp and no CONTEXTUALIZATION, everything is ok

but when i connect 2NICs and use CONTEXTUALIZATION, then the virtual network on eth1 is configured but eth0 is also overwritten and do not use DHCP any more :frowning:

can anybody help me ?

thank you verry much!

hi s3bb0,

I think this is what happens:

with NO CONTEXTUALIZATION: external DHCP is used, and a VM gets an IP + rest.

with 2 NICs + CONTEXTUALIZATION, eth1 is configured properly, as defined in the Virtual Network Context. But it seems that your eth0 virtual network has context set, remove that context and only define the IP range and it should work with remote DHCP.

Or another way; destroy the eth0-virtual-network, add a new one, specify IP range and leave context empty in opennebula. Next, set the eth0 interfaces of your VMs to dhcp, and it should work.