Unclear errors
-
Many errors don't explain the cause or lead you down the wrong path. For example:
- if enabled

vm.migrate { "vm": "a6f6d2ec-17fd-338f-16f5-cdbcfa3e23de", "mapVifsNetworks": { "c5825de5-4b88-1794-5381-b9ded8fde08b": "12612d2e-9490-185d-5056-d848db1a754f" }, "migrationNetwork": "d6492be1-f89e-e4fe-f6e0-1cbaad111581", "sr": "43daf4a2-ff01-e974-0db7-bb68765e5f73", "targetHost": "2444db2d-8701-475e-9191-c0b0417b3c51" } { "code": "OPERATION_BLOCKED", "params": [ "OpaqueRef:63424fd1-95b1-8518-9a82-faee73bbd427", "true" ], "task": { "uuid": "9120561b-99a6-6677-6e8a-cd4432410aa1", "name_label": "Async.VM.migrate_send", "name_description": "", "allowed_operations": [], "current_operations": {}, "created": "20260914T09:52:49Z", "finished": "20260914T09:52:49Z", "status": "failure", "resident_on": "OpaqueRef:e455b3a6-4d05-6d86-2f7a-c4cdba26e120", "progress": 1, "type": "<none/>", "result": "", "error_info": [ "OPERATION_BLOCKED", "OpaqueRef:63424fd1-95b1-8518-9a82-faee73bbd427", "true" ], "other_config": {}, "subtask_of": "OpaqueRef:NULL", "subtasks": [], "backtrace": "(((process xapi)(filename ocaml/xapi/xapi_vm_lifecycle.ml)(line 758))((process xapi)(filename ocaml/xapi/xapi_vm_helpers.ml)(line 1657))((process xapi)(filename fun.ml)(line 33))((process xapi)(filename fun.ml)(line 38))((process xapi)(filename ocaml/xapi/helpers.ml)(line 1825))((process xapi)(filename ocaml/xapi/xapi_vm_helpers.ml)(line 1656))((process xapi)(filename ocaml/xapi/message_forwarding.ml)(line 2654))((process xapi)(filename ocaml/xapi/rbac.ml)(line 228))((process xapi)(filename ocaml/xapi/rbac.ml)(line 238))((process xapi)(filename ocaml/xapi/server_helpers.ml)(line 78)))" }, "message": "OPERATION_BLOCKED(OpaqueRef:63424fd1-95b1-8518-9a82-faee73bbd427, true)", "name": "XapiError", "stack": "XapiError: OPERATION_BLOCKED(OpaqueRef:63424fd1-95b1-8518-9a82-faee73bbd427, true) at XapiError.wrap (file:///opt/xo/xo-builds/xen-orchestra-202609011557/packages/xen-api/_XapiError.mjs:16:12) at default (file:///opt/xo/xo-builds/xen-orchestra-202609011557/packages/xen-api/_getTaskResult.mjs:13:29) at Xapi._addRecordToCache (file:///opt/xo/xo-builds/xen-orchestra-202609011557/packages/xen-api/index.mjs:1329:24) at file:///opt/xo/xo-builds/xen-orchestra-202609011557/packages/xen-api/index.mjs:1363:14 at Array.forEach (<anonymous>) at Xapi._processEvents (file:///opt/xo/xo-builds/xen-orchestra-202609011557/packages/xen-api/index.mjs:1353:12) at Xapi._watchEvents (file:///opt/xo/xo-builds/xen-orchestra-202609011557/packages/xen-api/index.mjs:1560:14)" }- VM migration into current pool.
vm.migrate { "migrationNetwork": "d6492be1-f89e-e4fe-f6e0-1cbaad111581", "targetHost": "2444db2d-8701-475e-9191-c0b0417b3c51", "vm": "5579297f-c843-9b13-a418-864db48196b5" } { "code": "VM_BAD_POWER_STATE", "params": [ "OpaqueRef:3d062b96-e098-69c3-b77b-db727c06505f", "running", "halted" ], "task": { "uuid": "110cb10e-20c2-b315-d8b9-50cc9b2311d9", "name_label": "Async.VM.pool_migrate", "name_description": "", "allowed_operations": [], "current_operations": {}, "created": "20260910T13:23:08Z", "finished": "20260910T13:23:08Z", "status": "failure", "resident_on": "OpaqueRef:5e55d030-7245-0317-7463-174fc2c81848", "progress": 1, "type": "<none/>", "result": "", "error_info": [ "VM_BAD_POWER_STATE", "OpaqueRef:3d062b96-e098-69c3-b77b-db727c06505f", "running", "halted" ], "other_config": {}, "subtask_of": "OpaqueRef:NULL", "subtasks": [], "backtrace": "(((process xapi)(filename ocaml/xapi/xapi_vm_lifecycle.ml)(line 758))((process xapi)(filename ocaml/xapi/xapi_vm_helpers.ml)(line 1657))((process xapi)(filename fun.ml)(line 33))((process xapi)(filename fun.ml)(line 38))((process xapi)(filename ocaml/xapi/helpers.ml)(line 1825))((process xapi)(filename ocaml/xapi/xapi_vm_helpers.ml)(line 1656))((process xapi)(filename ocaml/xapi/message_forwarding.ml)(line 2519))((process xapi)(filename ocaml/xapi/rbac.ml)(line 228))((process xapi)(filename ocaml/xapi/rbac.ml)(line 238))((process xapi)(filename ocaml/xapi/server_helpers.ml)(line 78)))" }, "message": "VM_BAD_POWER_STATE(OpaqueRef:3d062b96-e098-69c3-b77b-db727c06505f, running, halted)", "name": "XapiError", "stack": "XapiError: VM_BAD_POWER_STATE(OpaqueRef:3d062b96-e098-69c3-b77b-db727c06505f, running, halted) at XapiError.wrap (file:///opt/xo/xo-builds/xen-orchestra-202609011557/packages/xen-api/_XapiError.mjs:16:12) at default (file:///opt/xo/xo-builds/xen-orchestra-202609011557/packages/xen-api/_getTaskResult.mjs:13:29) at Xapi._addRecordToCache (file:///opt/xo/xo-builds/xen-orchestra-202609011557/packages/xen-api/index.mjs:1329:24) at file:///opt/xo/xo-builds/xen-orchestra-202609011557/packages/xen-api/index.mjs:1363:14 at Array.forEach (<anonymous>) at Xapi._processEvents (file:///opt/xo/xo-builds/xen-orchestra-202609011557/packages/xen-api/index.mjs:1353:12) at Xapi._watchEvents (file:///opt/xo/xo-builds/xen-orchestra-202609011557/packages/xen-api/index.mjs:1560:14)" } - if enabled
-
Both of those are XAPI's raw error codes, and neither one tells you what to actually do about it. Annoying, I get it.
I looked up how XAPI defines them:
OPERATION_BLOCKEDmeans the operation is listed in the VM'sblocked_operationsfield, and thetrueis just the value stored there, so I think it's the Prevent migration toggle from your screenshot (described here: https://docs.xen-orchestra.com/manage-your-infrastructure/manage_infrastructure#preventing-vm-migration).For
VM_BAD_POWER_STATEthe parameters are the VM, the state XAPI expected, then the state it found, sorunning, haltedwould mean it wanted a running VM and got a halted one.
That reads like a live migration attempted on a stopped VM, though I haven't reproduced it.Turning those into "this VM has Prevent migration on" or "this VM is halted" sounds like a good one for https://feedback.vates.tech, if you feel like posting it there with these two examples.

-
i forgot how i got VM_BAD_POWER_STATE.
Probably need to choose multiple VMs from different pools and do a batch migration.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login