qemu: set the number of cores equal to the number of reserved cores if set
This commit is contained in:
parent
1e09ca5cd7
commit
07dca26f0d
|
@ -471,9 +471,14 @@ func (d *Driver) StartTask(cfg *drivers.TaskConfig) (*drivers.TaskHandle, *drive
|
|||
args = append(args,
|
||||
"-enable-kvm",
|
||||
"-cpu", "host",
|
||||
// Do we have cores information available to the Driver?
|
||||
// "-smp", fmt.Sprintf("%d", cores),
|
||||
)
|
||||
|
||||
if cfg.Resources.LinuxResources != nil && cfg.Resources.LinuxResources.CpusetCpus != "" {
|
||||
cores := strings.Split(cfg.Resources.LinuxResources.CpusetCpus, ",")
|
||||
args = append(args,
|
||||
"-smp", fmt.Sprintf("%d", len(cores)),
|
||||
)
|
||||
}
|
||||
}
|
||||
d.logger.Debug("starting QemuVM command ", "args", strings.Join(args, " "))
|
||||
|
||||
|
|
Loading…
Reference in New Issue