mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-27 02:04:01 -04:00
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user