XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Unable to boot servers created by Terraform after they are shutdown

    Scheduled Pinned Locked Moved Compute
    3 Posts 2 Posters 441 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • newknowledgeN Offline
      newknowledge
      last edited by

      Hello everyone.
      I am having an issue with my VM's created via Terraform. I am unable to restart them.
      Pressing the Start button generates the error "no host available"
      Below is the error log when I use Start on and select the correct host

      vm.start
      {
        "id": "45dc0e34-ac73-ccea-ed76-8b7f1cea3238",
        "host": "b2fae86d-40b5-433b-8fd2-09444f2e06d2"
      }
      {
        "code": "INVALID_VALUE",
        "params": [
          "HVM_shadow_multiplier",
          "0.944444444444"
        ],
        "task": {
          "uuid": "5778b8be-23d1-ad44-9dfc-501354664180",
          "name_label": "Async.VM.start_on",
          "name_description": "",
          "allowed_operations": [],
          "current_operations": {},
          "created": "20210410T21:27:06Z",
          "finished": "20210410T21:27:06Z",
          "status": "failure",
          "resident_on": "OpaqueRef:364d93c4-a7da-4db7-90d7-e292ee78d164",
          "progress": 1,
          "type": "<none/>",
          "result": "",
          "error_info": [
            "INVALID_VALUE",
            "HVM_shadow_multiplier",
            "0.944444444444"
          ],
          "other_config": {},
          "subtask_of": "OpaqueRef:NULL",
          "subtasks": [],
          "backtrace": "(((process xapi)(filename ocaml/xapi/xapi_vm_helpers.ml)(line 191))((process xapi)(filename ocaml/xapi/xapi_vm_helpers.ml)(line 240))((process xapi)(filename ocaml/xapi/xapi_vm_helpers.ml)(line 501))((process xapi)(filename ocaml/xapi/message_forwarding.ml)(line 928))((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/helpers.ml)(line 1076))((process xapi)(filename ocaml/xapi/message_forwarding.ml)(line 926))((process xapi)(filename ocaml/xapi/message_forwarding.ml)(line 1250))((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 lib/xapi-stdext-pervasives/pervasiveext.ml)(line 24))((process xapi)(filename ocaml/xapi/rbac.ml)(line 236))((process xapi)(filename ocaml/xapi/server_helpers.ml)(line 83)))"
        },
        "message": "INVALID_VALUE(HVM_shadow_multiplier, 0.944444444444)",
        "name": "XapiError",
        "stack": "XapiError: INVALID_VALUE(HVM_shadow_multiplier, 0.944444444444)
          at Function.wrap (/opt/xo/xo-builds/xen-orchestra-202009121357/packages/xen-api/src/_XapiError.js:16:12)
          at _default (/opt/xo/xo-builds/xen-orchestra-202009121357/packages/xen-api/src/_getTaskResult.js:11:29)
          at Xapi._addRecordToCache (/opt/xo/xo-builds/xen-orchestra-202009121357/packages/xen-api/src/index.js:806:24)
          at forEach (/opt/xo/xo-builds/xen-orchestra-202009121357/packages/xen-api/src/index.js:827:14)
          at Array.forEach (<anonymous>)
          at Xapi._processEvents (/opt/xo/xo-builds/xen-orchestra-202009121357/packages/xen-api/src/index.js:817:12)
          at Xapi._watchEvents (/opt/xo/xo-builds/xen-orchestra-202009121357/packages/xen-api/src/index.js:975:14)"
      } 
      
      
      
      DanpD 1 Reply Last reply Reply Quote 0
      • DanpD Offline
        Danp Pro Support Team @newknowledge
        last edited by

        @newknowledge I believe this multiple needs to be greater than or equal to 1. You can try correcting the value with the command xe vm-memory-shadow-multiplier-set.

        The command would look something like this --

        xe vm-memory-shadow-multiplier-set uuid=45dc0e34-ac73-ccea-ed76-8b7f1cea3238 multiplier=1.0

        newknowledgeN 1 Reply Last reply Reply Quote 1
        • newknowledgeN Offline
          newknowledge @Danp
          last edited by newknowledge

          @danp
          I am getting this error

          You attempted an operation on a VM that was not in an appropriate power state at the time; for example, you attempted to start a VM that was already running. The parameters returned are the VM's handle, and the expected and actual VM state at the time of the call.
          vm: 2fc2b09b-2249-164a-9f60-e408d9c3db82 (Cert test-host_2021-04-07T16:19:20.356Z)
          expected: running
          actual: halted
          
          

          the last portion states that I can only do this command on a running vm

          Edit:
          I created a new vm using terraform and changed ran the suggested command. The result is that the vm operates normally.

          The issue now is what is causing this to happen? I don't believe this was an issue for me before.

          Thanks for your help.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post