mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
guest add metadata cpu mode
- live migrate if guest cpu mode is qemu, do not check host cpu mode - disk name generation replace '_' to '-'
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
package guest
|
||||
|
||||
import (
|
||||
"yunion.io/x/onecloud/pkg/apis/compute"
|
||||
"yunion.io/x/onecloud/pkg/scheduler/algorithm/predicates"
|
||||
"yunion.io/x/onecloud/pkg/scheduler/core"
|
||||
)
|
||||
@@ -45,7 +46,7 @@ func (p *MigratePredicate) Execute(u *core.Unit, c core.Candidater) (bool, []cor
|
||||
return h.GetResult()
|
||||
}
|
||||
|
||||
if schedData.LiveMigrate {
|
||||
if schedData.LiveMigrate && schedData.CpuMode != compute.CPU_MODE_QEMU {
|
||||
host := c.Getter().Host()
|
||||
if schedData.CpuDesc != host.CpuDesc {
|
||||
h.Exclude(predicates.ErrHostCpuModelIsNotMatchForLiveMigrate)
|
||||
|
||||
Reference in New Issue
Block a user