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:
parent
eb0445ca96
commit
aefe41a44a
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue