[ovs-discuss] Can't obtain IP address for KVM
fbl at redhat.com
Fri Mar 28 03:19:45 UTC 2014
On Thu, Mar 27, 2014 at 07:34:30PM -0700, Jeff W wrote:
> Hi, recently I installed Openvswitch 2.1.0 and KVM for a CentOS 6.5
> host, and created a VM with qemu-kvm command. Every thing looks find
> but can't get IP address from DHCP. I'm listing the steps I did here,
> hope anyone can point out what I missed.
> # vi /etc/sysconfig/network-scripts/ifcfg-eth0
This should be NM_CONTROLLED=no as NM is not controlling
> # vi /etc/sysconfig/network-scripts/ifcfg-br0
This is not correct because if eth0 is not added to the
bridge before bring up br0, then the dhcp will fail because
there will be no connectivity to the dhcp server.
Please, take a look at the documentation file:
> # ovs-vsctl add-port br0 eth0; service network restart; service openvswitch restart
That is not correct. The network service should start openvswitch
service if needed. If you restart openvswitch, then everything done
by the network service is lost.
The order would be:
# service network stop <-- stop using devices
# service openvswitch restart <-- restart devices
# service network start <-- use the devices
> # ovs-vsctl show
> Bridge "br0"
> Port "eth0"
> Interface "eth0"
> Port "tap0"
> Interface "tap0"
> Port "br0"
> Interface "br0"
> type: internal
> ovs_version: "2.1.0"
> tap0 port has been added to br0
> # service network restart
> Determining IP information for eth0... failed [FAILED]
> As you can see, there's no IP in the guest either, but the MAC address is correct !
> I already spent 3 days to try to figure out what's wrong with my steps but failed. Please! any advice is appreciated.
Looks like a firewall issue. Notice that using libvirt, the
default firewall uses virbr0, and you are using br0 which
forwarding/input/output traffic could be blocked.
More information about the discuss