summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceOVF.py
diff options
context:
space:
mode:
authorSankar Tanguturi <stanguturi@vmware.com>2018-02-13 13:00:53 -0800
committerScott Moser <smoser@ubuntu.com>2018-02-21 20:57:00 -0500
commit3814d559c3e973238d819721605c7451e852fe63 (patch)
tree2e5a815e84abc0bad12130bb3d59a12b76a3b6d0 /cloudinit/sources/DataSourceOVF.py
parentb7497e807fa12a26d4a12aaf1ee9302a4fd24728 (diff)
downloadvyos-cloud-init-3814d559c3e973238d819721605c7451e852fe63.tar.gz
vyos-cloud-init-3814d559c3e973238d819721605c7451e852fe63.zip
OVF: Fix VMware support for 64-bit platforms.
On few 64-bit platforms, the open-vm-tools package is installed at /usr/lib64/. The DataSourceOVF is changed to search look there for the 'customization plugin'
Diffstat (limited to 'cloudinit/sources/DataSourceOVF.py')
-rw-r--r--cloudinit/sources/DataSourceOVF.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/cloudinit/sources/DataSourceOVF.py b/cloudinit/sources/DataSourceOVF.py
index 6e62f984..dc914a72 100644
--- a/cloudinit/sources/DataSourceOVF.py
+++ b/cloudinit/sources/DataSourceOVF.py
@@ -95,11 +95,20 @@ class DataSourceOVF(sources.DataSource):
"VMware Customization support")
elif not util.get_cfg_option_bool(
self.sys_cfg, "disable_vmware_customization", True):
- deployPkgPluginPath = search_file("/usr/lib/vmware-tools",
- "libdeployPkgPlugin.so")
- if not deployPkgPluginPath:
- deployPkgPluginPath = search_file("/usr/lib/open-vm-tools",
- "libdeployPkgPlugin.so")
+
+ search_paths = (
+ "/usr/lib/vmware-tools", "/usr/lib64/vmware-tools",
+ "/usr/lib/open-vm-tools", "/usr/lib64/open-vm-tools")
+
+ plugin = "libdeployPkgPlugin.so"
+ deployPkgPluginPath = None
+ for path in search_paths:
+ deployPkgPluginPath = search_file(path, plugin)
+ if deployPkgPluginPath:
+ LOG.debug("Found the customization plugin at %s",
+ deployPkgPluginPath)
+ break
+
if deployPkgPluginPath:
# When the VM is powered on, the "VMware Tools" daemon
# copies the customization specification file to
@@ -111,6 +120,8 @@ class DataSourceOVF(sources.DataSource):
msg="waiting for configuration file",
func=wait_for_imc_cfg_file,
args=("cust.cfg", max_wait))
+ else:
+ LOG.debug("Did not find the customization plugin.")
if vmwareImcConfigFilePath:
LOG.debug("Found VMware Customization Config File at %s",