ESX(i) : Incorrect machine id parameters in vmx for guest_tool.py

Bug #796834 reported by Arvind Somya on 2011-06-13
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Medium
Arvind Somya

Bug Description

The guest_tool.py script provided for vmware integration asserts an exact length of 6 on the split machine.id that provides all networking information but the length of machine.id written by vmops is only 4.
  assert len(network_info_list) % 6 == 0

  machine_id_chanfge_spec = \

            vm_util.get_machine_id_change_spec(client_factory, mac_addr,

                                        ip_addr, net_mask, gateway)

The machine.id is missing the broadcast and dns and the guest_tool.py fails everytime it tries to set the network address in the guest.

Additionally the guest_tool.py script is incompatible with python 2.6, it keeps failing with the error message:
Traceback (most recent call last):
  File "guest_tool.py", line 387, in <module>
    _linux_set_networking()
  File "guest_tool.py", line 371, in _linux_set_networking
    check_exit_code=False))
  File "guest_tool.py", line 207, in _execute
    logging.debug(_("Executing command: '%s'") % cmd)
NameError: global name '_' is not defined

The script does not support Ubuntu distributions.

Related branches

Arvind Somya (asomya) wrote :

Attaching a diff that fixes the aforementioned issues:

- Write the required 6 length machine.id to the vmx file.
- Added support for the implicit gettext translations ( _() ).
- Added support for Ubuntu distros.

Thierry Carrez (ttx) wrote :

@Arvind: any chance you could implement your fix in a branch and propose that for merging into trunk ?

Changed in nova:
importance: Undecided → Medium
status: New → Triaged
Thierry Carrez (ttx) wrote :

Thanks !

Changed in nova:
assignee: nobody → Arvind Somya (asomya)
status: Triaged → In Progress
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2011-07-26
Changed in nova:
milestone: none → diablo-3
Thierry Carrez (ttx) on 2011-09-22
Changed in nova:
milestone: diablo-3 → 2011.3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers