Hi all,

Is there any possibility (using libvirt C API or whatever else) to "propagate" shutdown events (reboot, halt, power off) to a host? The API seems to lack this functionality - there exists function virConnectDomainEventRegisterAny, but the virDomainEventStoppedDetailType enum does not distinguish between these 3 different situations.

Moreover, while rebooting a machine, an additional argument can be passed to reboot() syscall, which will be used by bootloader during the startup. Ideally, when calling e.g. "reboot recovery" inside an lxc container I'd like to be informed (inside host) that "reboot" was called with "recovery" as additional argument, so I can take appropriate actions.

 

Thanks in advance.

 

Best regards,

Michal