mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
runtime: DefaultMaxVCPUs should not greater than defaultMaxQemuVCPUs
DefaultMaxVCPUs may be larger than the defaultMaxQemuVCPUs that should be checked and avoided. Fixes: #2809 Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
This commit is contained in:
parent
c59c36732b
commit
43b13a4a6d
@ -567,7 +567,7 @@ func (conf *HypervisorConfig) valid() error {
|
||||
conf.BlockDeviceDriver = config.VirtioBlockCCW
|
||||
}
|
||||
|
||||
if conf.DefaultMaxVCPUs == 0 {
|
||||
if conf.DefaultMaxVCPUs == 0 || conf.DefaultMaxVCPUs > defaultMaxQemuVCPUs {
|
||||
conf.DefaultMaxVCPUs = defaultMaxQemuVCPUs
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user