applied fmt
This commit is contained in:
parent
7152732597
commit
31622b50ac
|
@ -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.
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue