提交 ff86b0c9 编写于 作者: E Eric Blake

virsh: add aliases 'boot', 'stop', and 'restart'

https://bugzilla.redhat.com/show_bug.cgi?id=873344 suggested that
the grouping 'boot', 'shutdown', 'reboot'; as well as the grouping
'start', 'stop', 'restart'; might be easier to remember than the
current mix of 'start', 'shutdown', 'reboot'.

Also, touch up the wording of 'reboot' to be more accurate.

* tools/virsh-domain.c (domManagementCmds): Add other command names.
* tools/virsh.pod (start, shutdown, reboot): Document the aliases.
上级 fb58f8e2
...@@ -8298,6 +8298,7 @@ const vshCmdDef domManagementCmds[] = { ...@@ -8298,6 +8298,7 @@ const vshCmdDef domManagementCmds[] = {
{"blockjob", cmdBlockJob, opts_block_job, info_block_job, 0}, {"blockjob", cmdBlockJob, opts_block_job, info_block_job, 0},
{"blockpull", cmdBlockPull, opts_block_pull, info_block_pull, 0}, {"blockpull", cmdBlockPull, opts_block_pull, info_block_pull, 0},
{"blockresize", cmdBlockResize, opts_block_resize, info_block_resize, 0}, {"blockresize", cmdBlockResize, opts_block_resize, info_block_resize, 0},
{"boot", cmdStart, opts_start, info_start, 0},
{"change-media", cmdChangeMedia, opts_change_media, info_change_media, 0}, {"change-media", cmdChangeMedia, opts_change_media, info_change_media, 0},
#ifndef WIN32 #ifndef WIN32
{"console", cmdConsole, opts_console, info_console, 0}, {"console", cmdConsole, opts_console, info_console, 0},
...@@ -8351,6 +8352,7 @@ const vshCmdDef domManagementCmds[] = { ...@@ -8351,6 +8352,7 @@ const vshCmdDef domManagementCmds[] = {
{"numatune", cmdNumatune, opts_numatune, info_numatune, 0}, {"numatune", cmdNumatune, opts_numatune, info_numatune, 0},
{"reboot", cmdReboot, opts_reboot, info_reboot, 0}, {"reboot", cmdReboot, opts_reboot, info_reboot, 0},
{"reset", cmdReset, opts_reset, info_reset, 0}, {"reset", cmdReset, opts_reset, info_reset, 0},
{"restart", cmdReboot, opts_reboot, info_reboot, 0},
{"restore", cmdRestore, opts_restore, info_restore, 0}, {"restore", cmdRestore, opts_restore, info_restore, 0},
{"resume", cmdResume, opts_resume, info_resume, 0}, {"resume", cmdResume, opts_resume, info_resume, 0},
{"save", cmdSave, opts_save, info_save, 0}, {"save", cmdSave, opts_save, info_save, 0},
...@@ -8367,6 +8369,7 @@ const vshCmdDef domManagementCmds[] = { ...@@ -8367,6 +8369,7 @@ const vshCmdDef domManagementCmds[] = {
{"setvcpus", cmdSetvcpus, opts_setvcpus, info_setvcpus, 0}, {"setvcpus", cmdSetvcpus, opts_setvcpus, info_setvcpus, 0},
{"shutdown", cmdShutdown, opts_shutdown, info_shutdown, 0}, {"shutdown", cmdShutdown, opts_shutdown, info_shutdown, 0},
{"start", cmdStart, opts_start, info_start, 0}, {"start", cmdStart, opts_start, info_start, 0},
{"stop", cmdShutdown, opts_shutdown, info_shutdown, 0},
{"suspend", cmdSuspend, opts_suspend, info_suspend, 0}, {"suspend", cmdSuspend, opts_suspend, info_suspend, 0},
{"ttyconsole", cmdTTYConsole, opts_ttyconsole, info_ttyconsole, 0}, {"ttyconsole", cmdTTYConsole, opts_ttyconsole, info_ttyconsole, 0},
{"undefine", cmdUndefine, opts_undefine, info_undefine, 0}, {"undefine", cmdUndefine, opts_undefine, info_undefine, 0},
......
...@@ -1124,11 +1124,14 @@ If I<--config> is specified, affect the next boot of a persistent guest. ...@@ -1124,11 +1124,14 @@ If I<--config> is specified, affect the next boot of a persistent guest.
If I<--current> is specified, affect the current guest state. If I<--current> is specified, affect the current guest state.
=item B<reboot> I<domain> [I<--mode acpi|agent>] =item B<reboot> I<domain> [I<--mode acpi|agent>]
=item B<restart> I<domain> [I<--mode acpi|agent>]
Reboot a domain. This acts just as if the domain had the B<reboot> Restart a domain. Depending on the hypervisor, this may request a
command run from the console. The command returns as soon as it has shutdown followed by a fresh boot, rather than triggering a software
executed the reboot action, which may be significantly before the reboot. The command returns as soon as it has requested the reboot
domain actually reboots. action, and depending on the guest, there may be a significant delay
before the domain actually reboots, or the request might even be
ignored.
The exact behavior of a domain when it reboots is set by the The exact behavior of a domain when it reboots is set by the
I<on_reboot> parameter in the domain's XML definition. I<on_reboot> parameter in the domain's XML definition.
...@@ -1523,6 +1526,7 @@ be hot-plugged the next time the domain is booted. As such, it must only be ...@@ -1523,6 +1526,7 @@ be hot-plugged the next time the domain is booted. As such, it must only be
used with the I<--config> flag, and not with the I<--live> flag. used with the I<--config> flag, and not with the I<--live> flag.
=item B<shutdown> I<domain> [I<--mode acpi|agent>] =item B<shutdown> I<domain> [I<--mode acpi|agent>]
=item B<stop> I<domain> [I<--mode acpi|agent>]
Gracefully shuts down a domain. This coordinates with the domain OS Gracefully shuts down a domain. This coordinates with the domain OS
to perform graceful shutdown, so there is no guarantee that it will to perform graceful shutdown, so there is no guarantee that it will
...@@ -1543,6 +1547,8 @@ can specify C<acpi> or C<agent>. ...@@ -1543,6 +1547,8 @@ can specify C<acpi> or C<agent>.
=item B<start> I<domain-name-or-uuid> [I<--console>] [I<--paused>] =item B<start> I<domain-name-or-uuid> [I<--console>] [I<--paused>]
[I<--autodestroy>] [I<--bypass-cache>] [I<--force-boot>] [I<--autodestroy>] [I<--bypass-cache>] [I<--force-boot>]
=item B<boot> I<domain-name-or-uuid> [I<--console>] [I<--paused>]
[I<--autodestroy>] [I<--bypass-cache>] [I<--force-boot>]
Start a (previously defined) inactive domain, either from the last Start a (previously defined) inactive domain, either from the last
B<managedsave> state, or via a fresh boot if no managedsave state is B<managedsave> state, or via a fresh boot if no managedsave state is
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册