diff --git a/pkg/compute/models/guests.go b/pkg/compute/models/guests.go index bdb6b6afeb..f1eda97f1f 100644 --- a/pkg/compute/models/guests.go +++ b/pkg/compute/models/guests.go @@ -798,9 +798,11 @@ func (self *SGuest) ValidateUpdateData(ctx context.Context, userCred mcclient.To return nil, err } - err = self.checkUpdateQuota(ctx, userCred, vcpuCount, vmemSize) - if err != nil { - return nil, httperrors.NewOutOfQuotaError(err.Error()) + if vcpuCount > 0 || vmemSize > 0 { + err = self.checkUpdateQuota(ctx, userCred, vcpuCount, vmemSize) + if err != nil { + return nil, httperrors.NewOutOfQuotaError(err.Error()) + } } if data.Contains("name") {