VM stuck in "Migrating to"

Latest response

Can't start,stop, cancel migration or migrate the VM.
It's stuck in "Migrating to" in the RHEV GUI.

Think I hit this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=922490

Anyone else had this?
How do I recover the affected VMs?

Pär Berge's picture

Responses

Does "service ovirt-engine restart" help to recover the status?

No. Already tried that. It helped for some of the VMs, but still have two that are stuck.

The two vms which are stuck, are they running on any of the hypervisors? You can log into each hypervisor and run "vdsClient -s 0 list table" to verify this.

No, they're not.

I recommend you open a case. The db need to be changed to manually to change the vm status to Down. You can also explore /usr/share/ovirt-engine/dbscripts/unlock_entity.sh script.

Yeah already have a support case. Will look into the script.
Thank you.

I think by running the following two commands on the rhevm server you will be able to bring the VM into "down"  state and then need to migrate the VM manually to the required host.

# psql -U engine -c "update vm_dynamic SET status=0 where vm_guid='xxxxxxxx';"

# psql -U engine -c "UPDATE vm_dynamic SET run_on_vds = null  WHERE vm_guid='xxxxxxxx';"

If the VM itself is in "Migrating to" state then I think "/usr/share/ovirt-engine/dbscripts/unlock_entity.sh" script will not help. I guess it will help only for the disk/snapshot/template .

To get the "vm_guid" and "status" of the VM you need to use the following commands on the rhevm system.

 

   # psql -U engine -c "select vm_guid status from vm_static where vm_name='XXXX';"

   # psql -U engine -c "select status from vm_dynamic where vm_guid='xxxx';"

Hi!

Thank you for your posting. I have the problem that a vm is in a pause status after a failed migration and nothing helps to change this over the gui. So I tried to change it with your postgres commands. And I can change the status while the engine-service ist stopped. But if I start the service again, vm_dynamic changes back on 4 (paused). So the db is not the only truth. Do you know where to search the place to find the status outside the db?

Hi Christopher!

This discussion is a few years old, so you may get better results if you post a new topic for your issue.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.