open-vm-tools 2:10.2.0-3~ubuntu0.16.04.1 customization doesn't work with predictable network interface names

Bug #1782451 reported by Thomas Insel
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
open-vm-tools (Ubuntu)
New
Undecided
Unassigned

Bug Description

When I use terraform to clone an Ubuntu 16.04.4 LTS template in (with open-vm-tools 2:10.2.0-3~ubuntu0.16.04.1 installed), the network interface isn't configured, and toolsDeployPkg.log includes:

    DEBUG: Command: '/sbin/ifconfig eth0 2> /dev/null'
    DEBUG: Result:
    DEBUG: Exit Code: 256

But, our network interface is really ens192. So, I tried disabling predictable network interface names in the template by setting

    GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0 biosdevname=0"

in /etc/default/grub, and then everything worked.

Also, an otherwise identical template with open-vm-tools 2:10.0.7-3227872-2ubuntu1 has no issues configuring the network interface.

Versions:

root@tom-newtest-2:~# lsb_release -rd
Description: Ubuntu 16.04.4 LTS
Release: 16.04

root@tom-newtest-2:~# apt-cache policy open-vm-tools
open-vm-tools:
  Installed: 2:10.2.0-3~ubuntu0.16.04.1
  Candidate: 2:10.2.0-3~ubuntu0.16.04.1
  Version table:
 *** 2:10.2.0-3~ubuntu0.16.04.1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2:10.0.7-3227872-2ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

VMware ESXi, 6.5.0, 7526125

Revision history for this message
Thomas Insel (tinsel) wrote :
Revision history for this message
Thomas Insel (tinsel) wrote :

FYI, I looked into VMware's Customization.pm file and their comment says that says they run "/sbin/ifconfig eth0 2> /dev/null" to "wake up" the interface, so whatever's going wrong isn't as simple as a hardcoded network interface address in VMware code.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Thomas,
the Customization.pm seems to be from terraform or some other of your tooling right?
The build log [1] doesn' tmention that file in any package out of open-vm-tools.

I didn't find the "ifconfig eth0" you refer to in [2] despit an issue referring to it.

In fact I found several upstream bugs against open-vm-tools about this, but they are all concluding with some help/suggestion but there never is a fix as the problem lies in vSphere Customization scripts and not open-vm-tools.
See [4] and [5] for these.

That said it is interesting that you say it only appears with the newer version of open-vm-tools.
Do the network devices have "eth0" names with the older version of the tools?

I'm subscribing Oliver who is active on open-vm-tools upstream to share his thoughts as well.

[1]: https://launchpadlibrarian.net/369386584/buildlog_ubuntu-xenial-amd64.open-vm-tools_2%3A10.2.0-3~ubuntu0.16.04.1_BUILDING.txt.gz
[2]: https://github.com/terraform-providers/terraform-provider-vsphere
[3]: https://github.com/terraform-providers/terraform-provider-vsphere/issues/228
[4]: https://github.com/vmware/open-vm-tools/issues/172
[5]: https://github.com/vmware/open-vm-tools/issues/130

Revision history for this message
Thomas Insel (tinsel) wrote :

Thanks for your response, Christian,

I wasn't very clear in my followup above, but it turns out the Customization.pm comes from vCenter. I would therefore be tempted to say the this behavior is VMware's fault, except that:

* the explicit eth0 reference turns out the harmless -- ifconfig eth0 is run, but its results aren't actually used

* the behavior varies with the version of open-vm-tools

* the contents of the customization files are the same in both situations, since they are built into vCenter

It's definitely not clear to me if this is an Ubuntu issue, an upstream issue, or a VMware issue.

Also, yes, 2:10.0.7-3227872-2ubuntu1 works fine with network interface ens192, but 2:10.2.0-3~ubuntu0.16.04.1 only works with eth0

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

"It's definitely not clear to me if this is an Ubuntu issue, an upstream issue, or a VMware issue."

I agree Thomas, which is why I subscribed Oliver as he is part of 2/3 entities (open-vm-tools & vmware). If he can explain why/where it is broken I'll be able to carry a fix in Ubuntu then if needed.

Revision history for this message
Oliver Kurth (okurth-1) wrote :

Sorry, I was on a vacation, so didn't notice this earlier. I informed Peter from the guest customization team.

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.