KVM virsh reboot example

reboot domain [--mode MODE-LIST]

Reboot a domain. This acts just as if the domain had the reboot command run from the console. The command returns as soon as it has executed the reboot action, which may be significantly before the domain actually reboots.

The exact behavior of a domain when it reboots is set by the on_reboot parameter in the domain's XML definition.

By default the hypervisor will try to pick a suitable shutdown method. To specify an alternative method, the --mode parameter can specify a comma separated list which includes "acpi", "agent", "initctl", "signal" and "paravirt". The order in which drivers will try each mode is undefined, and not related to the order specified to virsh. For strict control over ordering, use a single mode at a time and repeat the command.

1
2
3
4
5
6
7
8
9
# virsh reboot fedora-27                         
Domain fedora-27 is being rebooted

# virsh reboot fedora-27 --mode acpi
Domain fedora-27 is being rebooted

# virsh reboot fedora-27 --mode signal  # signal reboot doesn't work for me
error: Failed to reboot domain fedora-27
error: unsupported flags (0x8) in function qemuDomainReboot
Edit
Pub: 02 Jan 2018 09:28 UTC
Views: 489