Good work Trey. I deployed your multi-nic branch into our environment and found one issue while spinning a new instance. nova-compute.log ---------------- 2011-06-15 16:21:43,411 INFO nova.compute.manager [-] Updating host status 2011-06-15 16:21:43,457 INFO nova.compute.manager [-] Found instance 'instance-00000001' in DB but no VM. State=5, so setting state to shutoff. 2011-06-15 16:22:13,091 DEBUG nova.rpc [-] received {'_context_request_id': '-HZOSOS6WF4UKOR3JAZY', '_context_read_deleted': False, 'args': {'instance_id': 2, 'request_spec': {'instance_properties': {'state_description': 'scheduling', 'availability_zone': None, 'ramdisk_id': '2', 'instance_type_id': 2, 'user_data': '', 'reservation_id': 'r-c8eg5r9o', 'user_id': 'admin', 'display_description': None, 'key_data': 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC80OAKmGq3hnZu03iL5JSaKUe3t8iYDDKNluGxXdSX8pvMwlvXu\\\\/ReywZFgRdJY4EfDdS6rfxH5LmqvBrM6M8l0Sc6v+gCm0VDeJY+JC4AgWEIr\\\\/q5kuYzuhO6UNXkt74axSATN58LIuHs2cjB\\\\/CWpmrAGjs1Bg9fx\\\\/xahmzOFYQ== root@ubuntu-openstack-network-api-server\n', 'state': 0, 'project_id': 'admin', 'metadata': {}, 'kernel_id': '1', 'key_name': 'flat', 'display_name': None, 'local_gb': 0, 'locked': False, 'launch_time': '2011-06-15T23:22:12Z', 'memory_mb': 512, 'vcpus': 1, 'image_ref': 3, 'os_type': None}, 'instance_type': {'rxtx_quota': 0, 'deleted_at': None, 'name': 'm1.tiny', 'deleted': False, 'created_at': None, 'updated_at': None, 'memory_mb': 512, 'vcpus': 1, 'rxtx_cap': 0, 'swap': 0, 'flavorid': 1, 'id': 2, 'local_gb': 0}, 'num_instances': 1, 'filter': 'nova.scheduler.host_filter.InstanceTypeFilter', 'blob': None}, 'admin_password': None, 'injected_files': None, 'availability_zone': None}, '_context_is_admin': True, '_context_timestamp': '2011-06-15T23:22:12Z', '_context_user': 'admin', 'method': 'run_instance', '_context_project': 'admin', '_context_remote_address': '10.2.3.150'} from (pid=20110) process_data /home/tpatil/nova/nova/rpc.py:202 2011-06-15 16:22:13,091 DEBUG nova.rpc [-] unpacked context: {'timestamp': '2011-06-15T23:22:12Z', 'msg_id': None, 'remote_address': '10.2.3.150', 'project': 'admin', 'is_admin': True, 'user': 'admin', 'request_id': '-HZOSOS6WF4UKOR3JAZY', 'read_deleted': False} from (pid=20110) _unpack_context /home/tpatil/nova/nova/rpc.py:445 2011-06-15 16:22:13,189 AUDIT nova.compute.manager [-HZOSOS6WF4UKOR3JAZY admin admin] instance 2: starting... 2011-06-15 16:22:13,463 DEBUG nova.rpc [-] Making asynchronous call on network ... from (pid=20110) multicall /home/tpatil/nova/nova/rpc.py:475 2011-06-15 16:22:13,463 DEBUG nova.rpc [-] MSG_ID is d4f0a065c177470abefde937d3d9acb0 from (pid=20110) multicall /home/tpatil/nova/nova/rpc.py:478 2011-06-15 16:22:14,368 DEBUG nova.compute.manager [-] instance network_info: |[[{'injected': False, 'bridge': 'br0', 'id': 1}, {'broadcast': '10.1.0.63', 'mac': '02:16:3e:2c:47:f4', 'label': 'public', 'gateway6': 'fe80::1842:91ff:fed9:217f', 'ips': [{'ip': '10.1.0.4', 'netmask': '255.255.255.192', 'enabled': '1'}], 'ip6s': [{'ip': 'fd00::16:3eff:fe2c:47f4', 'netmask': '64', 'enabled': '1'}], 'rxtx_cap': 0, 'dns': [None], 'gateway': '10.1.0.1'}], [{'injected': False, 'bridge': 'br0', 'id': 2}, {'broadcast': '10.2.0.63', 'mac': '02:16:3e:4e:72:b2', 'label': 'public', 'gateway6': 'fe80::549a:8aff:fe83:a2fb', 'ips': [{'ip': '10.2.0.3', 'netmask': '255.255.255.192', 'enabled': '1'}], 'ip6s': [{'ip': 'fd00::16:3eff:fe4e:72b2', 'netmask': '64', 'enabled': '1'}], 'rxtx_cap': 0, 'dns': [None], 'gateway': '10.2.0.1'}]]| from (pid=20110) run_instance /home/tpatil/nova/nova/compute/manager.py:232 2011-06-15 16:22:14,376 DEBUG nova.utils [-] Attempting to grab semaphore "ensure_vlan" for method "ensure_vlan"... from (pid=20110) inner /home/tpatil/nova/nova/utils.py:570 2011-06-15 16:22:14,376 DEBUG nova.utils [-] Attempting to grab file lock "ensure_vlan" for method "ensure_vlan"... from (pid=20110) inner /home/tpatil/nova/nova/utils.py:575 2011-06-15 16:22:14,377 DEBUG nova.utils [-] Running cmd (subprocess): ip link show dev vlan0 from (pid=20110) execute /home/tpatil/nova/nova/utils.py:141 2011-06-15 16:22:14,384 DEBUG nova.utils [-] Attempting to grab semaphore "ensure_bridge" for method "ensure_bridge"... from (pid=20110) inner /home/tpatil/nova/nova/utils.py:570 2011-06-15 16:22:14,384 DEBUG nova.utils [-] Attempting to grab file lock "ensure_bridge" for method "ensure_bridge"... from (pid=20110) inner /home/tpatil/nova/nova/utils.py:575 2011-06-15 16:22:14,385 DEBUG nova.utils [-] Running cmd (subprocess): ip link show dev br0 from (pid=20110) execute /home/tpatil/nova/nova/utils.py:141 2011-06-15 16:22:14,392 DEBUG nova.utils [-] Running cmd (subprocess): sudo route -n from (pid=20110) execute /home/tpatil/nova/nova/utils.py:141 2011-06-15 16:22:14,384 DEBUG nova.utils [-] Attempting to grab semaphore "ensure_bridge" for method "ensure_bridge"... from (pid=20110) inner /home/tpatil/nova/nova/utils.py:570 2011-06-15 16:22:14,384 DEBUG nova.utils [-] Attempting to grab file lock "ensure_bridge" for method "ensure_bridge"... from (pid=20110) inner /home/tpatil/nova/nova/utils.py:575 2011-06-15 16:22:14,385 DEBUG nova.utils [-] Running cmd (subprocess): ip link show dev br0 from (pid=20110) execute /home/tpatil/nova/nova/utils.py:141 2011-06-15 16:22:14,392 DEBUG nova.utils [-] Running cmd (subprocess): sudo route -n from (pid=20110) execute /home/tpatil/nova/nova/utils.py:141 2011-06-15 16:22:14,403 DEBUG nova.utils [-] Running cmd (subprocess): sudo ip addr show dev vlan0 scope global from (pid=20110) execute /home/tpatil/nova/nova/utils.py:141 2011-06-15 16:22:14,414 DEBUG nova.utils [-] Running cmd (subprocess): sudo brctl addif br0 vlan0 from (pid=20110) execute /home/tpatil/nova/nova/utils.py:141 2011-06-15 16:22:14,424 DEBUG nova.utils [-] Result was 1 from (pid=20110) execute /home/tpatil/nova/nova/utils.py:159 2011-06-15 16:22:14,425 DEBUG nova.utils [-] Attempting to grab semaphore "ensure_vlan" for method "ensure_vlan"... from (pid=20110) inner /home/tpatil/nova/nova/utils.py:570 2011-06-15 16:22:14,425 DEBUG nova.utils [-] Attempting to grab file lock "ensure_vlan" for method "ensure_vlan"... from (pid=20110) inner /home/tpatil/nova/nova/utils.py:575 2011-06-15 16:22:14,426 DEBUG nova.utils [-] Running cmd (subprocess): ip link show dev vlan0 from (pid=20110) execute /home/tpatil/nova/nova/utils.py:141 2011-06-15 16:22:14,433 DEBUG nova.utils [-] Attempting to grab semaphore "ensure_bridge" for method "ensure_bridge"... from (pid=20110) inner /home/tpatil/nova/nova/utils.py:570 2011-06-15 16:22:14,433 DEBUG nova.utils [-] Attempting to grab file lock "ensure_bridge" for method "ensure_bridge"... from (pid=20110) inner /home/tpatil/nova/nova/utils.py:575 2011-06-15 16:22:14,434 DEBUG nova.utils [-] Running cmd (subprocess): ip link show dev br0 from (pid=20110) execute /home/tpatil/nova/nova/utils.py:141 2011-06-15 16:22:14,441 DEBUG nova.utils [-] Running cmd (subprocess): sudo route -n from (pid=20110) execute /home/tpatil/nova/nova/utils.py:141 2011-06-15 16:22:14,451 DEBUG nova.utils [-] Running cmd (subprocess): sudo ip addr show dev vlan0 scope global from (pid=20110) execute /home/tpatil/nova/nova/utils.py:141 2011-06-15 16:22:14,462 DEBUG nova.utils [-] Running cmd (subprocess): sudo brctl addif br0 vlan0 from (pid=20110) execute /home/tpatil/nova/nova/utils.py:141 2011-06-15 16:22:14,473 DEBUG nova.utils [-] Result was 1 from (pid=20110) execute /home/tpatil/nova/nova/utils.py:159 2011-06-15 16:22:14,782 DEBUG nova.virt.libvirt_conn [-] instance instance-00000002: starting toXML method from (pid=20110) to_xml /home/tpatil/nova/nova/virt/libvirt/connection.py:996 2011-06-15 16:22:14,434 DEBUG nova.utils [-] Running cmd (subprocess): ip link show dev br0 from (pid=20110) execute /home/tpatil/nova/nova/utils.py:141 2011-06-15 16:22:14,441 DEBUG nova.utils [-] Running cmd (subprocess): sudo route -n from (pid=20110) execute /home/tpatil/nova/nova/utils.py:141 2011-06-15 16:22:14,451 DEBUG nova.utils [-] Running cmd (subprocess): sudo ip addr show dev vlan0 scope global from (pid=20110) execute /home/tpatil/nova/nova/utils.py:141 2011-06-15 16:22:14,462 DEBUG nova.utils [-] Running cmd (subprocess): sudo brctl addif br0 vlan0 from (pid=20110) execute /home/tpatil/nova/nova/utils.py:141 2011-06-15 16:22:14,473 DEBUG nova.utils [-] Result was 1 from (pid=20110) execute /home/tpatil/nova/nova/utils.py:159 2011-06-15 16:22:14,782 DEBUG nova.virt.libvirt_conn [-] instance instance-00000002: starting toXML method from (pid=20110) to_xml /home/tpatil/nova/nova/virt/libvirt/connection.py:996 2011-06-15 16:22:14,782 ERROR nova.exception [-] Uncaught exception (nova.exception): TRACE: Traceback (most recent call last): (nova.exception): TRACE: File "/home/tpatil/nova/nova/exception.py", line 87, in _wrap (nova.exception): TRACE: return f(*args, **kw) (nova.exception): TRACE: File "/home/tpatil/nova/nova/virt/libvirt/connection.py", line 579, in spawn (nova.exception): TRACE: xml = self.to_xml(instance, False, network_info) (nova.exception): TRACE: File "/home/tpatil/nova/nova/virt/libvirt/connection.py", line 997, in to_xml (nova.exception): TRACE: xml_info = self._prepare_xml_info(instance, rescue, network_info) (nova.exception): TRACE: File "/home/tpatil/nova/nova/virt/libvirt/connection.py", line 959, in _prepare_xml_info (nova.exception): TRACE: nics.append(self._get_nic_for_xml(network, mapping)) (nova.exception): TRACE: File "/home/tpatil/nova/nova/virt/libvirt/connection.py", line 919, in _get_nic_for_xml (nova.exception): TRACE: dhcp_server = network['gateway'] (nova.exception): TRACE: KeyError: 'gateway' (nova.exception): TRACE: 2011-06-15 16:22:14,783 ERROR nova.compute.manager [-] Instance '2' failed to spawn. Is virtualization enabled in the BIOS? Details: 'gateway' (nova.compute.manager): TRACE: Traceback (most recent call last): (nova.compute.manager): TRACE: File "/home/tpatil/nova/nova/compute/manager.py", line 245, in run_instance (nova.compute.manager): TRACE: self.driver.spawn(instance, network_info) (nova.compute.manager): TRACE: File "/home/tpatil/nova/nova/exception.py", line 93, in _wrap (nova.compute.manager): TRACE: raise Error(str(e)) (nova.compute.manager): TRACE: Error: 'gateway' (nova.compute.manager): TRACE: I think gateway info is stored in the dict mapping instead of network and hence there is an error. def _get_nic_for_xml(self, network, mapping): # Assume that the gateway also acts as the dhcp server. dhcp_server = network['gateway'] gateway_v6 = network['gateway_v6'] It should be def _get_nic_for_xml(self, network, mapping): # Assume that the gateway also acts as the dhcp server. dhcp_server = mapping['gateway'] gateway_v6 = mapping['gateway_v6'] I think there are more occurrences of similar problem in the rest of the code.