siderolabs / extensions

Talos Linux System Extensions
Mozilla Public License 2.0
104 stars 105 forks source link

QEMU guest agent shutdown command leads to restart instead of shutdown (in maintenance mode) #367

Open hamannju opened 4 months ago

hamannju commented 4 months ago

Hello, I'm currently testing Talos Linux (1.6.7) on Proxmox VE (8.1.4, latest). I created a virtual machine using an ISO image from https://factory.talos.dev. The only added extension is the qemu-guest-agent extension (8.1.3).

I've booted up the machine in maintenance mode and the status information including IP address etc. shows up correctly on the Proxmox UI. However, if I issue a shutdown command using the qemu-guest-agent, the Talos VM shuts down correctly but then immediately restarts. After booting up again the qemu-guest-agent seems not be running anymore. While this happens the task in the Proxmox UI never returns until it eventually times out.

The expected behavior would be that after the shutdown command is issued, the machine actually shuts down and stays off. I have not yet tested the behavior after applying a machine configuration but I will try that next.

smira commented 4 months ago

Issues should contain all applicable logs - for Talos, it should be full kernel log (serial console logs).

Please keep in mind that Proxmox and qemu-guest-agent are community supported (mostly).

If you don't have an extension running, most probably you're booting Talos from a different media which doesn't contain that extension anymore. Talos logs on boot for each extension activated.

hamannju commented 4 months ago

I dug in a little bit more and first confirmed that I am running off of the iso. The guest agent actually does restart upon reboot, it just takes a while after the shutdown timeout and a UI reload for Proxmox to show the data again. Once I figure out how to pull the logs I will add those in later.

I then applied a configuration to the node and after that I retried the shutdown command using the qemu-guest-agent and it works correctly. So this issue only affects maintenance mode.