rancher / k3os

Purpose-built OS for Kubernetes, fully managed by Kubernetes.
https://k3os.io
Apache License 2.0
3.5k stars 396 forks source link

Unable to shutdown k3os by using 'shutdown' in PVE #773

Closed zhengcan closed 2 years ago

zhengcan commented 2 years ago

Version (k3OS / kernel) k3os version v0.20.11-k3s1r1 5.4.0-84-generic rancher/k3os#94 SMP Sun Sep 19 04:06:53 UTC 2021

Architecture x86_64

Describe the bug I'm using Proxmox Virtual Environment (PVE) to manage k3os. When I try to shutdown k3os by using "shutdown" menu of PVE, the k3os doesn't shutdown as expected. It still running as well. I'm not sure whether k3os had integrated acpid.

To Reproduce Click "shutdown" in PVE

Expected behavior The k3os had been gracefully shutdown.

Actual behavior The k3os ignore the event.

Additional context n/a

dweomer commented 2 years ago

If the default configuration for the QEMU Guest Agent is off for your setup it will just stop running. Take a look at /var/log/qemu-ga.log for some hints at what might be going wrong. Additionally, take a look at /etc/init.d/qemu-guest-agent to see what values it defaults to. You may attempt to run it yourself in the foreground to get a better idea of what is failing.

dweomer commented 2 years ago

This works:

# /var/lib/rancher/k3os/config.yaml
run_cmd:
- rc-service udev-trigger start

Screenshot from 2021-10-22 01-33-07