A technique for shutting down virtual machines in a computer system which
comprises a real computer and a virtual machine operating system. The
virtual machine operating system comprises a common base portion and a
plurality of virtual machines sharing the common base portion. According
to one feature of the present invention, the common base portion receives
a shutdown signal from the real computer. The shutdown signal specifies a
time period for shutdown of the common base portion or the virtual
machine operating system. Next, the common base portion determines a time
period for shutdown of the virtual machines by subtracting a time
required to shutdown the common base portion from the specified time
period. Next, the common base portion sends requests to the virtual
machines to shut down in an orderly manner within the time period
determined for shutdown of the virtual machines. The common base portion
determines when and if each of the virtual machines shuts down in an
orderly manner. If all of the virtual machines shut down in an orderly
maimer before the time period determined for shutdown of the virtual
machines lapses, before lapse of the time specified in the shutdown
signal from the real computer, the common base portion shuts itself down.
However, if all of the virtual machines do not shut down in an orderly
manner before the time period determined for shutdown of the virtual
machines lapses, upon lapse of said time period determined for shutdown
of the virtual machines, the common base portion shuts itself down. The
shutting down of the common base portion disrupts any of the virtual
machines that did not shut down in an orderly manner. The shutdown can
also be initiated by a user at or an application running on one of the
virtual machines.