If I do an xm shutdown or shutdown from within domU I get a graceful shutdown. If I shutdown dom0 the guests are just getting "killed". Is there a way to make dom0 shut down the domUs more gracefully? I haven''t seen any ill effects yet, but I assume a graceful shutdown would be better in any case. Documentation at http://tx.downloads.xensource.com/downloads/docs/user/#SECTION022300000000 00000000 says that xendomains would do this. However, I can''t see that it does. I also see these explanations in man xmdomain.cfg (which don''t seem to apply to the situation above, I''m just asking about one option): on_shutdown Triggered on either an xm shutdown or graceful shutdown from inside the DomU. on_reboot Triggered on either an xm reboot or graceful reboot from inside the DomU. on_crash Triggered when a DomU goes to the crashed state for any reason. However, in my original config files created with virt-manager quite some time ago I have on_poweroff Is on_poweroff valid anymore? Or is on_shutdown maybe wrong documentation? Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
What distro are you using, and is it their xen package or one from source? I probably won''t be much help, but that will probably be important information to anyone who is. I run F8 with the F8 Xen, and when I shut down, a python error/incompatibility (I think) causes the xendomains service to stop without shutting down the domUs (when xendomains is stopped on a properly functioning system, it will shut them down or kill them one at a time based on the config). However, in my case, xendomains may not actually be stopping at this point, because when killall is called, the domains each shut down one at a time like they are supposed to de when xendomains is stopped (but since this is supposed to happen way earlier, it probably wouldn''t work right if I were using file-backed virtual disks instead of device-backed virtual disks because the mounted filesystems are read-only by the time killall is called). Dustin -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Kai Schaetzl Sent: Monday, August 04, 2008 13:03 To: xen-users@lists.xensource.com Subject: [Xen-users] dom0 and domU shutdown behavior If I do an xm shutdown or shutdown from within domU I get a graceful shutdown. If I shutdown dom0 the guests are just getting "killed". Is there a way to make dom0 shut down the domUs more gracefully? I haven''t seen any ill effects yet, but I assume a graceful shutdown would be better in any case. Documentation at http://tx.downloads.xensource.com/downloads/docs/user/#SECTION022300000000 00000000 says that xendomains would do this. However, I can''t see that it does. I also see these explanations in man xmdomain.cfg (which don''t seem to apply to the situation above, I''m just asking about one option): on_shutdown Triggered on either an xm shutdown or graceful shutdown from inside the DomU. on_reboot Triggered on either an xm reboot or graceful reboot from inside the DomU. on_crash Triggered when a DomU goes to the crashed state for any reason. However, in my original config files created with virt-manager quite some time ago I have on_poweroff Is on_poweroff valid anymore? Or is on_shutdown maybe wrong documentation? Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Aug 4, 2008 at 7:03 PM, Kai Schaetzl <maillists@conactive.com> wrote:> If I do an xm shutdown or shutdown from within domU I get a graceful > shutdown. If I shutdown dom0 the guests are just getting "killed". Is > there a way to make dom0 shut down the domUs more gracefully? > I haven''t seen any ill effects yet, but I assume a graceful shutdown would > be better in any case. > > Documentation at > http://tx.downloads.xensource.com/downloads/docs/user/#SECTION022300000000 > 00000000 > says that xendomains would do this. However, I can''t see that it does. > > I also see these explanations in man xmdomain.cfg (which don''t seem to > apply to the situation above, I''m just asking about one option): > > on_shutdown > Triggered on either an xm shutdown or graceful shutdown from inside > the DomU. > > on_reboot > Triggered on either an xm reboot or graceful reboot from inside the > DomU. > > on_crash > Triggered when a DomU goes to the crashed state for any reason. > > However, in my original config files created with virt-manager quite some > time ago I have > > on_poweroff > > Is on_poweroff valid anymore? Or is on_shutdown maybe wrong documentation? > > Kai > > -- > Kai Schätzl, Berlin, Germany > Get your web at Conactive Internet Services: http://www.conactive.comYeah, I had similar experience with Ubuntu 8.04. But I had Heartbeat controlling the shutdown and from within the heartbeat init-script I called the xendomains resource script. So I didn''t have xendomains running directly at boot/shutdown. To resolve it I had to add a sleep command in the heartbeat init-script to make it wait for the domains to shutdown before continuing with the Dom0 shutdown. Which dist are you running? //Daniel _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Daniel Asplund wrote on Mon, 4 Aug 2008 23:26:29 +0200:> Yeah, I had similar experience with Ubuntu 8.04. > But I had Heartbeat controlling the shutdown and from within the > heartbeat init-script I called the xendomains resource script. So I > didn''t have xendomains running directly at boot/shutdown. > > To resolve it I had to add a sleep command in the heartbeat > init-script to make it wait for the domains to shutdown before > continuing with the Dom0 shutdown.Thanks, I will check later what happens with xendomains when I shutdown. I didn''t take it into account at all until now.> > Which dist are you running?This is CentOS 5.2 but with the Xen files from 3.2.0 and 3.2.1. Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Dustin Henning wrote on Mon, 4 Aug 2008 16:01:25 -0400:> I run F8 with the F8 Xen, and when I shut down, a python > error/incompatibility (I think) causes the xendomains service to stop > without shutting down the domUs (when xendomains is stopped on a properly > functioning system, it will shut them down or kill them one at a time based > on the config).I didn''t think about xendomains. I just restarted it on a machine with one guest, result: service xendomains restart Shutting down Xen domains: news(save)../etc/init.d/xendomains: line 280: 2455 Terminated watchdog_xm save /etc/init.d/xendomains: line 318: 2455 Terminated watchdog_xm save Restoring Xen domains: news. Starting auto Xen domains: news(skip) - domU didn''t go down, that''s actually not so bad. service xendomains stop Shutting down Xen domains: news(save)../etc/init.d/xendomains: line 280: 2927 Terminated watchdog_xm save /etc/init.d/xendomains: line 318: 2927 Terminated watchdog_xm save Xendomains seems to save and restore the domain. It does that no matter of the domain in in /etc/xen/auto or not. At least if there is no reboot of the machine in-between. I''m not so sure about what happens if the machine gets rebooted. In the past (without a /etc/xen/auto link) sometimes I found it got started, sometimes not. I would rather prefer that it shuts down completely and gracefully, but that it at least saves the VM is better than nothing. This is without the domain being "xen managed". Is there any difference if it is "xen managed" (you start with "xm start" instead of "create")? Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I always use /etc/xen/auto, so that is the equivalent of an xm create or xm restore at bootup (depending on whether or not there was a save at shutdown). At shutdown, it is like an xm save or xm shutdown depending on the config elsewhere. Mine shuts down because of how I have xendomains configured (excerpt from /etc/sysconfig/xendomains in my case): ## Type: string ## Default: /var/lib/xen/save # # Directory to save running domains to when the system (dom0) is # shut down. Will also be used to restore domains from if # XENDOMAINS_RESTORE # is set (see below). Leave empty to disable domain saving on shutdown # (e.g. because you rather shut domains down). # If domain saving does succeed, SHUTDOWN will not be executed. # XENDOMAINS_SAVE="" There are several other settings that control how xendomains behaves in this file, and they all have good explanations like the one above. I don''t know where this file would be in a source installation. It may be that xendomains will always save all domains on xendomains stop and restore all domains on xendomains start (or at least restore any that it saved), either way, this behavior shouldn''t change between reboots, but it will only create them if they are in /etc/xen/auto, " Starting auto Xen domains: news(skip)" is where it would have created domU news if said domU hadn''t already been restored. Hope this helps clear it up and get it set how you want it, Dustin -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Kai Schaetzl Sent: Tuesday, August 05, 2008 07:32 To: xen-users@lists.xensource.com Subject: Re: [Xen-users] dom0 and domU shutdown behavior Dustin Henning wrote on Mon, 4 Aug 2008 16:01:25 -0400:> I run F8 with the F8 Xen, and when I shut down, a python > error/incompatibility (I think) causes the xendomains service to stop > without shutting down the domUs (when xendomains is stopped on a properly > functioning system, it will shut them down or kill them one at a timebased> on the config).I didn''t think about xendomains. I just restarted it on a machine with one guest, result: service xendomains restart Shutting down Xen domains: news(save)../etc/init.d/xendomains: line 280: 2455 Terminated watchdog_xm save /etc/init.d/xendomains: line 318: 2455 Terminated watchdog_xm save Restoring Xen domains: news. Starting auto Xen domains: news(skip) - domU didn''t go down, that''s actually not so bad. service xendomains stop Shutting down Xen domains: news(save)../etc/init.d/xendomains: line 280: 2927 Terminated watchdog_xm save /etc/init.d/xendomains: line 318: 2927 Terminated watchdog_xm save Xendomains seems to save and restore the domain. It does that no matter of the domain in in /etc/xen/auto or not. At least if there is no reboot of the machine in-between. I''m not so sure about what happens if the machine gets rebooted. In the past (without a /etc/xen/auto link) sometimes I found it got started, sometimes not. I would rather prefer that it shuts down completely and gracefully, but that it at least saves the VM is better than nothing. This is without the domain being "xen managed". Is there any difference if it is "xen managed" (you start with "xm start" instead of "create")? Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Dustin Henning wrote on Tue, 5 Aug 2008 11:15:48 -0400:> XENDOMAINS_SAVEThat''s indeed all you need (and leave the rest of the file as is) to make xen shut down the domains in a controlled way instead if "saving". Great! Seems to take longer, though, but this was expected. I''ve never even looked for sysconfig/xendomains, thanks! The only problem you get after this is with xen managed domains that are in /etx/xen/auto. xendomains cannot start them up because the name "already exists". I didn''t probably notice before ebcause it was always saving/restoring instead of booting from auto. I removed it now from the xen store and rely on auto alone. Now it works just fine. Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users