Fixed an issue with the previous commit so that when the user does not specify the cdrom_adapter_type to fallback to the original decision made by the disk adapter type selection.

This commit is contained in:
Ali Rizvi-Santiago
2018-02-02 19:18:50 -06:00
parent eb0445ca96
commit aefe41a44a
+3 -1
View File
@@ -428,7 +428,9 @@ func (s *stepCreateVMX) Run(_ context.Context, state multistep.StateBag) multist
// cdrom adapter type are the same, then ensure that the cdrom is the
// slave device on whatever bus the disk adapter is on.
cdromAdapterType := strings.ToLower(config.CdromAdapterType)
if cdromAdapterType == diskAdapterType {
if cdromAdapterType == "" {
cdromAdapterType = templateData.CDROMType
} else if cdromAdapterType == diskAdapterType {
templateData.CDROMType_MasterSlave = "1"
} else {
templateData.CDROMType_MasterSlave = "0"