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

    Unable to migrate VMs

    Scheduled Pinned Locked Moved Compute
    27 Posts 3 Posters 7.3k 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.
    • F Offline
      fred974
      last edited by

      Hi,

      I get the following message when trying to migrate a VM from 1 host to another on 2 different datacentre

      vm.migrate
      {
        "vm": "8be08afd-f7c9-f044-661e-631b41b110b7",
        "mapVifsNetworks": {
          "ccba90a8-0e93-f0fe-80d7-816363036c97": "24c00a36-b0ee-2f9b-832e-6e3a26d53bc3"
        },
        "migrationNetwork": "24c00a36-b0ee-2f9b-832e-6e3a26d53bc3",
        "sr": "66eb4d5b-3f8b-4370-2cb6-f2ac42e69257",
        "targetHost": "9eebc91d-3277-4f13-948e-f964ecf548d2"
      }
      {
        "code": 21,
        "data": {
          "objectId": "8be08afd-f7c9-f044-661e-631b41b110b7",
          "code": "INTERNAL_ERROR"
        },
        "message": "operation failed",
        "name": "XoError",
        "stack": "XoError: operation failed
          at operationFailed (/opt/xo/xo-builds/xen-orchestra-202112150851/packages/xo-common/src/api-errors.js:21:32)
          at file:///opt/xo/xo-builds/xen-orchestra-202112150851/packages/xo-server/src/api/vm.mjs:483:15
          at Object.migrate (file:///opt/xo/xo-builds/xen-orchestra-202112150851/packages/xo-server/src/api/vm.mjs:470:3)
          at Api.callApiMethod (file:///opt/xo/xo-builds/xen-orchestra-202112150851/packages/xo-server/src/xo-mixins/api.mjs:307:20)"
      }
      

      I cannot find any clue for the reason why in that log. Could anyone please assist?

      Thank you

      DarkbeldinD 1 Reply Last reply Reply Quote 0
      • DarkbeldinD Offline
        Darkbeldin Vates 🪐 Pro Support Team @fred974
        last edited by

        @fred974 Hi fred974,

        You should check if the VM is on static memory.

        F 1 Reply Last reply Reply Quote 0
        • F Offline
          fred974 @Darkbeldin
          last edited by

          @darkbeldin said in Unable to migrate VMs:

          You should check if the VM is on static memory.

          This is what I have

          9cb94234-8df1-47b1-95a2-49a9a75bbc96-image.png

          I am not sure what you mean.

          DarkbeldinD 1 Reply Last reply Reply Quote 0
          • DarkbeldinD Offline
            Darkbeldin Vates 🪐 Pro Support Team @fred974
            last edited by

            @fred974 Ok let me explain, when migrating a VM the hypervisor need to reduce the memory to the minimal setting you have define so in your case 2 Mo 😉

            Set your dynamic memory min to 2 Go and you should be fine.

            F 1 Reply Last reply Reply Quote 0
            • F Offline
              fred974 @Darkbeldin
              last edited by

              @darkbeldin
              I have set the dynamic to 2 GB

              5e2a606b-0859-425f-9ee2-598864f7da2a-image.png

              And I get this message:

              vm.migrate
              {
                "vm": "8be08afd-f7c9-f044-661e-631b41b110b7",
                "mapVifsNetworks": {
                  "ccba90a8-0e93-f0fe-80d7-816363036c97": "24c00a36-b0ee-2f9b-832e-6e3a26d53bc3"
                },
                "migrationNetwork": "24c00a36-b0ee-2f9b-832e-6e3a26d53bc3",
                "sr": "66eb4d5b-3f8b-4370-2cb6-f2ac42e69257",
                "targetHost": "9eebc91d-3277-4f13-948e-f964ecf548d2"
              }
              {
                "code": 21,
                "data": {
                  "objectId": "8be08afd-f7c9-f044-661e-631b41b110b7",
                  "code": "INTERNAL_ERROR"
                },
                "message": "operation failed",
                "name": "XoError",
                "stack": "XoError: operation failed
                  at operationFailed (/opt/xo/xo-builds/xen-orchestra-202201041455/packages/xo-common/src/api-errors.js:21:32)
                  at file:///opt/xo/xo-builds/xen-orchestra-202201041455/packages/xo-server/src/api/vm.mjs:483:15
                  at Object.migrate (file:///opt/xo/xo-builds/xen-orchestra-202201041455/packages/xo-server/src/api/vm.mjs:470:3)
                  at Api.callApiMethod (file:///opt/xo/xo-builds/xen-orchestra-202201041455/packages/xo-server/src/xo-mixins/api.mjs:307:20)"
              }
              
              DarkbeldinD 1 Reply Last reply Reply Quote 0
              • DarkbeldinD Offline
                Darkbeldin Vates 🪐 Pro Support Team @fred974
                last edited by

                @fred974 Could you try to migrate the VM manually to see if the error better defined.

                F 1 Reply Last reply Reply Quote 0
                • F Offline
                  fred974 @Darkbeldin
                  last edited by

                  @darkbeldin said in Unable to migrate VMs:

                  Could you try to migrate the VM manually to see if the error better defined.

                  Sorry but how do I do that? is that at command line?

                  F DarkbeldinD 2 Replies Last reply Reply Quote 0
                  • F Offline
                    fred974 @fred974
                    last edited by

                    @Darkbeldin not sure if this help but when trying via xcp-ng centre, I get this:

                    dff0214c-a4c0-4bbf-b838-37bd0c29db78-image.png

                    1 Reply Last reply Reply Quote 0
                    • DarkbeldinD Offline
                      Darkbeldin Vates 🪐 Pro Support Team @fred974
                      last edited by

                      @fred974 Yes from the VM host the basic CLI is something like

                      xe vm-migrate uuid=<VMuuid> host-uuid=<Hostuuid>
                      
                      F 1 Reply Last reply Reply Quote 0
                      • F Offline
                        fred974 @Darkbeldin
                        last edited by fred974

                        @darkbeldin

                        [15:37 srv-tri-xcptmp ~]# xe vm-migrate uuid=8be08afd-f7c9-f044-661e-631b41b110b7 host-uuid=9eebc91d-3277-4f13-948e-f964ecf548d2                                                                                                       
                        
                        Error: Host 9eebc91d-3277-4f13-948e-f964ecf548d2 not found
                        

                        This is strange as the host is visible XO

                        fc3434c3-13c8-4316-9bb1-ff6d422f86c1-image.png

                        From the host the VM is on, I can telnet the destination host

                        [15:47 srv-tri-xcptmp ~]# telnet 85.75.xxx.xx 443
                        Trying 85.75.xxx.xx...
                        Connected to 85.75.xxx.xx.
                        Escape character is '^]'.
                        ^]
                        
                        DarkbeldinD 1 Reply Last reply Reply Quote 0
                        • DarkbeldinD Offline
                          Darkbeldin Vates 🪐 Pro Support Team @fred974
                          last edited by

                          @fred974 Are you trying to migrate to the same pool or to another pool?

                          F 1 Reply Last reply Reply Quote 0
                          • F Offline
                            fred974 @Darkbeldin
                            last edited by fred974

                            @darkbeldin said in Unable to migrate VMs:

                            @fred974 Are you trying to migrate to the same pool or to another pool?
                            I am migrating to another pool on another DC. I am using zerotier to link the hosts. But the issue also exist when exposing the destination host IP to the public.

                            F 1 Reply Last reply Reply Quote 0
                            • F Offline
                              fred974 @fred974
                              last edited by

                              When I add the hosting using its public IP, I have the same issue. It is added to XO, I can list the VM on the destination host. I cannot access its console tough. I tried via the official XOA and same error.

                              DarkbeldinD 1 Reply Last reply Reply Quote 0
                              • DarkbeldinD Offline
                                Darkbeldin Vates 🪐 Pro Support Team @fred974
                                last edited by

                                @fred974 Sorry not sure i understand, from which host to which host are you trying to migrate? are they on the same pool?

                                F 1 Reply Last reply Reply Quote 0
                                • F Offline
                                  fred974 @Darkbeldin
                                  last edited by

                                  @darkbeldin said in Unable to migrate VMs:

                                  @fred974 Sorry not sure i understand, from which host to which host are you trying to migrate? are they on the same pool?

                                  I am trying to migrate 1 VM located in datacentre 1 to another host located on another datacentre on a completely different pool. There is 2 pools of 2 individual host.

                                  Currently I am using XOA official from the host the VM reside. I added the destination host to that XOA via its public IP and I can see it in XOA but cannot access the console of the remote host from XOA for some reason.

                                  The error at command line is saying that it cannot find the remote host, even tough it exist in XOA. Was I suppose to run the following command from the XOA server and not the host?

                                  xe vm-migrate uuid=<VMuuid> host-uuid=<Hostuuid>
                                  
                                  DarkbeldinD 1 Reply Last reply Reply Quote 0
                                  • DarkbeldinD Offline
                                    Darkbeldin Vates 🪐 Pro Support Team @fred974
                                    last edited by

                                    @fred974 No in the case of a remote pool you have to use other parameters.

                                    xe vm-migrate vm=<vmuuid> remote-master=<remote pool master IP> remote-username=root remote-password=<password> vif:<uuid of the migration VIF>
                                    
                                    F 1 Reply Last reply Reply Quote 0
                                    • F Offline
                                      fred974 @Darkbeldin
                                      last edited by

                                      @darkbeldin Do I need to specify the remote storage uuid?

                                      F 1 Reply Last reply Reply Quote 0
                                      • F Offline
                                        fred974 @fred974
                                        last edited by

                                        @fred974 here is the error from command line

                                        Performing a Storage XenMotion migration. Your VM's VDIs will be migrated with the VM.
                                        Will migrate to remote host: srv-tri-xcp05, using remote network: MGNT_LAN. Here is the VDI mapping:
                                        VDI dd2cc891-c44f-4dfe-9bfd-5887e73b5bf3 -> SR 66eb4d5b-3f8b-4370-2cb6-f2ac42e69257
                                        The server failed to handle your request, due to an internal error. The given message may give details useful for debugging the problem.
                                        message: Xmlrpc_client.Connection_reset
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • olivierlambertO Offline
                                          olivierlambert Vates 🪐 Co-Founder CEO
                                          last edited by

                                          Your connection is reset. Check XAPI logs on source and destination, also check you have enough memory and disk space in the dom0.

                                          F 2 Replies Last reply Reply Quote 0
                                          • F Offline
                                            fred974 @olivierlambert
                                            last edited by

                                            @olivierlambert said in Unable to migrate VMs:

                                            also check you have enough memory and disk space in the dom0

                                            On source or destination?

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