New Question
0

VMs are not getting network with Hyper-V openstack

asked 2014-09-12 09:25:34 +0200

Sirisha gravatar image

I have an openstack controller installed using COI in which all openstack services are running except nova-compute. Used Cloudbase openstack compute installer for setting up hyper-v compute node in which nova-compute is running. Able to boot the instance but dhcp agent is unable to assign ip to the instance.

/etc/neutron/neutron.conf has: coreplugin = neutron.plugins.hyperv.hypervneutron_plugin.HyperVNeutronPlugin

/etc/neutron/dhcpagent.ini interfacedriver =neutron.agent.linux.interface.OVSInterfaceDriver

neutronhypervagent.conf: [AGENT] pollinginterval = 2 physicalnetworkvswitchmappings = *:external localnetworkvswitch = private enablemetricscollection=false

Error in the /var/log/neutron/dhcp-agent.log

2014-09-11 14:09:03.407 22809 INFO neutron.agent.dhcpagent [-] Synchronizing state complete 2014-09-11 14:09:33.409 22809 INFO neutron.agent.dhcpagent [-] Synchronizing state 2014-09-11 14:09:33.799 22809 ERROR neutron.agent.dhcpagent [-] Unable to enable dhcp for db68640c-3367-49b0-88f1-1e91ffcf611e. 2014-09-11 14:09:33.799 22809 TRACE neutron.agent.dhcpagent Traceback (most recent call last): 2014-09-11 14:09:33.799 22809 TRACE neutron.agent.dhcpagent File "/usr/lib/python2.7/dist-packages/neutron/agent/dhcpagent.py", line 127, in calldriver 2014-09-11 14:09:33.799 22809 TRACE neutron.agent.dhcpagent getattr(driver, action)(**actionkwargs) 2014-09-11 14:09:33.799 22809 TRACE neutron.agent.dhcpagent File "/usr/lib/python2.7/dist-packages/neutron/agent/linux/dhcp.py", line 166, in enable 2014-09-11 14:09:33.799 22809 TRACE neutron.agent.dhcpagent reuseexisting=True) 2014-09-11 14:09:33.799 22809 TRACE neutron.agent.dhcpagent File "/usr/lib/python2.7/dist-packages/neutron/agent/linux/dhcp.py", line 832, in setup 2014-09-11 14:09:33.799 22809 TRACE neutron.agent.dhcpagent namespace=network.namespace) 2014-09-11 14:09:33.799 22809 TRACE neutron.agent.dhcpagent File "/usr/lib/python2.7/dist-packages/neutron/agent/linux/interface.py", line 169, in plug 2014-09-11 14:09:33.799 22809 TRACE neutron.agent.dhcpagent self.checkbridgeexists(bridge) 2014-09-11 14:09:33.799 22809 TRACE neutron.agent.dhcpagent File "/usr/lib/python2.7/dist-packages/neutron/agent/linux/interface.py", line 106, in checkbridgeexists 2014-09-11 14:09:33.799 22809 TRACE neutron.agent.dhcpagent raise exceptions.BridgeDoesNotExist(bridge=bridge) 2014-09-11 14:09:33.799 22809 TRACE neutron.agent.dhcp_agent BridgeDoesNotExist: Bridge br-int does not exist.

There seems to be no bridges concept in hyper-v, we have vswitch and portgroup networking stack. Is there any interface driver which is compatible with hyper-v plugin? Anyone please suggest where can I find detailed networking guide for hyper-v plugin.

Any help will be appreciated.

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2014-09-12 17:03:21 +0200

Claudiu Belu gravatar image

updated 2014-09-17 19:59:08 +0200

Hello Sirisha,

First of all, in /etc/neutron/neutron.conf, please use ML2 driver instead. ML2 allows you to use multiple networking technologies: openvswitch, linuxbridge, Hyper-V L2 agent.

core_plugin = neutron.plugins.ml2.plugin.Ml2Plugin

You will have to make sure that in the config file /etc/neutron/plugins/ml2/ml2_conf.ini you have the following:

[ml2]
tenant_network_types = vlan
type_drivers = local,flat,vlan,gre,vxlan
mechanism_drivers = openvswitch,hyperv

Also, make sure your openstack controller services q-svc and q-agt run using both config files:

python /usr/local/bin/neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini
python /usr/local/bin/neutron-openvswitch-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini

From reading the logs you showed, it seems the bridge br-int is missing on your openstack controller. Could you run the following command and post the results?

sudo ovs-vsctl show

The bridges br-ex, br-int, br-eth1 (assuming eth1 is the Guest network) should be present.

If not, run:

# if br-int is missing
sudo ovs-vsctl add-br br-int

# if br-eth1 is missing
sudo ovs-vsctl add-br br-eth1
sudo ovs-vsctl add-port br-eth1 eth1

#if br-ex is missing
sudo ovs-vsctl add-br br-ex
sudo ovs-vsctl add-port br-ex EXTERNAL_INTERFACE

Secondly, before the instance to receive an IP, the port associated to the instance must be bound. To check this, run:

(nova show instance_name for the INSTANCE_IP)
PORT_ID=`neutron port-list | grep $INSTANCE_IP | awk '{ print $2 }'`
neutron port-show port_id

The result must have the following fields:

admin_state_up        | True
binding:host_id       | WIN-...
binding:vif_type      | hyperv
binding:vnic_type     | normal
status                | ACTIVE

Finally, it would be useful to know what OpenStack release you are using as well as the environment you are using on your OpenStack controller and Hyper-V node.

UPDATE 1:

Can you try to do:

neutron net-show $NETWORK_ID

where NETWORK_ID is the ID of the network you are trying to boot the new instance. The field provider:network_type must be one of those values: vlan, flat, local, as those are the ones supported by Hyper-V.

If it is, then some logs should be useful: Hyper-V compute node neutron logs, OpenStack controller q-agt.log

Also, it would be useful to see what agents are alive. Executing:

neutron agent-list

should list the registered agents and their status. At least DHCP agent, HyperV agent and Open vSwitch agent should be alive.

UPDATE 2:

If the port is bound, according to neutron, then we will have to get deeper into the issue. First of all, we should check that the NIC has been conected corectly on Hyper-V. On the Hyper-V compute node, open a powershell and execute:

Get-VMNetworkAdapterVlan -VMNetworkAdapterName $PORT_ID -ErrorAction Ignore

where $PORTID is the same portid shown in neutron. It should display something like this:

VMName            VMNetworkAdapterName                 Mode   VlanList
------            --------------------                 ----   --------
instance-00000089 3bfe7d09-073c-4ac6-9acd-b73b44a0a5f9 Access 500

If not, the Hyper-V neutron logs are really necessary to know what to do next.

If the results are corect, then there could be a number of possible issues:

  1. Make sure that DHCP agent is alive:

    neutron agent-list
    
  2. Make sure that the ...

(more)
edit flag offensive delete link more
0

answered 2014-09-15 16:58:47 +0200

Sirisha gravatar image

Hi Claudiu,

Thank you for the reply. I made the modifications suggested by you. After creating bridges and adding ports to it.

Result of ovs-vsctl show:

root@ubuntu:~# ovs-vsctl show
dba4b4c6-b1d9-4bd3-a0e7-c365b4359929
    Bridge br-int
       Port br-int
         Interface br-int
           type: internal
       Port "tapcff79286-48"
         tag: 4095
         Interface "tapcff79286-48"
           type: internal
    Bridge "br-eth1"
       Port "eth1"
         Interface "eth1"
       Port "br-eth1"
         Interface "br-eth1"
           type: internal
     Bridge "br-eth0"
       Port "eth0"
        Interface "eth0"
       Port "br-eth0"
        Interface "br-eth0"
         type: internal
     ovs_version: "2.0.2"

I booted new instance. It is in active state but Ip is not assigned to it.

Result of neutron port-show  59bb1389-d592-4993-9681-7d92384744f3 :

  Field | Value |
  +-----------------------+-----------------
   | admin_state_up  | True|
   | binding:host_id | WIN-IT50CNS6R6V |
   | binding:vif_type | binding_failed |
   | binding:vnic_type | normal |
   | status | DOWN |

We are using Openstack Icehouse release.

Please suggest any solution.

Regards,
Sirisha

edit flag offensive delete link more

Comments

Hello, Can you try to do: neutron net-show $NETWORK_ID where NETWORK_ID is the ID of the network you are trying to boot the new instance. The field provider:network_type must be one of those values: vlan, flat, local, as those are the ones supported by Hyper-V.

Claudiu Belu gravatar imageClaudiu Belu ( 2014-09-15 17:24:09 +0200 )edit

If it is, then some logs should be useful: Hyper-V compute node neutron logs, OpenStack controller q-agt.log

Claudiu Belu gravatar imageClaudiu Belu ( 2014-09-15 17:28:54 +0200 )edit

Also, it would be useful to see what agents are alive. executing "neutron agent-list" should list the registered agents and their status. At least DHCP agent, HyperV agent and Open vSwitch agent should be alive.

Claudiu Belu gravatar imageClaudiu Belu ( 2014-09-16 12:00:23 +0200 )edit

/etc/neutron/plugins/ml2/ml2_conf.ini contains
[ml2]
type_drivers = local,flat,vlan,gre,vxlan
tenant_network_types = vlan
mechanism_drivers = openvswitch,hyperv
[ml2_type_vlan]
network_vlan_ranges = physnet1:1000:2999,physnet2

Sirisha gravatar imageSirisha ( 2014-09-17 03:35:02 +0200 )edit

/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini contains
[SECURITYGROUP]
firewall_driver=neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
#firewall_driver=neutron.agent.firewall.NoopFirewallDriver
enable_security_group=False

Sirisha gravatar imageSirisha ( 2014-09-17 03:35:58 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2014-09-12 09:25:34 +0200

Seen: 2,641 times

Last updated: Sep 17 '14