[Bug 368962] Re: Can't reboot kvm virtual machines using virsh
Soren Hansen
soren at ubuntu.com
Sun Apr 25 16:20:59 BST 2010
On Sun, Apr 25, 2010 at 02:00:11PM -0000, Neil Wilson wrote:
> Power off via ACPI, if it powers off, power it back on again else
> report 'refuse to respond to ACPI shutdown'.
So you would have the call hang for some amount of time until you decide
that by then it should have shut down and then return failure? How long
would you suggest? Remember, libvirt API calls are not asynchronous, so
this is a concern that needs to be addressed. We can't just have the
call tentatively return succesfully and then later call back into the
calling application telling it that it didn't work out.
For fully virtualised guests, I really believe you'd be better off with
a tool that knows about the guests in question and that can Do The Right
Thing. The Right Thing may be to send a shutdown, wait a while, if
nothing has happened, send a destroy, and then start up the guest again.
libvirt can't (and IMO shouldn't) decide what The Right Thing is for a
particular guest. Some guests may have shutdown sequences that take a
long time, which is perfectly reasonable. Others may not carry state at
all and just need to be destroyed and started again. In other words,
it's virtually impossible make a general decision about a timeout for
this that isn't either too long to be useful in the case of a guest that
has simply hung (and thus will not respond to a reboot request, if it
even has such a mechanism) or too short and causes data loss because a
guest didn't get to shut down properly.
This is the curse (and blessing, depending on your POV) of fully
virtualised virtual machines. Now, we could extend the domain definition
XML to have it define said timeout, that seems clumsy to me. I want to
provide virtual machines to people and not have to fiddle with my
configuration just because someone is doing a lot of stuff on shutdown
and don't want to lose data because I felt like setting a too short
timeout.
> Simples
Sorry, but I beg to differ. If not, I'd have done this a long, long time
ago. I have to deal with this (rebooting guests) on a reasonably regular
basis.
--
Soren Hansen
Ubuntu Developer
http://www.ubuntu.com/
--
Can't reboot kvm virtual machines using virsh
https://bugs.launchpad.net/bugs/368962
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.
More information about the Ubuntu-server-bugs
mailing list