[Nut-upsuser] early shutdown of VMware VMs
Douglas Parsons
doug at parsonsemail.com
Fri Feb 13 16:46:36 UTC 2009
What version of VMWare are you running? This makes a difference as to your
choices.
Do you have the VMWare tools installed on the virtual machines?
With most versions you can have the host shut down the guest. Some versions
give more options than others.
As I understood from a previous thread there is no current means to trigger
at set battery levels for particular slaves. But you may be able to trigger
at a higher battery level so the host will start the guest shutdown and have
time to complete before you run out of battery.
If I mis speak here please correct me list. I an a novice on nut.
Doug
On Fri, Feb 13, 2009 at 11:01 AM, Jon Bendtsen <jbendtsen at laerdal.dk> wrote:
> On 13/02/2009, at 16.48, David Newman wrote:
>
> > On 2/12/09 11:19 PM, Arjen de Korte wrote:
> >> Citeren David Newman <dnewman at networktest.com>:
> >>
> >>> How to shut down VMWare guest virtual machines earlier than the host
> >>> machine they run on? (For example, if everything normally shuts
> >>> down at
> >>> 5% UPS battery, then the VMs should shut down at 10%.)
> >>
> >> First question is, why do you want to do that?
> >
> > Because a clean shutdown of the VMs is more important than high uptime
> > for the VMs.
> >
> > If both guest and host machines shut down at the same time, the host
> > might finish its shutdown before the guests have, leading to possible
> > filesystem corruption. I will gladly trade off some downtime of the
> > VMs
> > to ensure clean shutdowns.
> >
> >
> >>
> >>> I also read upssched.txt but I can't tell from the early shutdown
> >>> section which settings to use on the master and which on the slaves.
> >>>
> >>> This seems like a fairly standard problem -- are there sample
> >>> configs
> >>> posted someplace?
> >>
> >> I'm not an expert on VMware, but I would expect that you can
> >> configure
> >> on the host that it shuts down the guests before going down.
> >
> > Thanks -- that's what I'm asking for -- what is it that I configure,
> > and
> > are there sample configs someplace that do this?
>
> I think you have to ask on a VMware list how you configure the VMware
> server to tell the VMware clients to shut down. Maybe just sending
> ctrl+alt+delete is enough.
>
> Or you could just use the notify command? Once ONBATT is reached,
> then sleep for a 1 minute or more, and start the shutdown?
> If you get a ONLINE then have the script check if all virtual machines
> are running.
>
> There might be a problem if the UPS has very little power left. So
> when you
> get a LOWBATT execute a script that doesnt sleep but start the shutdown
> now.
>
> NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC
> NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC
> NOTIFYFLAG ONLINE SYSLOG+EXEC
>
> NOTIFYCMD /sbin/upsmail.sh
>
> Then just include something that tells the virtual machines to shut
> down.
> And install it on every vmware client unless you can instruct vmware to
> shut the clients nicely down. Maybe tell vmware to sleep the machines
> at ONBATT?
>
>
>
> JonB
>
>
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20090213/8463a797/attachment.htm
More information about the Nut-upsuser
mailing list