Mailing List Archive

Cleanly shutdown server
Hi,

Our Dev Server has to be shutdown every night (sadly not up for discussion)
as it's in the main office. I can cleanly and easily do this from XenCenter
without issues, but a few times now I've shutdown my PC before I remembered.

Is there a command or set of commands I can pass to cleanly shutdown the
running VM(s) and halt the server once they are stopped? I would like to,
if at all possible, assign it to the power button using the acpi tools.

--

Mark Benson
Re: Cleanly shutdown server [ In reply to ]
On Fri, 28 Nov 2014 16:18 Olivier Lambert <lambert.olivier@gmail.com>
wrote:

If I'm right, you could do it by logging on the server (SSH or access
it directly), and type "halt". It should shutdown the VMs gracefully
then stop itself. You could also automate this stuff with a CRON job
in the XenServer, or also send the command with "xo-cli" ("xo-cli
host.stop id=<id of your host>") from any machine using Xen Orchestra.



I use xapi (hence posting here), does that still hold true with xapi?

I don't use XenOrchestra so xo-cli is not available. Is there an xe command
or set of commands to do it?

--

Mark Benson
Re: Cleanly shutdown server [ In reply to ]
If you have SSH/console access to the Dom0 of XenServer itself, "halt"
is enough, no need to use "xe" (if the host in alone, i.e not in a
pool. In this case, I think using "xe" is better).

On Fri, Nov 28, 2014 at 5:26 PM, Mark Benson <md.benson@gmail.com> wrote:
>
> On Fri, 28 Nov 2014 16:18 Olivier Lambert <lambert.olivier@gmail.com> wrote:
>
> If I'm right, you could do it by logging on the server (SSH or access
> it directly), and type "halt". It should shutdown the VMs gracefully
> then stop itself. You could also automate this stuff with a CRON job
> in the XenServer, or also send the command with "xo-cli" ("xo-cli
> host.stop id=<id of your host>") from any machine using Xen Orchestra.
>
>
>
> I use xapi (hence posting here), does that still hold true with xapi?
>
> I don't use XenOrchestra so xo-cli is not available. Is there an xe command
> or set of commands to do it?
>
> --
>
> Mark Benson

_______________________________________________
Xen-api mailing list
Xen-api@lists.xen.org
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
Re: Cleanly shutdown server [ In reply to ]
Following up from this, if I use a 'halt -p' the system halts but does not
power down. It spews a lot of blktap errors to the dom0 local console
*after* it stops the dom0 daemons and prints "will now halt".

The upshot is the system isn't powering off and I suspect it's not pullung
down Xen cleanly either.

--

Mark

On Fri, 28 Nov 2014 16:52 Olivier Lambert <lambert.olivier@gmail.com> wrote:

> If you have SSH/console access to the Dom0 of XenServer itself, "halt"
> is enough, no need to use "xe" (if the host in alone, i.e not in a
> pool. In this case, I think using "xe" is better).
>
> On Fri, Nov 28, 2014 at 5:26 PM, Mark Benson <md.benson@gmail.com> wrote:
> >
> > On Fri, 28 Nov 2014 16:18 Olivier Lambert <lambert.olivier@gmail.com>
> wrote:
> >
> > If I'm right, you could do it by logging on the server (SSH or access
> > it directly), and type "halt". It should shutdown the VMs gracefully
> > then stop itself. You could also automate this stuff with a CRON job
> > in the XenServer, or also send the command with "xo-cli" ("xo-cli
> > host.stop id=<id of your host>") from any machine using Xen Orchestra.
> >
> >
> >
> > I use xapi (hence posting here), does that still hold true with xapi?
> >
> > I don't use XenOrchestra so xo-cli is not available. Is there an xe
> command
> > or set of commands to do it?
> >
> > --
> >
> > Mark Benson
>