[Bug 350936] Re: Should shut down domains on system shutdown

John Morrissey jwm at horde.net
Thu Nov 4 13:01:04 GMT 2010


On Thu, Nov 04, 2010 at 11:43:10AM -0000, Valentijn Sessink wrote:
> The proposals in this report (mine, John Morrissey's) all have a "pre-
> stop" shutdown of virtual machines in their Upstart conf-file.
> 
> When you update libvirt-bin, dpkg will stop libvirt-bin before
> upgrading. As a result — if you have implemented the pre-stop shutdown —
> your virtual machines will all stop.

Sorry, that's incorrect.

The libvirt-bin upstart job I wrote will only shut down VMs if the physical
machine is entering runlevels 0 or 6 (i.e., shutdown or reboot):

--
pre-stop script
	if [ -z "$RUNLEVEL" ]; then
		exit 0
	fi
	if [ "$RUNLEVEL" -ne 0 ] && [ "$RUNLEVEL" -ne 6 ]; then
		exit 0
	fi
--

john
-- 
John Morrissey          _o            /\         ----  __o
jwm at horde.net        _-< \_          /  \       ----  <  \,
www.horde.net/    __(_)/_(_)________/    \_______(_) /_(_)__

-- 
Should shut down domains on system shutdown
https://bugs.launchpad.net/bugs/350936
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to kvm in ubuntu.



More information about the Ubuntu-server-bugs mailing list