Formatting fix.

This commit is contained in:
Thomas Dreibholz 2021-02-20 20:31:09 +01:00
parent 8226bc9d9f
commit 2b35873dd9
No known key found for this signature in database
GPG Key ID: 5CD5D12AA0877B49
2 changed files with 11 additions and 11 deletions

View File

@ -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(

View File

@ -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...")