reboot of host does it stop or kill running VM's?
-
It sounds like you were connected to the VM instead of the host.
What does
uptime
return now on the XCP host? -
@Danp No. I SSH'ed into the host and entered "reboot".
Uptime is correct with the reboot time. -
@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
. -
@Danp OK, got it:
xe host-disable host=xxxx
xe host-reboot host=xxxxreboot on the cli just hard reboots the host on the OS level.
-
@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: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.
-
@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. -
@manilx If the VM has no guest tools installed (like this Windows VM), the host will perfom a hard shutdown of the VM:
So it is a good idea to have the guest tools installed.
-
@gskger Yes, all my VM's have guest tools installed, Windows/Linux. It's quite the "requirement".
-
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 -
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-reboot
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.