summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceOVF.py
diff options
context:
space:
mode:
authorSankar Tanguturi <stanguturi@stanguturi-rhel>2016-03-20 19:49:53 -0700
committerSankar Tanguturi <stanguturi@stanguturi-rhel>2016-03-20 19:49:53 -0700
commit0f187dd7035ac724912ea5c877f6bff1bea6fe57 (patch)
tree5420f96c2a65d5844f2b45cf5346fc8c96573d3a /cloudinit/sources/DataSourceOVF.py
parentf1f0619010ec59b0ad2641e6d2faf0ae2ce8a09f (diff)
downloadvyos-cloud-init-0f187dd7035ac724912ea5c877f6bff1bea6fe57.tar.gz
vyos-cloud-init-0f187dd7035ac724912ea5c877f6bff1bea6fe57.zip
Misc fixes for VMware Support.
- Modified the code to look for customization specification file in /var/run/vmware-imc/ directory instead of /tmp - Fixed the 'seed file' issue. There was a regression in DataSourceOVF.py file. Fixed it.
Diffstat (limited to 'cloudinit/sources/DataSourceOVF.py')
-rw-r--r--cloudinit/sources/DataSourceOVF.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/cloudinit/sources/DataSourceOVF.py b/cloudinit/sources/DataSourceOVF.py
index 5734d233..fc12cbb4 100644
--- a/cloudinit/sources/DataSourceOVF.py
+++ b/cloudinit/sources/DataSourceOVF.py
@@ -75,7 +75,14 @@ class DataSourceOVF(sources.DataSource):
system_type = util.read_dmi_data("system-product-name")
if system_type is None:
LOG.debug("No system-product-name found")
- elif 'vmware' in system_type.lower():
+
+ if seedfile:
+ # Found a seed dir
+ seed = os.path.join(self.paths.seed_dir, seedfile)
+ (md, ud, cfg) = read_ovf_environment(contents)
+ self.environment = contents
+ found.append(seed)
+ elif system_type and 'vmware' in system_type.lower():
LOG.debug("VMware Virtualization Platform found")
if not util.get_cfg_option_bool(
self.sys_cfg, "disable_vmware_customization", True):
@@ -88,7 +95,8 @@ class DataSourceOVF(sources.DataSource):
vmwareImcConfigFilePath = util.log_time(
logfunc=LOG.debug,
msg="waiting for configuration file",
- func=wait_for_imc_cfg_file, args=("/tmp", "cust.cfg"))
+ func=wait_for_imc_cfg_file,
+ args=("/var/run/vmware-imc", "cust.cfg"))
if vmwareImcConfigFilePath:
LOG.debug("Found VMware DeployPkg Config File at %s" %
@@ -134,12 +142,6 @@ class DataSourceOVF(sources.DataSource):
set_customization_status(
GuestCustStateEnum.GUESTCUST_STATE_DONE,
GuestCustErrorEnum.GUESTCUST_ERROR_SUCCESS)
- elif seedfile:
- # Found a seed dir
- seed = os.path.join(self.paths.seed_dir, seedfile)
- (md, ud, cfg) = read_ovf_environment(contents)
- self.environment = contents
- found.append(seed)
else:
np = {'iso': transport_iso9660,
'vmware-guestd': transport_vmware_guestd, }