vatesfr / xen-orchestra

The global orchestration solution to manage and backup XCP-ng and XenServer.
https://xen-orchestra.com
Other
795 stars 265 forks source link

Ejected iso during VM shutdown, now stuck in halted state #5829

Closed CranialRelics closed 3 years ago

CranialRelics commented 3 years ago

Windows VM was rebooting when I hit eject to remove the disc/iso. Now VM says it is halted/paused and cannot be resumed.

Logs:

vm.stop
{
  "id": "ddf17417-f2de-e38d-703c-b38fbb5f610e",
  "force": true
}
{
  "code": "INTERNAL_ERROR",
  "params": [
    "VM not in expected power state after completing operation",
    "OpaqueRef:557d3cba-bd0b-4d39-a652-12dc17588aca",
    "halted",
    "paused"
  ],
  "task": {
    "uuid": "5815bbbd-39c5-ba63-8c6f-ddad7cf17557",
    "name_label": "Async.VM.hard_shutdown",
    "name_description": "",
    "allowed_operations": [],
    "current_operations": {},
    "created": "20210628T11:25:34Z",
    "finished": "20210628T11:25:35Z",
    "status": "failure",
    "resident_on": "OpaqueRef:349deadd-d257-4474-a9ee-405bc1a9e63e",
    "progress": 1,
    "type": "<none/>",
    "result": "",
    "error_info": [
      "INTERNAL_ERROR",
      "VM not in expected power state after completing operation",
      "OpaqueRef:557d3cba-bd0b-4d39-a652-12dc17588aca",
      "halted",
      "paused"
    ],
    "other_config": {
      "debug_info:cancel_points_seen": "11"
    },
    "subtask_of": "OpaqueRef:NULL",
    "subtasks": [],
    "backtrace": "(((process xapi)(filename ocaml/xapi-client/client.ml)(line 7))((process xapi)(filename ocaml/xapi-client/client.ml)(line 19))((process xapi)(filename ocaml/xapi-client/client.ml)(line 6089))((process xapi)(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 24))((process xapi)(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 35))((process xapi)(filename ocaml/xapi/message_forwarding.ml)(line 131))((process xapi)(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 24))((process xapi)(filename ocaml/xapi/rbac.ml)(line 231))((process xapi)(filename ocaml/xapi/server_helpers.ml)(line 103)))"
  },
  "message": "INTERNAL_ERROR(VM not in expected power state after completing operation, OpaqueRef:557d3cba-bd0b-4d39-a652-12dc17588aca, halted, paused)",
  "name": "XapiError",
  "stack": "XapiError: INTERNAL_ERROR(VM not in expected power state after completing operation, OpaqueRef:557d3cba-bd0b-4d39-a652-12dc17588aca, halted, paused)
    at Function.wrap (/opt/xo/xo-builds/xen-orchestra-202106120305/packages/xen-api/src/_XapiError.js:16:12)
    at _default (/opt/xo/xo-builds/xen-orchestra-202106120305/packages/xen-api/src/_getTaskResult.js:11:29)
    at Xapi._addRecordToCache (/opt/xo/xo-builds/xen-orchestra-202106120305/packages/xen-api/src/index.js:853:24)
    at forEach (/opt/xo/xo-builds/xen-orchestra-202106120305/packages/xen-api/src/index.js:874:14)
    at Array.forEach (<anonymous>)
    at Xapi._processEvents (/opt/xo/xo-builds/xen-orchestra-202106120305/packages/xen-api/src/index.js:864:12)
    at Xapi._watchEvents (/opt/xo/xo-builds/xen-orchestra-202106120305/packages/xen-api/src/index.js:1029:14)"
}

=============================================================================

vm.start
{
  "id": "ddf17417-f2de-e38d-703c-b38fbb5f610e",
  "bypassMacAddressesCheck": false,
  "force": false
}
{
  "code": "INTERNAL_ERROR",
  "params": [
    "unspecified domain type"
  ],
  "task": {
    "uuid": "630a8661-d480-27f7-28ab-a719d4aaf8ff",
    "name_label": "Async.VM.unpause",
    "name_description": "",
    "allowed_operations": [],
    "current_operations": {},
    "created": "20210628T11:27:49Z",
    "finished": "20210628T11:27:49Z",
    "status": "failure",
    "resident_on": "OpaqueRef:349deadd-d257-4474-a9ee-405bc1a9e63e",
    "progress": 1,
    "type": "<none/>",
    "result": "",
    "error_info": [
      "INTERNAL_ERROR",
      "unspecified domain type"
    ],
    "other_config": {
      "debug_info:cancel_points_seen": "1"
    },
    "subtask_of": "OpaqueRef:NULL",
    "subtasks": [],
    "backtrace": "(((process xapi)(filename ocaml/xapi/helpers.ml)(line 593))((process xapi)(filename ocaml/xapi/xapi_vbd_helpers.ml)(line 154))((process xapi)(filename ocaml/xapi/xapi_vbd_helpers.ml)(line 342))((process xapi)(filename ocaml/xapi/message_forwarding.ml)(line 1022))((process xapi)(filename list.ml)(line 110))((process xapi)(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 24))((process xapi)(filename ocaml/xapi/rbac.ml)(line 231))((process xapi)(filename ocaml/xapi/server_helpers.ml)(line 103)))"
  },
  "message": "INTERNAL_ERROR(unspecified domain type)",
  "name": "XapiError",
  "stack": "XapiError: INTERNAL_ERROR(unspecified domain type)
    at Function.wrap (/opt/xo/xo-builds/xen-orchestra-202106120305/packages/xen-api/src/_XapiError.js:16:12)
    at _default (/opt/xo/xo-builds/xen-orchestra-202106120305/packages/xen-api/src/_getTaskResult.js:11:29)
    at Xapi._addRecordToCache (/opt/xo/xo-builds/xen-orchestra-202106120305/packages/xen-api/src/index.js:853:24)
    at forEach (/opt/xo/xo-builds/xen-orchestra-202106120305/packages/xen-api/src/index.js:874:14)
    at Array.forEach (<anonymous>)
    at Xapi._processEvents (/opt/xo/xo-builds/xen-orchestra-202106120305/packages/xen-api/src/index.js:864:12)
    at Xapi._watchEvents (/opt/xo/xo-builds/xen-orchestra-202106120305/packages/xen-api/src/index.js:1029:14)"
}
olivierlambert commented 3 years ago

Hi,

For initial issues and non-reproducible bugs, we prefer to use our community forum than Github (to not overwhelm our scarce developers time):

https://xcp-ng.org/forum

See you there :) We'll reopen here if we find something that could be reproduced.

CranialRelics commented 3 years ago

I'm happy to work with you to reproduce this, just let me know. I was able to resolve this by running: xe-toolstack-restart xe vm-shutdown uuid=xxx force=true

I tired everything I could think of from xo, with no luck.

Tcoton commented 2 years ago
xe-toolstack-restart

saved me when I could not attach any ISO to a CentOS 7 after ejecting the CD during 1st reboot. The log did not say where to look at though but the VM was not stuck like yours. It started but would not attach any ISO at all. Did the CLI command and forced shutdown the VM via XO and voilà!