amd64 xen hvm shutdown

Richard Kojedzinszky krichy at tvnetwork.hu
Thu Feb 2 23:19:55 UTC 2012


Dear Justin,

Thanks for your help.

You gave me a clue, where to look for the problem. In short,
$ xm shutdown
issues a poweroff to the control/shutdown node, but with the default 
debian scripts, /etc/init.d/xendomains issues
$ xm shutdown --halt
which sends halt instead of a poweroff. So I was blind to skip that 
argument to xm shutdown, or I did not gave enough attention for it, as 
a linux pv guest halts/powers itself off for either. Its freebsd's feature 
to be able to halt only, and the script does this exactly.

On the other way, xen's documentation does not mention much about the 
--halt option, and the behaviour without that given.

So to be short, and maybe useful for others, who host freebsd hvm with pv 
drivers on debian, to remove the "--halt" options from variables in 
/etc/default/xendomains

At least for me, with this, my linux pv, freebsd pv, and freebsd hvm 
domains do a nice poweroff upon a host reboot/halt.

Many thanks for giving that clue.

Regards,

Kojedzinszky Richard
Euronet Magyarorszag Informatikai Zrt.

On Thu, 2 Feb 2012, Justin T. Gibbs wrote:

> Date: Thu, 2 Feb 2012 14:37:38 -0700
> From: Justin T. Gibbs <gibbs at scsiguy.com>
> To: Richard Kojedzinszky <krichy at tvnetwork.hu>
> Cc: Colin Percival <cperciva at freebsd.org>, freebsd-xen at freebsd.org
> Subject: Re: amd64 xen hvm shutdown
> 
> On Feb 2, 2012, at 12:31 PM, Richard Kojedzinszky wrote:
>
>> Dear users,
>>
>> I am trying to compare the 8.2 i386 PV mode and 9.0 amd64 hvm mode, regarding
>>
>> $ xm shutdown
>>
>> from outside.
>>
>> While 8.2 PV shuts down well, 9.0 hvm does not. Is it an issue of the xen hypervisor, or of freebsd?
>>
>> What experience do others have?
>
> If you are using a FreeBSD amd64 kernel with Xen PV drivers installed, shutdown behavior is controlled
> by the PV "control" driver.  This driver notices updates to the "control/shutdown" node in the XenStore and
> is supposed to act accordingly.  For a reboot or power off event, it simply calls
> shutdown_nice(RB_POWEROFF|RB_HALT), or shutdown_nice(0) as appropriate.  If you can capture the
> value of the shutdown node in the XenStore, it should be pretty easy to debug this.
>
> --
> Justin


More information about the freebsd-xen mailing list