[libvirt] [PATCH RFC 0/4] Allow hibernation on guests

Daniel P. Berrange berrange at redhat.com
Thu Jan 26 14:46:32 UTC 2012


On Thu, Jan 26, 2012 at 03:06:12PM +0100, Michal Privoznik wrote:
> As we've added guest agent recently, the whole world
> of new functionality has opened. As this patch set,
> which allows domains to enter S4 state.
> 
> What is needed for this?
> Patched qemu. As this is not in qemu git, but patches
> are await to be pushed in very short future. They can
> be found here:
> 
> http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg03261.html
> 
> Despite that, if anybody is willing to give me review
> if I am going the right way, I'd appreciate it.
> 
> One thing, that you'll probably notice is this
> 'set-support-level' command. Basically, it tells GA what qemu version
> is it running on. Ideally, this should be done as soon as
> GA starts up. However, that cannot be determined from outside
> world as GA doesn't emit any events yet.
> Ideally^2 this command should be left out as it should be qemu
> who tells its own agent this kind of information.
> Anyway, I was going to call this command in qemuProcess{Startup,
> Reconnect,Attach}, but it won't work. We need to un-pause guest CPUs
> so guest can boot and start GA, but that implies returning from qemuProcess*.
> 
> So I am setting this just before 'guest-suspend' command, as
> there is one more thing about GA. It is unable to remember anything
> upon its restart (GA process). Which has BTW show flaw
> in our current code with FS freeze & thaw. If we freeze guest
> FS, and somebody restart GA, the simple FS Thaw will not succeed as
> GA thinks FS are not frozen. But that's a different cup of tea.
> 
> Because of what written above, we need to call set-level
> on every suspend.


IMHO all this says that the 'set-level' command is a conceptually
unfixably broken design & should be killed in QEMU before it turns
into an even bigger mess.

Once we're in a situation where we need to call 'set-level' prior
to every single invocation, you might as well just allow the QEMU
version number to be passed in directly as an arg to the command
you are running directly thus avoiding this horrificness.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list