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 > DEVICE="eth0" > NM_CONTROLLED="yes"
This should be NM_CONTROLLED=no as NM is not controlling this device. > ONBOOT="yes" > IPV6INIT=no > TYPE="OVSPort" > DEVICETYPE="ovs" > OVS_BRIDGE=br0 > > # vi /etc/sysconfig/network-scripts/ifcfg-br0 > DEVICE=br0 > HWADDR=00:22:19:13:FB:64 > TYPE=OVSBridge > DEVICETYPE="ovs" > UUID=2b794195-debf-4b2a-944f-bc03530b7c86 > ONBOOT=yes > NM_CONTROLLED=yes same here. > BOOTPROTO=dhcp 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: http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob;f=rhel/README.RHEL;h=cb6ab88d5b44e4c57008c0f590543f19d1d22c3b;hb=b6c4da210dccd802d775a58af1b6eac2e866d011#l77 > # 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 > 409b63f5-36d3-4bac-a490-8f63e2cce0c7 > 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 ok > # 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. fbl _______________________________________________ discuss mailing list [email protected] http://openvswitch.org/mailman/listinfo/discuss
