On Fri, Jan 25, 2019 at 02:31:49PM +0100, Michal Privoznik wrote:
If the container is really a simple one (init is just bash and
the whole root is passed through) then virDomainReboot and
virDomainShutdown will talk to the actual init within the host.
Therefore, 'virsh shutdown $dom' will result in shutting down the
host. True, at that point the container is shut down too but
Nevertheless, it's hilarious :).
looks a bit harsh to me.
The solution is to check if the init inside the container is or
is not the same as the init running on the host.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
I'll trust you tried it, code-wise, I don't see an issue, it's pretty
straightforward.
Reviewed-by: Erik Skultety <eskultet(a)redhat.com>