diff --git a/pkg/compute/models/guests.go b/pkg/compute/models/guests.go index 2a4a790d5d1..6f83a854dbc 100644 --- a/pkg/compute/models/guests.go +++ b/pkg/compute/models/guests.go @@ -5553,6 +5553,9 @@ func (manager *SGuestManager) CleanPendingDeleteServers(ctx context.Context, use if len(guests[i].GetExternalId()) > 0 { iVm, err := guests[i].GetIVM(ctx) if err == nil && iVm.GetStatus() == api.VM_RUNNING { + if guests[i].Status != api.VM_DELETE_FAIL { + guests[i].SetStatus(userCred, api.VM_DELETE_FAIL, "vm status is running") + } continue } }