[openstack-dev] [neutron][hyper-v] Instance can't get fixed ip on hyper-v compute node

Lily.Sing lily.sing at gmail.com
Wed Jun 24 07:02:11 UTC 2015


Hi,

I setup an openstack env as one controller + network node on OL7.1 and two
compute node on windows 2012 server with cloudbase hyper-v compute node
driver. Every compute node has two nics. I created a vswitch on the second
one and use it to connect to instances. Below is my
neutron_hyper_agent.conf:

[DEFAULT]
verbose=true
control_exchange=neutron
policy_file=C:\Program Files (x86)\Cloudbase
Solutions\OpenStack\Nova\etc\policy.json
rpc_backend=neutron.openstack.common.rpc.impl_kombu
logdir=C:\OpenStack\Log\
logfile=neutron-hyperv-agent.log
[AGENT]
polling_interval=2
physical_network_vswitch_mappings=*:Intel(R) Ethernet Controller X540-AT2
#3 - Virtual Switch
enable_metrics_collection=false
[SECURITYGROUP]
firewall_driver=neutron.plugins.hyperv.agent.security_groups_driver.HyperVSecurityGroupsDriver
enable_security_group=true
[oslo_messaging_rabbit]
rabbit_host=<rabbit_host>
rabbit_port=5672
rabbit_userid=stackrabbit
rabbit_password=admin


After launching an instance, I can check from OpenStack UI that a fixed IP
is given, but when connecting the instance from hyper-v manager, no fixed
ip is bound to any port. And below is the error message I got from
neutron-hyper-agent.log:
2015-06-23 22:59:15.954 3552 INFO hyperv.neutron.hyperv_neutron_agent
[req-a0577427-04e9-481d-94f0-027cc57eb26a ] Provisioning network
6d5ee4aa-19e2-404e-9523-cc501b20f081
2015-06-23 22:59:22.088 3552 ERROR hyperv.neutron.hyperv_neutron_agent
[req-a0577427-04e9-481d-94f0-027cc57eb26a ] Error in agent event loop
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
Traceback (most recent call last):
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
File "C:\Program Files (x86)\Cloudbase
Solutions\OpenStack\Nova\Python27\lib\site-packages\hyperv\neutron\hyperv_neutron_agent.py",
line 356, in daemon_loop
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
sync = self._process_network_ports(port_info)
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
File "C:\Program Files (x86)\Cloudbase
Solutions\OpenStack\Nova\Python27\lib\site-packages\hyperv\neutron\hyperv_neutron_agent.py",
line 332, in _process_network_ports
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
resync_a = self._treat_devices_added(port_info['added'])
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
File "C:\Program Files (x86)\Cloudbase
Solutions\OpenStack\Nova\Python27\lib\site-packages\hyperv\neutron\hyperv_neutron_agent.py",
line 296, in _treat_devices_added
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
device_details['admin_state_up'])
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
File "C:\Program Files (x86)\Cloudbase
Solutions\OpenStack\Nova\Python27\lib\site-packages\hyperv\neutron\hyperv_neutron_agent.py",
line 264, in _treat_vif_port
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
physical_network, segmentation_id)
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
File "C:\Program Files (x86)\Cloudbase
Solutions\OpenStack\Nova\Python27\lib\site-packages\hyperv\neutron\hyperv_neutron_agent.py",
line 195, in _port_bound
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
self._utils.connect_vnic_to_vswitch(map['vswitch_name'], port_id)
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
File "C:\Program Files (x86)\Cloudbase
Solutions\OpenStack\Nova\Python27\lib\site-packages\hyperv\neutron\utilsv2.py",
line 86, in connect_vnic_to_vswitch
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
self._add_virt_resource(vm, port)
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
File "C:\Program Files (x86)\Cloudbase
Solutions\OpenStack\Nova\Python27\lib\site-packages\hyperv\neutron\utilsv2.py",
line 100, in _add_virt_resource
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
self._check_job_status(ret_val, job_path)
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
File "C:\Program Files (x86)\Cloudbase
Solutions\OpenStack\Nova\Python27\lib\site-packages\hyperv\neutron\utils.py",
line 137, in _check_job_status
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
raise HyperVException(msg=_('Job failed with error %d') % ret_val)
2015-06-23 22:59:22.088 3552 TRACE hyperv.neutron.hyperv_neutron_agent
HyperVException: Hyper-V Exception: Job failed with error 32775

Seems it's failed to add a port to a VM, but I don't know how to fix it.
Any idea? Thanks.

Best regards,
Lily Xing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150624/cae8e717/attachment.html>


More information about the OpenStack-dev mailing list