[vmware driver] VM deployment failed on non-vmware distributed virtual switch

Bug #1416961 reported by Feng Xi Yan
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Low
Unassigned

Bug Description

We are using a Cisco Nexus 1000v DVS, which is not a normal VMWare Distributed Virtual Switch

And we got following error when deploying a VM:

Error from last host: lnxau2106pfsp0012.infau.wbcau.westpac.com.au (node domain-c3459(WSDC00ENPR01)): ['Traceback (most recent call last):',
' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1340, in _build_instance
    set_access_ip=set_access_ip)',
' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 401, in decorated_function
    return function(self, context, *args, **kwargs)',
' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1779, in _spawn
    LOG.exception(_('Instance failed to spawn'), instance=instance)',
' File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__
    six.reraise(self.type_, self.value, self.tb)',
' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1765, in _spawn
    block_device_info)',
' File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/driver.py", line 854, in spawn
    admin_password, network_info, block_device_info)',
' File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/vmops.py", line 268, in spawn
    power_on)',
' File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/template.py", line 463, in spawn_from_template
    data_store_ref, res_pool_ref, template_ref, instance['uuid'])',
' File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/template.py", line 372, in execute_clone_vm
    e, instance=instance)',
' File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 68, in __exit__
    six.reraise(self.type_, self.value, self.tb)',
' File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/template.py", line 368, in execute_clone_vm
    res_pool_ref, template_ref, config_spec)',
' File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/template.py", line 275, in _clonevm
    storageSpec=storage_spec)',
' File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/driver.py", line 1160, in _call_method
    raise error_util.get_fault_class(fault)(str(excep))',
'VMwareDriverException:
Required property switchUuid is missing from data object of type DistributedVirtualSwitchPortConnection

Reason:
The reason is that Cisco Nexus 1000v DVS' type is(Managed Object:DistributedVirtualSwitch ) , which is not a normal VMWare Distributed Virtual Switch(Managed Object:VmwareDistributedVirtualSwitch ).
But the vmware driver is try to fetch the uuid based on type (Managed Object:VmwareDistributedVirtualSwitch ).
dvs_props = session._call_method(vim_util,
                                "get_dynamic_property",
                                props.distributedVirtualSwitch,
                                "VmwareDistributedVirtualSwitch", "uuid")

This code only works on normal vmware dvs, but not works on other types.

Tags: vmware
Revision history for this message
Feng Xi Yan (yanfengxi) wrote :

This was found in icehouse, and surely same situation in juno, kilo.

I will make a change in icehouse, and upstream to juno and kilo.

Revision history for this message
Feng Xi Yan (yanfengxi) wrote :

From the vmware sdk, we got following messages:

A DistributedVirtualSwitch is the base distributed switch implementation. It supports a VMWare distributed virtual switch and it supports third party switch implementations.

A VmwareDistributedVirtualSwitch is a sub-type of DistributedVirtualSwitch, and only supports a VMWare distributed virtual switch.

Feng Xi Yan (yanfengxi)
affects: ubuntukylin → nova
Changed in nova:
status: New → Confirmed
importance: Undecided → Low
Changed in nova:
assignee: nobody → Feng Xi Yan (yanfengxi)
status: Confirmed → In Progress
Revision history for this message
Feng Xi Yan (yanfengxi) wrote :
tags: added: vmware
Changed in nova:
assignee: Feng Xi Yan (yanfengxi) → Davanum Srinivas (DIMS) (dims-v)
Changed in nova:
assignee: Davanum Srinivas (DIMS) (dims-v) → Feng Xi Yan (yanfengxi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Feng Xi Yan (<email address hidden>) on branch: master
Review: https://review.openstack.org/152006

Changed in nova:
assignee: Feng Xi Yan (yanfengxi) → nobody
status: In Progress → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.