mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(region): check migration bandwidth is nil (#15082)
This commit is contained in:
@@ -792,7 +792,7 @@ func (self *SKVMGuestDriver) CheckLiveMigrate(ctx context.Context, guest *models
|
||||
return httperrors.NewBadRequestError("Guest have backup, can't migrate")
|
||||
}
|
||||
if utils.IsInStringArray(guest.Status, []string{api.VM_RUNNING, api.VM_SUSPEND}) {
|
||||
if *input.MaxBandwidthMb < 50 {
|
||||
if input.MaxBandwidthMb != nil && *input.MaxBandwidthMb < 50 {
|
||||
return httperrors.NewBadRequestError("max bandwidth must gratethan 100M")
|
||||
}
|
||||
cdrom := guest.GetCdrom()
|
||||
|
||||
Reference in New Issue
Block a user