From owner-freebsd-xen@FreeBSD.ORG Thu Feb 2 23:19:55 2012 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07ECC106564A for ; Thu, 2 Feb 2012 23:19:55 +0000 (UTC) (envelope-from krichy@tvnetwork.hu) Received: from smtp-b.tvnetwork.hu (smtp-b.tvnetwork.hu [109.61.0.52]) by mx1.freebsd.org (Postfix) with SMTP id 4F49B8FC0C for ; Thu, 2 Feb 2012 23:19:53 +0000 (UTC) Received: (qmail 20145 invoked by uid 1001); 3 Feb 2012 00:19:51 +0100 Received: from 109.61.101.194 by smtp-b.tvnetwork.hu (envelope-from , uid 64011) with qmail-scanner-1.25st (clamdscan: 0.88.1/1396. spamassassin: 3.0.3. perlscan: 1.25st. Clear:RC:1(109.61.101.194):SA:0(-2.9/5.0):. Processed in 2.232753 secs); 02 Feb 2012 23:19:51 -0000 X-Spam-Status: No, hits=-2.9 required=5.0 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp-b.tvnetwork.hu X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Envelope-From: krichy@tvnetwork.hu Received: from unknown (HELO krichy.tvnetwork.hu) (109.61.101.194) by smtp-b.tvnetwork.hu with SMTP; 3 Feb 2012 00:19:49 +0100 Received: by krichy.tvnetwork.hu (Postfix, from userid 1000) id 2649A892; Fri, 3 Feb 2012 00:19:49 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by krichy.tvnetwork.hu (Postfix) with ESMTP id 219891E26; Fri, 3 Feb 2012 00:19:49 +0100 (CET) Date: Fri, 3 Feb 2012 00:19:49 +0100 (CET) From: Richard Kojedzinszky To: "Justin T. Gibbs" In-Reply-To: <0ECDE507-94CF-4330-ABCE-59F9079B46F9@scsiguy.com> Message-ID: References: <4F1FD67B.3080305@freebsd.org> <0ECDE507-94CF-4330-ABCE-59F9079B46F9@scsiguy.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-xen@freebsd.org Subject: Re: amd64 xen hvm shutdown X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Feb 2012 23:19:55 -0000 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 > To: Richard Kojedzinszky > Cc: Colin Percival , freebsd-xen@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