mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: vmware change config with cpu sockets (#19375)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
@@ -782,8 +782,7 @@ type ServerChangeConfigInput struct {
|
||||
// cpu卡槽数
|
||||
// vmware 若开机调整配置时,需要保证调整前及调整后 vcpu_count / cpu_sockets 保持不变
|
||||
// vmware开机调整配置同样需要注意 https://kb.vmware.com/s/article/2008405
|
||||
// swagger: ignore
|
||||
// CpuSockets *int `json:"cpu_sockets"`
|
||||
CpuSockets *int `json:"cpu_sockets"`
|
||||
|
||||
// cpu大小
|
||||
VcpuCount *int `json:"vcpu_count"`
|
||||
|
||||
@@ -869,6 +869,10 @@ func (esxi *SESXiGuestDriver) ValidateGuestChangeConfigInput(ctx context.Context
|
||||
return nil, errors.Wrap(err, "SBaseGuestDriver.ValidateGuestChangeConfigInput")
|
||||
}
|
||||
|
||||
if input.CpuSockets != nil && *input.CpuSockets > 0 {
|
||||
confs.CpuSockets = *input.CpuSockets
|
||||
}
|
||||
|
||||
defaultStorageId := ""
|
||||
if root, _ := guest.GetSystemDisk(); root != nil {
|
||||
defaultStorageId = root.StorageId
|
||||
|
||||
Reference in New Issue
Block a user