mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
fix(host): add check mem dev is null on guest setup (#22847)
This commit is contained in:
@@ -3015,7 +3015,7 @@ func (s *SKVMGuestInstance) startHotPlugVcpus(vcpuSet []int) error {
|
||||
|
||||
func (s *SKVMGuestInstance) hotPlugCpus() error {
|
||||
var vcpuSet = make([]int, 0)
|
||||
if len(s.Desc.MemDesc.Mem.Mems) > 0 {
|
||||
if s.Desc.MemDesc.Mem != nil && len(s.Desc.MemDesc.Mem.Mems) > 0 {
|
||||
for i := range s.Desc.CpuNumaPin {
|
||||
for j := range s.Desc.CpuNumaPin[i].VcpuPin {
|
||||
vcpuSet = append(vcpuSet, s.Desc.CpuNumaPin[i].VcpuPin[j].Vcpu)
|
||||
|
||||
Reference in New Issue
Block a user