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

    vm.restart - meaning of various options

    Scheduled Pinned Locked Moved Solved Advanced features
    9 Posts 3 Posters 131 Views 3 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.
    • A Offline
      archw
      last edited by

      In the jobs function, there is a function to re-start a virtual machine called "vm.restart". It has a series of options. Is there anywhere that shows what the various options do?

      The three options are shown below:

      timeout
      force (seems obvious but what if it not checked?)
      bypassBlockedOperation

      Thanks!

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

        Ping @pdonias

        1 Reply Last reply Reply Quote 0
        • pdoniasP Offline
          pdonias Vates 🪐 XO Team @archw
          last edited by

          @archw Since the jobs settings give you an automatic direct access to the API methods, the parameters are not documented, unfortunately. Regarding vm.restart, force will hard-reboot the VM instead of going through the guest tools and bypassBlockedOperation will restart the VM even if you enabled "Protect against accidental shutdown" in the VM's advanced tab.

          A 2 Replies Last reply Reply Quote 1
          • A Offline
            archw @pdonias
            last edited by archw

            @pdonias
            One more...what does "timeout" do?
            Thank you!

            pdoniasP 1 Reply Last reply Reply Quote 0
            • pdoniasP Offline
              pdonias Vates 🪐 XO Team @archw
              last edited by

              @archw It's the amount of seconds after which the job run will be marked as failed if the run hasn't ended. If you configure a timeout on vm.restart with multiple VMs, the timeout will apply on each VM individually.

              A 1 Reply Last reply Reply Quote 1
              • olivierlambertO olivierlambert marked this topic as a question
              • olivierlambertO olivierlambert has marked this topic as solved
              • A Offline
                archw @pdonias
                last edited by

                @pdonias Thanks!

                1 Reply Last reply Reply Quote 0
                • A Offline
                  archw @pdonias
                  last edited by

                  @pdonias Tis will sound weird but is there any way to have it try going through the guest tools first and, if it doesn't work, then do the hard-reboot of the VM?

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

                    Hi,

                    Can you describe more precisely what do you want to achieve?

                    A 1 Reply Last reply Reply Quote 0
                    • A Offline
                      archw @olivierlambert
                      last edited by

                      @olivierlambert
                      I’ve got a few VM’s that lock up from time to time. There is no rhyme nor reason (different hosts, different storage, etc).

                      As a result, I just have a job that restarts them at 5:30 am every day. I’d like to have the software tool software restart them but, in the occasion wher the VM is locked up tight as Fort Knox, I’d like the hard reset to happen.

                      Make sense ?

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