reboot of host does it stop or kill running VM's?
-
Question in subject.
I rebooted a host from the CLI with one running VM. It was so fast that I thing it just killed the VM instead of stopping the OS. -
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.
-
@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 -
@manilx P.S. Coming from proxmox where I rebooted the host (after an update) and it shutdown the Vm's gracefully before rebooting.
-
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