From 9fee6de54c3f103a1a6bf621b460148b28d8ed66 Mon Sep 17 00:00:00 2001 From: Luther Monson Date: Thu, 14 Nov 2019 10:31:28 -0700 Subject: [PATCH] dropping iso gating logic --- drivers/vmwarevsphere/cloudinit.go | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/drivers/vmwarevsphere/cloudinit.go b/drivers/vmwarevsphere/cloudinit.go index 0f864066c4..7058d5a602 100644 --- a/drivers/vmwarevsphere/cloudinit.go +++ b/drivers/vmwarevsphere/cloudinit.go @@ -26,28 +26,21 @@ func (d *Driver) cloudInit(vm *object.VirtualMachine) error { return d.cloudInitGuestInfo(vm) } - if d.CloudConfig == "" { - if err := d.createCloudInitIso(); err != nil { - return err - } - - ds, err := d.getVmDatastore(vm) - if err != nil { - return err - } + if err := d.createCloudInitIso(); err != nil { + return err + } - err = d.uploadCloudInitIso(vm, d.datacenter, ds) - if err != nil { - return err - } + ds, err := d.getVmDatastore(vm) + if err != nil { + return err + } - err = d.mountCloudInitIso(vm, d.datacenter, ds) - if err != nil { - return err - } + err = d.uploadCloudInitIso(vm, d.datacenter, ds) + if err != nil { + return err } - return nil + return d.mountCloudInitIso(vm, d.datacenter, ds) } func (d *Driver) cloudInitGuestInfo(vm *object.VirtualMachine) error {