vmware instance can not get ip from dhcp

asked 2014-10-27 21:27:27 -0500

weilin wu gravatar image

updated 2014-10-28 00:10:53 -0500

SamYaple gravatar image

I create the instance from openstack. And I can control the instance from Horizon. Also I can see the instance from the vsphere. But I can't ping the instance . I excute udhcpc eth0 from the instance ,but I can't find any dhcpDiscover from the controller. I looked at the /var/log/messages, there are nothing.And i also execute

tcpdump -i br100 -n port 67 or port 68

but i didn't find the dhcpDiscover .

I used the flat network.

[root@controller ~]# nova list

+--------------------------------------+-----------+--------+------------+-------------+------------------------+
| ID                                   | Name      | Status | Task State | Power State | Networks               |
+--------------------------------------+-----------+--------+------------+-------------+------------------------+
| c9712cee-f7d5-422b-8bc2-46a860e18e41 | instance5 | ACTIVE | -          | Running     | net_flat=9.111.122.203 |
| 341eeb56-a7a0-4635-aa50-434c237925a0 | instance6 | ACTIVE | -          | Running     | net_flat=9.111.122.204 |
+--------------------------------------+-----------+--------+------------+-------------+------------------------+

[root@controller ~]# ovs-vsctl show | grep -A 3 -e Port
        Port "tap21a86247-8c"
            tag: 1
            Interface "tap21a86247-8c"
                type: internal
        Port "int-br-eth0"
            Interface "int-br-eth0"
        Port br-int
            Interface br-int
                type: internal
    Bridge "br-eth0"
        Port "eth0"
            Interface "eth0"
        Port "br-eth0"
            Interface "br-eth0"
                type: internal
        Port "phy-br-eth0"
            Interface "phy-br-eth0"
    ovs_version: "2.0.0"

[root@controller ~]# ovs-ofctl show br-int
OFPT_FEATURES_REPLY (xid=0x2): dpid:0000ba077877c04e
n_tables:254, n_buffers:256
capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
actions: OUTPUT SET_VLAN_VID SET_VLAN_PCP STRIP_VLAN SET_DL_SRC SET_DL_DST SET_NW_SRC SET_NW_DST SET_NW_TOS SET_TP_SRC SET_TP_DST ENQUEUE
 1(int-br-eth0): addr:52:17:d2:4c:df:71
     config:     0
     state:      0
     current:    10GB-FD COPPER
     speed: 10000 Mbps now, 0 Mbps max
 2(tap21a86247-8c): addr:e6:78:fe:b6:06:50
     config:     0
     state:      0
     speed: 0 Mbps now, 0 Mbps max
 LOCAL(br-int): addr:b2:5d:cb:e3:8f:a8
     config:     PORT_DOWN
     state:      LINK_DOWN
     speed: 0 Mbps now, 0 Mbps max
OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0

[root@controller ~]# ps aux | grep dnsmasq
nobody    1985  0.0  0.0  12984   604 ?        S    09:17   0:00 /usr/sbin/dnsmasq --strict-order --local=// --domain-needed --pid-file=/var/run/libvirt/network/default.pid --conf-file= --except-interface lo --bind-dynamic --interface virbr0 --dhcp-range 192.168.122.2,192.168.122.254 --dhcp-leasefile=/var/lib/libvirt/dnsmasq/default.leases --dhcp-lease-max=253 --dhcp-no-override --dhcp-hostsfile=/var/lib/libvirt/dnsmasq/default.hostsfile --addn-hosts=/var/lib/libvirt/dnsmasq/default.addnhosts
nobody    3179  0.0  0.0  12980   764 ?        S    09:21   0:00 /usr/sbin/dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces --interface=tap21a86247-8c --except-interface=lo --pid-file=/var/lib/neutron/dhcp/e3c3121d-d137-4f9e-bf17-ad934567b99d/pid --dhcp-hostsfile=/var/lib/neutron/dhcp/e3c3121d-d137-4f9e-bf17-ad934567b99d/host --addn-hosts=/var/lib/neutron/dhcp/e3c3121d-d137-4f9e-bf17-ad934567b99d/addn_hosts --dhcp-optsfile=/var/lib/neutron/dhcp/e3c3121d-d137-4f9e-bf17-ad934567b99d/opts --leasefile-ro --dhcp-range=set:tag0,9.111.122.0,static,86400s --dhcp-lease-max=256 --conf-file= --domain=openstacklocal
root      8809  0.0  0.0 103248   876 pts/0    S+   10:14   0:00 grep dnsmasq

The controller is a vmware machine in the vcenter. The controller and the instance is on same host. The instance is on the standard switch. br-int port group is on the the standard switch.And the br-int's tag is 0. the standard switch is on the vmnic2. The controller is on the distribute switch. The distribute switch is on the vmnic0 and vmnic1. Only the vmnic0 can access the outside.

And i searched several days,but I really don't what's the problem.

edit retag flag offensive close merge delete