Skip to content

Commit 01502e8

Browse files
timschuminywilken
authored andcommitted
Automatically enable IOAPIC for multicore machines
1 parent 8fdfca0 commit 01502e8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

builder/virtualbox/iso/step_create_vm.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ func (s *stepCreateVM) Run(ctx context.Context, state multistep.StateBag) multis
3636
"--boot1", "disk", "--boot2", "dvd", "--boot3", "none", "--boot4", "none",
3737
})
3838
commands = append(commands, []string{"modifyvm", name, "--cpus", strconv.Itoa(config.HWConfig.CpuCount)})
39+
if config.HWConfig.CpuCount > 1 {
40+
commands = append(commands, []string{"modifyvm", name, "--ioapic", "on"})
41+
}
3942
commands = append(commands, []string{"modifyvm", name, "--memory", strconv.Itoa(config.HWConfig.MemorySize)})
4043
commands = append(commands, []string{"modifyvm", name, "--usb", map[bool]string{true: "on", false: "off"}[config.HWConfig.USB]})
4144

0 commit comments

Comments
 (0)