Formatting fix.
This commit is contained in:
parent
8226bc9d9f
commit
2b35873dd9
|
@ -224,7 +224,7 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, []string, error) {
|
|||
b.config.NICType = "82540EM"
|
||||
}
|
||||
switch b.config.NICType {
|
||||
case "82540EM", "82543GC", "82545EM", "Am79C970A", "Am79C973", "Am79C960", "virtio":
|
||||
case "82540EM", "82543GC", "82545EM", "Am79C970A", "Am79C973", "Am79C960", "virtio":
|
||||
// do nothing
|
||||
default:
|
||||
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" {
|
||||
commands[5] = []string{"modifyvm", name, "--audio", config.HWConfig.Sound,
|
||||
"--audiocontroller", config.AudioController}
|
||||
"--audiocontroller", config.AudioController}
|
||||
} else {
|
||||
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[7] = []string{"modifyvm", name, "--firmware", config.Firmware}
|
||||
// Set the configured NIC type for all 8 possible NICs
|
||||
commands[8] = []string{"modifyvm", name,
|
||||
"--nictype1", config.NICType,
|
||||
"--nictype2", config.NICType,
|
||||
"--nictype3", config.NICType,
|
||||
"--nictype4", config.NICType,
|
||||
"--nictype5", config.NICType,
|
||||
"--nictype6", config.NICType,
|
||||
"--nictype7", config.NICType,
|
||||
"--nictype8", config.NICType}
|
||||
"--nictype1", config.NICType,
|
||||
"--nictype2", config.NICType,
|
||||
"--nictype3", config.NICType,
|
||||
"--nictype4", config.NICType,
|
||||
"--nictype5", config.NICType,
|
||||
"--nictype6", config.NICType,
|
||||
"--nictype7", config.NICType,
|
||||
"--nictype8", config.NICType}
|
||||
commands[9] = []string{"modifyvm", name, "--graphicscontroller", config.GfxController}
|
||||
|
||||
ui.Say("Creating virtual machine...")
|
||||
|
|
Loading…
Reference in New Issue