[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Xen: shutdown statt save für Dom-U



Am Wed, 07 Nov 2007 00:59:53 +0100
schrieb Sven Hartge <sven@svenhartge.de>:

> Andreas Juch <andreas.juch@tele2.at> wrote:
> > Am Sun, 04 Nov 2007 23:19:40 +0100 schrieb Sven Hartge
> > <sven@svenhartge.de>:
> >> Andreas Juch <andreas.juch@tele2.at> wrote:
>  
> >>> Wenn ich die betreffende Dom-U vorher mit xm shutdown runterfahre,
> >>> fährt der Rechner normal herunter. Wo kann ich einstellen, dass
> >>> für die betreffende Dom-U xm shutdown statt xm save/restore
> >>> aufgerufen wird?
> 
> >> /etc/default/xendomains (o.ä.)
> 
> > Ok. Dann liegt mein Problem wohl wo anders.
> 
> Was heißt hier "Ok"?
> 
> Das du obige Datei? Steht da folgendes drin? So muss das nämlich, wenn
> die Gäste beim Shutdown des Hosts auch heruntergefahren werden sollen.
> 
> ## 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=""

Wenn ich das so setze, werden aber alle Dom-Us runtergefahren, was ich
eigentlich nicht will, da save mit allen bis auf die eine funktioniert.

> > Komischerweise klappt nämlich das manuelle xm shutdown, das
> > automatische beim runterfahren leider nicht. 
> 
> Natürlich klappt ersteres. Immerhin hat das eine nichts mit dem
> anderen zu tun.

Naja. In /etc/init.d/xendomains werden IMO alle Domains, die nicht
in /etc/xen/auto stehen und gesichert werden beim shutdown
runtergefahren:

...
    if ! all_zombies && test -n "$XENDOMAINS_SHUTDOWN_ALL"; then
        # XENDOMAINS_SHUTDOWN_ALL should be "--all --halt --wait"
        echo -n " SHUTDOWN_ALL "
        watchdog_xm shutdown 1 &
        WDOG_PID=$!
        xm shutdown $XENDOMAINS_SHUTDOWN_ALL
        ^^^^^^^^^^^
        if test $? -ne 0; then
            rc_failed $?
            echo -n '!'
        fi
        kill $WDOG_PID >/dev/null 2>&1
    fi
...

Deshalb sollte das IMO das selbe tun wie manuelles xm shutdown. Nur die
Praxis sieht da leider anders aus. In /etc/default/xendomains steht
dazu das:

## Type: string
## Default: "--all --halt --wait"
#
# After we have gone over all virtual machines (resp. all automatically
# started ones, see XENDOMAINS_AUTO_ONLY below) in a loop and sent
SysRq,
# migrated, saved and/or shutdown according to the settings above, we
# might want to shutdown the virtual machines that are still running
# for some reason or another. To do this, set this variable to
# "--all --halt --wait", it will be passed to xm shutdown.
# Leave it empty not to do anything special here.
# (Note: This will hit all virtual machines, even if
XENDOMAINS_AUTO_ONLY
# is set.)
#
XENDOMAINS_SHUTDOWN_ALL="--all --halt --wait"


conroe:/etc/xen/auto# ls
debmirror.cfg  firewall.cfg  mail.cfg
funktioniert, werden gesichert.

fileserver.cfg in /etc/xen tut leider beim automatischen shutdown
nicht. 

> 
> S°
> 

Andreas

-- 
Andreas Juch                                ASCII Ribbon Campaign  /"\
                                               against HTML email  \ /
GPG-Key ID:  21E6864A                                               X 
Fingerprint: D4D2 0F3F 138A F7A4 6DED  76EC F9EA 29BC 21E6 864A    / \

Attachment: signature.asc
Description: PGP signature


Reply to: