Bart Coninckx
2011-Oct-28 16:30 UTC
[Xen-users] kernel module responsible for a graceful shutdown in a HVM guest
Hi, I''m running an Ubuntu HVM on a SLES Dom0 and an xm shutdown just destroys the HVM DomU. I figured out from googling that I need to recompile the kernel to have the Xen PV drivers included, but what exact driver/module is responsible for the clean shutdown? I''m expecting some "why don''t you use PV''s", so I better say now already that I do understand that a PV DomU would fix this, but we simply need HVM, thx!! B. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Florian Heigl
2011-Oct-30 21:03 UTC
Re: [Xen-users] kernel module responsible for a graceful shutdown in a HVM guest
Hi, 2011/10/28 Bart Coninckx <bart.coninckx@telenet.be>:> Hi, > > I''m running an Ubuntu HVM on a SLES Dom0 and an xm shutdown just destroys > the HVM DomU. > > I figured out from googling that I need to recompile the kernel to have the > Xen PV drivers included, but what exact driver/module is responsible for the > clean shutdown? > > I''m expecting some "why don''t you use PV''s", so I better say now already > that I do understand that a PV DomU would fix this, but we simply need HVM,I''ll save you that comment, I''ve gone through the same with FreeBSD domUs. :) xm trigger domU-ID power should send an ACPI Power Button event to the domU. You might point out that this isn''t called by the xendomains script. That''s correct and I cannot explain it because when I think about it I always start banging my head. Ouch, Florian _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Bart Coninckx
2011-Oct-30 21:32 UTC
Re: [Xen-users] kernel module responsible for a graceful shutdown in a HVM guest
On 10/30/11 22:03, Florian Heigl wrote:> Hi, > > 2011/10/28 Bart Coninckx<bart.coninckx@telenet.be>: >> Hi, >> >> I''m running an Ubuntu HVM on a SLES Dom0 and an xm shutdown just destroys >> the HVM DomU. >> >> I figured out from googling that I need to recompile the kernel to have the >> Xen PV drivers included, but what exact driver/module is responsible for the >> clean shutdown? >> >> I''m expecting some "why don''t you use PV''s", so I better say now already >> that I do understand that a PV DomU would fix this, but we simply need HVM, > > I''ll save you that comment, I''ve gone through the same with FreeBSD domUs. :) > > xm trigger domU-ID power > > should send an ACPI Power Button event to the domU. > You might point out that this isn''t called by the xendomains script. > That''s correct and I cannot explain it because when I think about it I > always start > banging > my > head. > > Ouch, > Florian:-) Thx Florian. The "xm shutdown" unfortunately is issued by Pacemaker, so I don''t really have the option to shut it down like you suggest. Back to PV drivers then? B. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Bart Coninckx
2011-Oct-31 20:40 UTC
Re: [Xen-users] kernel module responsible for a graceful shutdown in a HVM guest
On 10/30/11 22:03, Florian Heigl wrote:> Hi, > > 2011/10/28 Bart Coninckx<bart.coninckx@telenet.be>: >> Hi, >> >> I''m running an Ubuntu HVM on a SLES Dom0 and an xm shutdown just destroys >> the HVM DomU. >> >> I figured out from googling that I need to recompile the kernel to have the >> Xen PV drivers included, but what exact driver/module is responsible for the >> clean shutdown? >> >> I''m expecting some "why don''t you use PV''s", so I better say now already >> that I do understand that a PV DomU would fix this, but we simply need HVM, > > I''ll save you that comment, I''ve gone through the same with FreeBSD domUs. :) > > xm trigger domU-ID power > > should send an ACPI Power Button event to the domU. > You might point out that this isn''t called by the xendomains script. > That''s correct and I cannot explain it because when I think about it I > always start > banging > my > head. > > Ouch, > FlorianHi, Any other ideas besides the suggestion of this helpful sir? thx, B. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Florian Heigl
2011-Nov-01 01:36 UTC
Re: [Xen-users] kernel module responsible for a graceful shutdown in a HVM guest
Hi, 2011/10/31 Bart Coninckx <bart.coninckx@telenet.be>:> Any other ideas besides the suggestion of this helpful sir?Fix the pacemaker OCF script from Pacemaker to use the triggers for HVM domU and commit it back to the OCF people. This will help everyone. Even "grownup" cluster software like Veritas will not come with ressource agents that do this out correctly of the box. Florian -- the purpose of libvirt is to provide an abstraction layer hiding all xen features added since 2006 until they were finally understood and copied by the kvm devs. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Bart Coninckx
2011-Nov-01 08:14 UTC
Re: [Xen-users] kernel module responsible for a graceful shutdown in a HVM guest
On 11/01/11 02:36, Florian Heigl wrote:> Hi, > > 2011/10/31 Bart Coninckx<bart.coninckx@telenet.be>: >> Any other ideas besides the suggestion of this helpful sir? > > Fix the pacemaker OCF script from Pacemaker to use the triggers for > HVM domU and commit it back to the OCF people. > This will help everyone. > > Even "grownup" cluster software like Veritas will not come with > ressource agents that do this out correctly of the box. > > Florian >Hi Florian, I actually thought about this, and if it''s the only option, we''ll go for that one. Two possible problems with it though: - RPM updates will destroy the change - The RA should not be changed for PV domains (which now there are not). There are however also Windows DomU with GPLPV drivers. Not sure what this shutdown does to them. I think I will "fix" these two issues by simply copying the RA to a second name. Anyway, I will test your suggestion, thx again! B. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Bart Coninckx
2011-Nov-01 09:37 UTC
Re: [Xen-users] kernel module responsible for a graceful shutdown in a HVM guest
On 11/01/11 02:36, Florian Heigl wrote:> Hi, > > 2011/10/31 Bart Coninckx<bart.coninckx@telenet.be>: >> Any other ideas besides the suggestion of this helpful sir? > > Fix the pacemaker OCF script from Pacemaker to use the triggers for > HVM domU and commit it back to the OCF people. > This will help everyone. > > Even "grownup" cluster software like Veritas will not come with > ressource agents that do this out correctly of the box. > > Florian >OK, I tested this by creating a new RA with the "xm shutdown $dom" command in xen_domain_stop replaced by "xm trigger $dom power". This works flawlessly provided you have acpid running in the DomU. In order for a commit to the OCF people to be useful, I need to test a couple more things: 1. will this work too with Windows DomUs (to be tested) 2. can the RA detect before a shutdown that this is a HVM guest and then change the shutdown behaviour 3. most importantly: can the RA script check that there is a acpi daemon listening for accepting these shutdown requests. If not the stop will fail, triggering unwanted behaviour. I hope to be able to dedicate some time to this in order to commit something sensible. In the meantime I just copy the RA script. If anyone has ideas for 3. , most welcome, B. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users