Offline host vm removal
-
Running xcp-ng 8.2, had a host drop offline due to a power supply issue. VM running on can't be "stopped" in XO.
I've tried Force reboot, Force Shutdown, stop, etc and I keep getting an error that the host is offline. I know this fact but I need to get rid of this not running anymore vm.
-
It's not an XO issue. Let me explain why
In fact, that's a Xen API protection. Let's imagine this slave host was just "cut" from the management network, but still connected on the shared storage.
In this situation, there's no way to be sure those VMs aren't really running. And if you could just force shutdown them from the master point of view, it means they could be started on your master (for example) while still running on the slave host. This will lead to VM disk corruption instantly.
In your case, you have to go with a VM reset power state, to tell XAPI to consider them halted regardless the unknown context (you are the only one to know your host is really down).
https://xcp-ng.org/docs/cli_reference.html#vm-reset-powerstate
-
That makes sense, thank you for explaining it to me.
Would it be possible to add an option in the advanced menu to do a state reset, it can even be labelled with a break glass and don't use unless you are sure type of thing.
Thanks again for explaining it to me.
-
It's not exposed in the UI right now indeed. I created the issue:
-
Thanks a bunch. Once on the commandline I was able to kill it as you pointed out.
All is good. How can I mark this solved?
-
I just did