diff --git a/builder/hyperv/common/config.go b/builder/hyperv/common/config.go index 1cba3e393..142d399ef 100644 --- a/builder/hyperv/common/config.go +++ b/builder/hyperv/common/config.go @@ -150,7 +150,7 @@ type CommonConfig struct { Headless bool `mapstructure:"headless" required:"false"` // Over time the Hyper-V builder has been modified to change the original // boot order that is used when an ISO is mounted. Hyper-V's default is to - // boot from the CD first, the original Hyper-V builder included code to + // boot from the CD first, the original Hyper-V builder included code to // codify this setting when the primary ISO is mounted, that code was eventually // modified to place the IDE adapter before the the CD (only in generation 1). // Setting this value to true, forces the original method of operation. diff --git a/builder/hyperv/common/step_mount_dvddrive.go b/builder/hyperv/common/step_mount_dvddrive.go index 1efb4eeaa..777a288b6 100644 --- a/builder/hyperv/common/step_mount_dvddrive.go +++ b/builder/hyperv/common/step_mount_dvddrive.go @@ -12,7 +12,7 @@ import ( ) type StepMountDvdDrive struct { - Generation uint + Generation uint LegacyGen1BootOrder bool } @@ -58,7 +58,7 @@ func (s *StepMountDvdDrive) Run(ctx context.Context, state multistep.StateBag) m state.Put("os.dvd.properties", dvdControllerProperties) - if ((s.Generation == 1) && (!s.LegacyGen1BootOrder)) { + if (s.Generation == 1) && (!s.LegacyGen1BootOrder) { ui.Say("Setting boot drive to IDE and then CD drive. Use legacy_gen1_boot_order to override.") } else { ui.Say(fmt.Sprintf("Setting boot drive to os dvd drive %s ...", isoPath)) diff --git a/common/powershell/hyperv/hyperv.go b/common/powershell/hyperv/hyperv.go index 6aa8726c0..a60322bdf 100644 --- a/common/powershell/hyperv/hyperv.go +++ b/common/powershell/hyperv/hyperv.go @@ -160,7 +160,7 @@ func SetBootDvdDrive(vmName string, controllerNumber uint, controllerLocation ui if generation < 2 { var script string - if (legacyGen1BootOrder) { + if legacyGen1BootOrder { script = ` param([string]$vmName) Hyper-V\Set-VMBios -VMName $vmName -StartupOrder @("CD","IDE","LegacyNetworkAdapter","Floppy")