|
|
|
|
@ -102,6 +102,17 @@ func (s *StepConfigureVMX) Run(_ context.Context, state multistep.StateBag) mult
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the extendedConfigFile setting for the .vmxf filename to the VMName
|
|
|
|
|
// if displayName is not set. This is needed so that when VMWare creates
|
|
|
|
|
// the .vmxf file it matches the displayName if it is set. When just using
|
|
|
|
|
// the sisplayName if it was empty VMWare would make a file named ".vmxf".
|
|
|
|
|
// The ".vmxf" file would not get deleted when the VM got deleted.
|
|
|
|
|
if s.DisplayName != "" {
|
|
|
|
|
vmxData["extendedconfigfile"] = fmt.Sprintf("%s.vmxf", s.DisplayName)
|
|
|
|
|
} else {
|
|
|
|
|
vmxData["extendedconfigfile"] = fmt.Sprintf("%s.vmxf", s.VMName)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
err = WriteVMX(vmxPath, vmxData)
|
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|