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

    reboot of host does it stop or kill running VM's?

    Scheduled Pinned Locked Moved XCP-ng
    14 Posts 5 Posters 956 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.
    • DanpD Offline
      Danp Pro Support Team
      last edited by

      What was the command that you entered on the CLI? Were you monitoring the host to see if it actually rebooted?

      You could check the server / IPMI logs for more details.

      M 1 Reply Last reply Reply Quote 0
      • M Offline
        manilx @Danp
        last edited by manilx

        Danp I run "reboot" after ssh'ing into it and it rebooted. The VM stopped as expected, it rebooted and the VM restarted.
        I just don't know if it was shutdown or powered off... But it seemed to just have been powered offl

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          manilx @manilx
          last edited by

          manilx P.S. Coming from proxmox where I rebooted the host (after an update) and it shutdown the Vm's gracefully before rebooting.

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

            It sounds like you were connected to the VM instead of the host. 🤔

            What does uptime return now on the XCP host?

            M 1 Reply Last reply Reply Quote 0
            • M Offline
              manilx @Danp
              last edited by

              Danp No. I SSH'ed into the host and entered "reboot".
              Uptime is correct with the reboot time.

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

                manilx said in reboot of host does it stop or kill running VM's?:

                Coming from proxmox where I rebooted the host (after an update) and it shutdown the Vm's gracefully before rebooting.

                That is certainly an option here as well, but you need to use the correct process to reboot the host. Easiest way is using XO. Otherwise, there are a variety of host commands offered by xe.

                M 1 Reply Last reply Reply Quote 0
                • M Offline
                  manilx @Danp
                  last edited by

                  Danp OK, got it:

                  xe host-disable host=xxxx
                  xe host-reboot host=xxxx

                  reboot on the cli just hard reboots the host on the OS level.

                  gskgerG 1 Reply Last reply Reply Quote 0
                  • gskgerG Offline
                    gskger Top contributor @manilx
                    last edited by

                    manilx Maybe I am wrong, but I still think VM's are shutdown gracefully. If you look at the Pool Task view in XO and issue the reboot command while SSH`ed into the host, you see the shutdown for a second or two:

                    8011e155-f23c-432f-9069-f7e4e24382fb-grafik.png

                    hp740 is the host that gets rebooted and hp_d12_s and hp_d12_c are two debian VMs on that host. Both VMs have the guest tools installed.

                    M 1 Reply Last reply Reply Quote 0
                    • M Offline
                      manilx @gskger
                      last edited by

                      gskger I tried this again with a bigger VM (longer to shutdoen) and yes, you're right, the VM's are gracefully shutdown. Great!
                      Same as in proxmox.

                      gskgerG 1 Reply Last reply Reply Quote 0
                      • gskgerG Offline
                        gskger Top contributor @manilx
                        last edited by

                        manilx If the VM has no guest tools installed (like this Windows VM), the host will perfom a hard shutdown of the VM:

                        8aecaab4-a312-4fef-be18-35f12813e59e-grafik.png

                        So it is a good idea to have the guest tools installed.

                        M 1 Reply Last reply Reply Quote 1
                        • M Offline
                          manilx @gskger
                          last edited by

                          gskger Yes, all my VM's have guest tools installed, Windows/Linux. It's quite the "requirement".

                          1 Reply Last reply Reply Quote 0
                          • V Offline
                            volkswagner 0
                            last edited by volkswagner 0

                            I have yet to successfully reboot a host from XO. I have tools installed on three out of four VM. I try shutting down the VM without tools, then issue reboot host in XO GUI. Get warning:
                            Some VMs cannot be migrated without first rebooting this host. Please try force reboot.

                            Is this a setting perhaps?

                            I'm always needing to shutdown all VMs before I can reboot the host. It is a single host environment, so there will never be an available server to migrate VMs to.

                            Rebooting in XSCONSOLE causes the host to be unavailable in XO. I have to remove then add the host back in XO.

                            Can anyone shed light as to what I'm doing wrong?

                            Do I just need to always run the following after a reboot?
                            xe host-enable host=xxxx

                            1 Reply Last reply Reply Quote 0
                            • N Offline
                              nodje
                              last edited by nodje

                              Could someone elaborate on the procedure to have all VMs on a host shutdown properly upon XCP-NG host shutdown please?

                              I tried from the host prompt:

                              xe host-disable
                              xe host-shutdown
                              

                              and from XOA Host: shutdown, with warning (This will shutdown your host without evacuating its VMs. Do you want to continue?)

                              and rightly so the host has seemingly become unavailable (ping to its IP stops)
                              But then what happens is very odd:

                              • first the VM on it still pings for a couple minutes (yes after the host stops to answers the ping)
                              • then the VM stops pinging
                              • but AFAICS XCP-NG is not OFF

                              Awkwardly, I just access to the IDRAC8 entreprise license on which XCP-Ng is running, and can't SEE the proper status of XCP-NG from it.
                              AFAIK it's not pinging but it doesn't seem OFF either. At least the IDRAC shows it ON, and upon power cycling and reconnecting to the VM the logs shows it hasn't been cleanly shutdown.

                              NB: the VM has xen-guest-agent running within a container, but from what I gathered, the agent in Linux guests has no role in VM shutdown: See https://xcp-ng.org/forum/topic/10631/understanding-xe-guest-utilities/16

                              Also, I doubled check Proxmox: it does clean shutdown VMs, either with a "shutdown -h now" command or when triggered from GUI. And that's with a VM that has Promox guest installed.

                              In any case, it would be nice to have XCP-NG/XOA be able to do the same.

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