[ovs-discuss] Can't obtain IP address for KVM
jeffwji at yahoo.com
Sat Mar 29 00:59:32 UTC 2014
Thank you for the reply, it's my fault, NM_CONTROLLED was NO. And the service start order is correct as openvswitch starts before the network when system reboot, (however the commands order is incorrect.) Base on the link you gave, now the NICs config are below:
$ sudo vi ifcfg-br0
$ sudo vi ifcfg-eth0
Firewall is disabled, and so did the selinux, but was still not able to get IP, ...:-( any idea?,
On Thursday, March 27, 2014 11:19:54 PM, Flavio Leitner <fbl at redhat.com> wrote:
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
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"
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the discuss