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

    VM creation progress

    Scheduled Pinned Locked Moved REST API
    9 Posts 3 Posters 202 Views 2 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.
    • I Offline
      irtaza9
      last edited by

      How can we check the progress of a VM creation process on XO? is there any api which returns the progress % or anything else that help in this regards?

      1 Reply Last reply Reply Quote 0
      • DanpD Online
        Danp Pro Support Team
        last edited by

        VM creation is almost instantaneous for me, and I'm running on older hardware (E5-2680). How long does it typically take for VM creation on your end?

        I 1 Reply Last reply Reply Quote 0
        • I Offline
          irtaza9 @Danp
          last edited by

          @Danp it doesn't takes much time like its very fast but is there any way to check the progress if i want?

          DanpD B 2 Replies Last reply Reply Quote 0
          • DanpD Online
            Danp Pro Support Team @irtaza9
            last edited by

            @irtaza9 Not AFAIK.

            I 1 Reply Last reply Reply Quote 0
            • I Offline
              irtaza9 @Danp
              last edited by

              @Danp when we use a custom temp which contains cloud-init configs then the the complete boot takes some time but the rest-api vm.create only deliver the payload to the server and does not record the operation further. We want to have a loading indicator until operation of vm creation is 100% complete.

              DanpD 1 Reply Last reply Reply Quote 0
              • DanpD Online
                Danp Pro Support Team @irtaza9
                last edited by

                @irtaza9 Can you elaborate on how you are making this API call? FWIW, vm.create is from the older JSON-RPC API, not the REST API.

                I 1 Reply Last reply Reply Quote 0
                • I Offline
                  irtaza9 @Danp
                  last edited by irtaza9

                  @Danp

                  I'm currently using the JSON-RPC method vm.create for VM creation. As far as I know, both methods are the same because you don’t create an operation if the action takes a long time to complete—for example, VM creation. If you were to create an operation for the action and provide a way to check its completion, we could handle the loading state on our end.

                  Async operations:
                  Any operation which may take more than a second to be done must be done in the background, returning a background operation ID to the client.

                  The client will then be able to either poll for a status update or wait for a notification using the long-poll API.

                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    bufanda @irtaza9
                    last edited by

                    In the Tasks menu on the left it should show all active tasks including the VM creation or it's sub tasks like VDI cloning.

                    I 1 Reply Last reply Reply Quote 0
                    • I Offline
                      irtaza9 @bufanda
                      last edited by

                      @bufanda yes I have checked that feature too. Let me dig further to make it useable for my use case.

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