WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] shutdown question - PV vs HVM

To: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>, "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] shutdown question - PV vs HVM
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Sat, 6 Oct 2007 18:17:52 +1000
Delivery-date: Sat, 06 Oct 2007 01:18:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77D012499D8@trantor>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <AEC6C66638C05B468B556EA548C1A77D012499D7@trantor><C32BFF7C.1674D%Keir.Fraser@xxxxxxxxxxxx> <AEC6C66638C05B468B556EA548C1A77D012499D8@trantor>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcgDyFItoNtfu9ELRKK7OSZX/N5DVwAI4ycSANpj7lAAAEgCaQAk9k+QAAFl/lA=
Thread-topic: [Xen-devel] shutdown question - PV vs HVM
> > > If I understand the code correctly, as soon as I see the
> > > control/shutdown node appear, I should read it, and then write a
> blank
> > > string into it, which acknowledges the shutdown request and stops
> the
> > > forced shutdown. I should then give windows the shutdown or reboot
> > > command, depending on what I read from the xenstore node.
> > >
> > > Sound good?
> >
> > Yep, that sounds about right.
> >
> 
> Hmmm... I am writing a blank string into the shutdown node, but xen
> still performs the reboot about 30 seconds later... The blank string
is
> definitely getting written as I can do a xenstore-read from dom0 and
it
> shows blank.
> 
> The only thing I can see that is different is that linux does it in a
> transaction, while I don't. Would that make a difference?
> 

I implemented transactions, and it doesn't appear that having a
transaction makes a difference. The shutdown happens exactly 30 second
after I initiate the shutdown from dom0.

Looking at the code (XendDomainInfo), the only relevant hvm check that I
can see is:

"
# HVM domain shuts itself down only if it has PV drivers
if self.info.is_hvm():
  hvm_pvdrv = xc.hvm_get_param(self.domid, HVM_PARAM_CALLBACK_IRQ)
  if not hvm_pvdrv:
    code = REVERSE_DOMAIN_SHUTDOWN_REASONS[reason]
    log.info("HVM save:remote shutdown dom %d!", self.domid)
    xc.domain_shutdown(self.domid, code)
"

And xend is obviously detecting my PV drivers successfully... the
following gets logged in xend.log:

"
[2007-10-06 18:06:55 4240] DEBUG (__init__:1072)
XendDomainInfo.shutdown(reboot)
[2007-10-06 18:06:55 4240] DEBUG (__init__:1072)
XendDomainInfo.handleShutdownWatch
[2007-10-06 18:06:55 4240] DEBUG (__init__:1072)
XendDomainInfo.handleShutdownWatch
[2007-10-06 18:07:25 4240] INFO (__init__:1072) Domain shutdown timeout
expired: name=virtdemo id=61
[2007-10-06 18:07:25 4240] DEBUG (__init__:1072) XendDomainInfo.destroy:
domid=61
[2007-10-06 18:07:25 4240] DEBUG (__init__:1072)
XendDomainInfo.destroyDomain(61)
"

Do I need to do something to shutdown_start_time to give me more time to
do the shutdown? I can't see that in 'xenstore-ls', and the only
reference to it is in XendDomainInfo...

The only other thing I can think of is that I need to tell xend that I
am shutting down the domain, and that writing a blank string to
control/shutdown isn't what is required...

Any suggestions?

Thanks

James


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel