VMware VC Driver does not honor hw_vif_model from glance
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Critical
|
Yaguang Tang | ||
Grizzly |
Fix Released
|
Critical
|
Yaguang Tang |
Bug Description
Running nova 2013.1 from ubuntu packages...
In grizzly we have the ability to set glance metadata for an image but the VC driver does not honor hw_vif_model.
See http://
example:
# glance image-update \
--property hw_disk_bus=ide \
--property hw_cdrom_bus=ide \
--property hw_vif_model=e1000 \
f16-x86_
Created an image in glance and set hw_vif_model=e1000.
glance image-show 0545467e-
+------
| Property | Value |
+------
| Property 'hw_vif_model' | e1000 |
| Property 'hypervisor_type' | vmware |
| Property 'vmware_
| Property 'vmware_disktype' | preallocated |
| Property 'vmware_ostype' | ubuntu64Guest |
| checksum | 6a8dfdd18bb2d6d
| container_format | ovf |
| created_at | 2013-05-09T00:41:47 |
| deleted | False |
| disk_format | vmdk |
| id | 0545467e-
| is_public | False |
| min_disk | 0 |
| min_ram | 0 |
| name | ESXi5.0 |
| owner | 26af345b8c5b4cf
| protected | False |
| size | 17179869184 |
| status | active |
| updated_at | 2013-05-16T21:02:02 |
+------
Deploy an instance of this image and set nova-compute to debug.
In nova-compute.log:
, {u'instance_uuid': u'72
58c294-
e', u'deleted_at': None, u'id': 18692}, {u'instance_uuid': u'7258c294-
We can see that the metadata is passed to nova-compute as expected.
Looking on ESX host that the instance gets deployed on, the Adapter Type is always set to Flexible.
Changed in nova: | |
status: | New → Confirmed |
Changed in nova: | |
importance: | Undecided → High |
importance: | High → Critical |
Changed in nova: | |
milestone: | none → havana-2 |
tags: | added: grizzly-backport-potential |
Changed in nova: | |
status: | Fix Committed → Fix Released |
tags: | removed: grizzly-backport-potential in-stable-grizzly |
Changed in nova: | |
milestone: | havana-2 → 2013.2 |
Looking at the code for the vmware driver, I think the issue is in the way the VirtualMachineC onfigSpec is created.
The networking part of the spec only creates a "VirtualPCNet32" type network adapter and does not look at the adapter type configuration in this case the "e1000" type. So this means every time a VM is created on an ESXi it will be done with the nic of type "VirtualPCNet32"
https:/ /github. com/openstack/ nova/blob/ master/ nova/virt/ vmwareapi/ vm_util. py#L121 - method responsible for creating the network related spec
https:/ /github. com/openstack/ nova/blob/ master/ nova/virt/ vmwareapi/ vm_util. py#L130 - Code that always create the "VirtualPCNet32" type of adapter.
Can you confirm if for the VMs created on the ESXi they all have the adapter type set as "VirtualPCNet32" for the NIC?