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

    Imported VM fails to start with VDI_MISSING

    Scheduled Pinned Locked Moved Xen Orchestra
    7 Posts 2 Posters 2.6k 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.
    • N Offline
      nodesocket
      last edited by

      I exported a VM to .xva file in Xen Orchestra. When I import it in XO, and attempt to start the VM, it is erroring with:

      vm.start
      {
        "id": "bb2217f9-246f-30c8-d58e-f97a8b5d409b",
        "host": "3b90e8dc-43b7-4150-bd47-72cd1d865ba3"
      }
      {
        "code": "VDI_MISSING",
        "params": [
          "OpaqueRef:6e947376-8532-4631-81af-ddf1ded3d48c",
          "OpaqueRef:aa9729a2-462e-483e-b7b3-8d23d4f79abc"
        ],
        "task": {
          "uuid": "41332c3a-5665-d326-06b2-d8ca422d9888",
          "name_label": "Async.VM.start_on",
          "name_description": "",
          "allowed_operations": [],
          "current_operations": {},
          "created": "20191011T03:04:21Z",
          "finished": "20191011T03:04:28Z",
          "status": "failure",
          "resident_on": "OpaqueRef:a7a450b0-6223-42fc-a998-a8e51bdb5dae",
          "progress": 1,
          "type": "<none/>",
          "result": "",
          "error_info": [
            "VDI_MISSING",
            "OpaqueRef:6e947376-8532-4631-81af-ddf1ded3d48c",
            "OpaqueRef:aa9729a2-462e-483e-b7b3-8d23d4f79abc"
          ],
          "other_config": {
            "debug_info:cancel_points_seen": "1"
          },
          "subtask_of": "OpaqueRef:NULL",
          "subtasks": [],
          "backtrace": "(((process\"xenopsd-xc @ localhost\")(filename lib/xenops_server.ml)(line 1124))((process\"xenopsd-xc @ localhost\")(filename list.ml)(line 106))((process\"xenopsd-xc @ localhost\")(filename lib/xenops_server.ml)(line 1481))((process\"xenopsd-xc @ localhost\")(filename list.ml)(line 117))((process\"xenopsd-xc @ localhost\")(filename lib/xenops_server.ml)(line 1476))((process\"xenopsd-xc @ localhost\")(filename lib/xenops_server.ml)(line 1615))((process\"xenopsd-xc @ localhost\")(filename lib/xenops_server.ml)(line 1975))((process\"xenopsd-xc @ localhost\")(filename lib/xenops_server.ml)(line 1986))((process\"xenopsd-xc @ localhost\")(filename lib/xenops_server.ml)(line 2000))((process\"xenopsd-xc @ localhost\")(filename lib/task_server.ml)(line 159))((process\"xapi @ localhost\")(filename ocaml/xapi/xapi_xenops.ml)(line 2495))((process\"xapi @ localhost\")(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 24))((process\"xapi @ localhost\")(filename ocaml/xapi/xapi_xenops.ml)(line 2812))((process\"xapi @ localhost\")(filename ocaml/xapi/xapi_xenops.ml)(line 2503))((process\"xapi @ localhost\")(filename lib/backtrace.ml)(line 210))((process\"xapi @ localhost\")(filename ocaml/xapi/xapi_xenops.ml)(line 2509))((process\"xapi @ localhost\")(filename ocaml/xapi/xapi_xenops.ml)(line 2820))((process\"xapi @ localhost\")(filename ocaml/xapi/xapi_xenops.ml)(line 2503))((process\"xapi @ localhost\")(filename ocaml/xapi/xapi_xenops.ml)(line 2577))((process\"xapi @ localhost\")(filename ocaml/xapi/xapi_vm.ml)(line 298))((process\"xapi @ localhost\")(filename ocaml/xapi/message_forwarding.ml)(line 100))((process\"xapi @ localhost\")(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 24))((process\"xapi @ localhost\")(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 35))((process\"xapi @ localhost\")(filename ocaml/xapi/message_forwarding.ml)(line 1266))((process\"xapi @ localhost\")(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 24))((process\"xapi @ localhost\")(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 35))((process\"xapi @ localhost\")(filename lib/xapi-stdext-pervasives/pervasiveext.ml)(line 24))((process\"xapi @ localhost\")(filename ocaml/xapi/rbac.ml)(line 236))((process\"xapi @ localhost\")(filename ocaml/xapi/server_helpers.ml)(line 83)))"
        },
        "message": "VDI_MISSING(OpaqueRef:6e947376-8532-4631-81af-ddf1ded3d48c, OpaqueRef:aa9729a2-462e-483e-b7b3-8d23d4f79abc)",
        "name": "XapiError",
        "stack": "XapiError: VDI_MISSING(OpaqueRef:6e947376-8532-4631-81af-ddf1ded3d48c, OpaqueRef:aa9729a2-462e-483e-b7b3-8d23d4f79abc)
          at Function.wrap (/usr/local/lib/node_modules/xo-server/node_modules/xen-api/src/_XapiError.js:16:11)
          at _default (/usr/local/lib/node_modules/xo-server/node_modules/xen-api/src/_getTaskResult.js:11:28)
          at Xapi._addRecordToCache (/usr/local/lib/node_modules/xo-server/node_modules/xen-api/src/index.js:812:37)
          at events.forEach.event (/usr/local/lib/node_modules/xo-server/node_modules/xen-api/src/index.js:833:13)
          at Array.forEach (<anonymous>)
          at Xapi._processEvents (/usr/local/lib/node_modules/xo-server/node_modules/xen-api/src/index.js:823:11)
          at /usr/local/lib/node_modules/xo-server/node_modules/xen-api/src/index.js:984:13
          at Generator.next (<anonymous>)
          at asyncGeneratorStep (/usr/local/lib/node_modules/xo-server/node_modules/xen-api/dist/index.js:60:103)
          at _next (/usr/local/lib/node_modules/xo-server/node_modules/xen-api/dist/index.js:62:194)
          at tryCatcher (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/util.js:16:23)
          at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/promise.js:512:31)
          at Promise._settlePromise (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/promise.js:569:18)
          at Promise._settlePromise0 (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/promise.js:614:10)
          at Promise._settlePromises (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/promise.js:693:18)
          at Async._drainQueue (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/async.js:133:16)
          at Async._drainQueues (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/async.js:143:10)
          at Immediate.Async.drainQueues (/usr/local/lib/node_modules/xo-server/node_modules/bluebird/js/release/async.js:17:14)
          at runCallback (timers.js:810:20)
          at tryOnImmediate (timers.js:768:5)
          at processImmediate [as _immediateCallback] (timers.js:745:5)"
      } 
      

      Any idea what is causing the error VDI_MISSING?

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Online
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Have you exported the XVA without removing an ISO plugged in the virtual CD drive?

        N 1 Reply Last reply Reply Quote 0
        • N Offline
          nodesocket @olivierlambert
          last edited by nodesocket

          @olivierlambert ah, perhaps. Is there anyway to recover from this? I don't have the VM anymore just the exported .xva file.

          1 Reply Last reply Reply Quote 0
          • olivierlambertO Online
            olivierlambert Vates 🪐 Co-Founder CEO
            last edited by olivierlambert

            Use xe CLI to find the vbd linked to the ghost VDI and remove it. Then the VM will boot.

            edit: more in details, do a xe vm-disk-list uuid=bb2217f9-246f-30c8-d58e-f97a8b5d409b. Identify the disk/VBD that's not the hard drive. Then do a xe vbd-destroy uuid=<UUID OF THE VBD TO DESTROY>

            N 1 Reply Last reply Reply Quote 0
            • N Offline
              nodesocket @olivierlambert
              last edited by

              @olivierlambert said in Imported VM fails to start with VDI_MISSING:

              xe vdb-destroy uuid=

              Humm, getting unknown command vdb-destroy.

              [23:10 localhost ~]# xe vm-disk-list uuid=4aef7b34-2e7e-53c5-62e3-331be8151287
              Disk 0 VBD:
              uuid ( RO)             : 7dbe255d-8b76-04fe-e5ba-a97523e0445e
                  vm-name-label ( RO): Ubuntu server 18.04-2 base
                     userdevice ( RW): 0
              
              
              Disk 0 VDI:
              uuid ( RO)             : 193f9105-e23c-4fe7-a8ae-40bed37ede4e
                     name-label ( RW): base
                  sr-name-label ( RO): Local storage
                   virtual-size ( RO): 10737418240
              
              
              [23:11 localhost ~]# xe vdb-destroy uuid=7dbe255d-8b76-04fe-e5ba-a97523e0445e
              Unknown command: vdb-destroy
              For usage run: 'xe help'
              
              1 Reply Last reply Reply Quote 0
              • N Offline
                nodesocket
                last edited by nodesocket

                Ah, the problem is the command is xe vbd-destroy uuid=7dbe255d-8b76-04fe-e5ba-a97523e0445e.

                After running it though, it seems to have deleted all the disks from the VM.

                xe vm-disk-list uuid=4aef7b34-2e7e-53c5-62e3-331be8151287
                

                Shows 0 disks now.

                1 Reply Last reply Reply Quote 0
                • olivierlambertO Online
                  olivierlambert Vates 🪐 Co-Founder CEO
                  last edited by olivierlambert

                  You can reattach the drive (in XO web UI or with xe by recreating the VBD: vbd-create vm-uuid=4aef7b34-2e7e-53c5-62e3-331be8151287 vdi-uuid=193f9105-e23c-4fe7-a8ae-40bed37ede4e device=0). Then try to boot the VM.

                  1 Reply Last reply Reply Quote 0

                  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
                  • First post
                    Last post