What's the recommended way to reboot after applying XCP-ng patches?
-
Seems like every time there are patches I mess something up in some way.
The first time I installed patches, I shut down all the VMs just to get ready for the reboot. Then when I installed the patches, it restarted the toolstack which restarted all my VMs.
The second time there were patches I can't exactly remember what went wrong but I know it didn't go smoothly. I think in that case I rebooted all three servers at the same time and the ones that aren't the pool master weren't able to find the master, maybe because they booted slightly faster, so they had to be rebooted again.
This evening I wasn't going to make those mistakes so I installed all the patches to the whole pool then I shut down the VMs on the pool master and rebooted it. While it was rebooting I shut down almost all the VMs on the other two servers in the pool. I'm sure a bunch of you see what's coming... When the master rebooted, it started all those auto-start VMs on the other two servers too. I shut all those VMs down and rebooted and rebooted the second of the three servers. When it came back up, all the auto-start VMs on the third, still un-rebooted, server. Now I have to shut all those VMs down again so I can reboot that server.
Note, I don't have any shared storage. I was shutting VMs down because I didn't want to risk having the servers spend the next six hours migrating VMs to another host only to spend six hours migrating them back after the reboot. Maybe they wouldn't do that but I wasn't sure so it seemed safer to shut down all VMs on the host before the reboot so it would be clear that nothing should migrate.
So, what's the right way to do this?
Do I leave the VMs alone, install the patches and then reboot the servers starting with the master but just let the host reboot handle shutting down the VMs? It seems I need to stop trying to help it do its job.
-
@CodeMercenary The best way to do this is to go to your Pool > Patches (tab) > Rolling Pool Update.
This will automatically patch your entire pool, starting with the pool master and move your VMs around as needed.
-
@DustinB RPU isn't available in this case because the VDI aren't on shared storage.
-
@Danp said in What's the recommended way to reboot after applying XCP-ng patches?:
@DustinB RPU isn't available in this case because the VDI aren't on shared storage.
Oh, missed that ha... without Shared Storage you'd have to shut down those VMs, update the master manually, reboot it, then patch each host individually and reboot them individually
-
Technically, you can still perform the
Install pool patches
option to update all hosts at the same time. Then you should reboot the pool master, followed by the other pool members.The issue is that rebooting any host or restarting the toolstack on any host will cause the VMs to start back up if they have the
Auto power on
option enabled.@CodeMercenary You can disable each host in it's Advanced tab in XO, which will prevent these VMs from restarting during the patching process.
Just be sure to enable the hosts once the patching is completed.
-
-
@Danp So it sounds like there isn't much of a way to do this cleaner than I currently do. Patching doesn't happen very often so it's not a big deal to me if it's annoying, I just wanted to make sure I wasn't missing something that would make it easier. Would be nice not to have to manually disable autostart but I could always automate turning it off and back on using the cli and a tag if that's what I need to do.
Yesterday I did use
Install Pool Patches
which was quite nice and worked beautifully.I guess the question is, if I tell a host to reboot and it has running VMs and there is no shared storage, what does it do with the VMs? Will it try to manually migrate them by copying hundreds of GB to another host? Will it shut them down cleanly if they have the management tools installed? Will it poke the VM's virtual power button to shut itself down if the VM doesn't have management tools installed?
In other words, can I just
Install Pool Patches
and then reboot the hosts starting with the master if I don't care if the VMs are shut down? Our office is small and we don't have any VMs that must run 24/7 with absolutely no downtime so I don't mind having the VM down during a reboot if it's outside office hours. -
I normally install uptades on the pool master, shutdown VMs, reboot. Then i do the same procedure on pool members.
-
@CodeMercenary said in What's the recommended way to reboot after applying XCP-ng patches?:
In other words, can I just Install Pool Patches and then reboot the hosts starting with the master if I don't care if the VMs are shut down?
Yes