mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(host): fix machine type before generate cpu desc
Signed-off-by: wanyaoqi <d3lx.yq@gmail.com>
This commit is contained in:
@@ -789,13 +789,13 @@ func (s *SKVMGuestInstance) gpusHasVga() bool {
|
||||
|
||||
func (s *SKVMGuestInstance) initCpuDesc(cpuMax uint) error {
|
||||
var err error
|
||||
s.fixGuestMachineType()
|
||||
if cpuMax == 0 {
|
||||
cpuMax, err = s.CpuMax()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
s.fixGuestMachineType()
|
||||
cpuDesc, err := s.archMan.GenerateCpuDesc(uint(s.Desc.Cpu), cpuMax, s)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user