Restart VM after SR available
-
Preface: This system is my homelab and is only production in the sense that it runs my house.
I am cursed to live in a city that has occasional power outage that last more than my UPS can handle. At this point the whole system shuts down.... and my locally purchased UPS doesn't support NUT or anything like it. I'm looking at ways to solve this with a raspberry pi that is powered by two sources and will host NUT... it's a work in progress.
All of my VMS are hosted on an NFS share that is much slower to boot than my XCP-ng hosts are and then the VMS never boot up even though they are set to Auto Power On.
I see there is a start delay but is there a way to have it not boot UNTIL the SR is available?
Thanks a bunch.
-
I think I remember this kind of question few years ago
So I'm not entirely sure, but I think XCP-ng boot phase isn't complete until all SR are connected. But I have no idea how often SMAPI will try to reconnect until it's up.
-
I understand it shouldn't really be needed but.... it is for me.
-
@cyrus104 You could change the grub boot delay on your XCP-ng host, so that your host waits longer. Let's say your SR is savely available after 60s, you could set the boot delay to 70s.
-
I'm using TrueNAS for my NFS SR and I searching for a way to control the IPMI/BMC of my XCP-ng hosts. That way once the storage finishes booting, it could send an command to boot the three XCP-ng hosts.
Something like this could be done with wake on lan but I have IPMI and it's always on and more reliable.
-
@cyrus104 That makes sence. Depending on the IPMI/BMC, you could add an
ipmitool -I lanplus -H [Host IP] -U admin -P [admin password] power on
for each XCP-ng host into the TrueNAS Init/Shutdown Scripts settings, if your hosts supportipmitool
. -
That's a great idea, I'm hesitant to try it while the system is already on. It should just see the power is on already and ignore it... I was able to get it to work with the power status command for testing.
Thanks!
-
@gskger, supermicro requires -I open as they don't support RMCP+.