Formatting fix.

pull/10671/head
Thomas Dreibholz 5 years ago
parent 8226bc9d9f
commit 2b35873dd9
No known key found for this signature in database
GPG Key ID: 5CD5D12AA0877B49

@ -224,7 +224,7 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, []string, error) {
b.config.NICType = "82540EM" b.config.NICType = "82540EM"
} }
switch b.config.NICType { switch b.config.NICType {
case "82540EM", "82543GC", "82545EM", "Am79C970A", "Am79C973", "Am79C960", "virtio": case "82540EM", "82543GC", "82545EM", "Am79C970A", "Am79C973", "Am79C960", "virtio":
// do nothing // do nothing
default: default:
errs = packersdk.MultiErrorAppend( errs = packersdk.MultiErrorAppend(

@ -41,24 +41,24 @@ func (s *stepCreateVM) Run(ctx context.Context, state multistep.StateBag) multis
if strings.ToLower(config.HWConfig.Sound) == "none" { if strings.ToLower(config.HWConfig.Sound) == "none" {
commands[5] = []string{"modifyvm", name, "--audio", config.HWConfig.Sound, commands[5] = []string{"modifyvm", name, "--audio", config.HWConfig.Sound,
"--audiocontroller", config.AudioController} "--audiocontroller", config.AudioController}
} else { } else {
commands[5] = []string{"modifyvm", name, "--audio", config.HWConfig.Sound, "--audioin", "on", "--audioout", "on", commands[5] = []string{"modifyvm", name, "--audio", config.HWConfig.Sound, "--audioin", "on", "--audioout", "on",
"--audiocontroller", config.AudioController} "--audiocontroller", config.AudioController}
} }
commands[6] = []string{"modifyvm", name, "--chipset", config.Chipset} commands[6] = []string{"modifyvm", name, "--chipset", config.Chipset}
commands[7] = []string{"modifyvm", name, "--firmware", config.Firmware} commands[7] = []string{"modifyvm", name, "--firmware", config.Firmware}
// Set the configured NIC type for all 8 possible NICs // Set the configured NIC type for all 8 possible NICs
commands[8] = []string{"modifyvm", name, commands[8] = []string{"modifyvm", name,
"--nictype1", config.NICType, "--nictype1", config.NICType,
"--nictype2", config.NICType, "--nictype2", config.NICType,
"--nictype3", config.NICType, "--nictype3", config.NICType,
"--nictype4", config.NICType, "--nictype4", config.NICType,
"--nictype5", config.NICType, "--nictype5", config.NICType,
"--nictype6", config.NICType, "--nictype6", config.NICType,
"--nictype7", config.NICType, "--nictype7", config.NICType,
"--nictype8", config.NICType} "--nictype8", config.NICType}
commands[9] = []string{"modifyvm", name, "--graphicscontroller", config.GfxController} commands[9] = []string{"modifyvm", name, "--graphicscontroller", config.GfxController}
ui.Say("Creating virtual machine...") ui.Say("Creating virtual machine...")

Loading…
Cancel
Save