What mechanism Hyper-V use to signal a Linux guest to gracefully shut down?
Somehow CoreOS does gracefully shut down, but another Linux doesn't (it is just abruptly powered off)
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
I figured it out.
kernel/reboot.c which subsequently fails to find
/sbin/poweroff and does only a minimal cleanup.
If i am not mistaken, Hyper v integration is what causes this. I have not used CoreOS but usually this is what causes your virtual server to shutdown correctly.
In terminal, issue the command lsmod. On CoreOS you will (if i am right) see that it lists Hyperv services(hv_vmbus, hv_netvsc, etc) on the other it does not. Some Linux distros come with it built in and others you can add it. If this is not it, comment below and i will delete this answer.
This does not answer your question as detailed, as you might want to know. I want to add this as an answer nonetheless, as the detailed technical answers comes close to be off-topic (non-supported environment).
You want to look at the documentation of Linux and FreeBSD Virtual Machines on Hyper-V on what distributions are supported. Check the section of the individual distribution and version and see, if the Core is supported.
With this feature, an administrator can shut down virtual machines from the Hyper-V Manager. For more information, see Operating system shutdown.
Source: Feature Descriptions for Linux and FreeBSD virtual machines on Hyper-V
If the distribution is not supported, it is not advised to use them in production. Even if there are ways to implement support on a non-listed distribution.