]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Support reboot command in guest
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Thu, 10 Jul 2025 07:21:19 +0000 (03:21 -0400)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 25 Jul 2025 10:36:11 +0000 (11:36 +0100)
commit312c3afa48936c7a9676408abdd5a44cb9ad2baa
tree2c54e2e3be5c277e11795bce4d7c709e2295e65a
parent4f733348212b3bb4de491aeaab4ac32f0335673d
qemu: Support reboot command in guest

We can reboot a TDX guest with 'virsh reboot' or 'virsh shutdown' if action
for onPoweroff is 'restart'. But running reboot command in guest shell will
always lead to shutdown.

This behavior is not consistent with normal guest, fix it by checking
shutdown reason and action configuration to trigger FakeReboot.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c