diff --git a/src/util/virnodesuspend.c b/src/util/virnodesuspend.c index 71beb3d7a1666671337c5b98ff464097e467aec1..91dfdf6355d0b188da034c599ea3b58e4980a4d0 100644 --- a/src/util/virnodesuspend.c +++ b/src/util/virnodesuspend.c @@ -90,7 +90,7 @@ static int virNodeSuspendSetNodeWakeup(unsigned long long alarmTime) virCommandPtr setAlarmCmd; int ret = -1; - if (alarmTime <= MIN_TIME_REQ_FOR_SUSPEND) { + if (alarmTime < MIN_TIME_REQ_FOR_SUSPEND) { virReportError(VIR_ERR_INVALID_ARG, "%s", _("Suspend duration is too short")); return -1; } diff --git a/tools/virsh-host.c b/tools/virsh-host.c index 52e8252ad20490b36c6d751a259bd9d9b9278019..98d9e62d7489123c917cc26a6657780d1f6340e0 100644 --- a/tools/virsh-host.c +++ b/tools/virsh-host.c @@ -465,7 +465,7 @@ static const vshCmdInfo info_nodesuspend[] = { static const vshCmdOptDef opts_node_suspend[] = { {"target", VSH_OT_DATA, VSH_OFLAG_REQ, N_("mem(Suspend-to-RAM), " "disk(Suspend-to-Disk), hybrid(Hybrid-Suspend)")}, - {"duration", VSH_OT_INT, VSH_OFLAG_REQ, N_("Suspend duration in seconds")}, + {"duration", VSH_OT_INT, VSH_OFLAG_REQ, N_("Suspend duration in seconds, at least 60")}, {"flags", VSH_OT_INT, VSH_OFLAG_NONE, N_("Suspend flags, 0 for default")}, {NULL, 0, 0, NULL} }; diff --git a/tools/virsh.pod b/tools/virsh.pod index fa98e3546312a8fe214cf42ada58cc3a13935413..35613c4c45e0ea876bcbb559c9ec93af49312a21 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -289,7 +289,8 @@ If I is specified, this will prints specified cell statistics only. Puts the node (host machine) into a system-wide sleep state such as Suspend-to-RAM, Suspend-to-Disk or Hybrid-Suspend and sets up a Real-Time-Clock interrupt to fire (to wake up the node) after a time delay -specified by the 'duration' parameter. +specified by the 'duration' parameter. The duration time should be +at least 60 seconds. =item B