qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] Combining VM checkpoints with -snapshot


From: David Wilson
Subject: [Qemu-discuss] Combining VM checkpoints with -snapshot
Date: Tue, 22 Apr 2014 18:11:34 +0000

Hi there,

On experimenting with Qemu for use in providing CI build slaves, I had
hoped to boot Windows, call "savevm" monitor command, then, with the
.qcow2 cached, use something similar to "qemu -snapshot -S -monitor
stdio .." followed by "loadvm" and "cont" to get a fresh, temporary VM
booted in a few seconds.

On trying this, it seems while -snapshot is in use, any VM checkpoints
from the .qcow2 are hidden. Attempting to use "qemu-img create" to
construct a temporary chained qcow2 produces the same effect. I guess
this is basically what -snapshot does internally.

Looking at the code, I can see multiple ways to nastily poke holes in
the interface to get a similar effect (at least, as far as my limited
understanding of the code goes). Before doing that, though, I was
wondering if this is already possible with the current UI?

The goal to to resume driver and RAM state from the base .qcow2, and
write changes to the temporary .qcow2, allowing fully booted short-lived
machines to be created and rapidly discarded.


Finally, and on a related note, it seems there is no technical
restriction while running under KVM that would prevent using a writeable
MAP_PRIVATE memory mapping of the guest's RAM. This would allow multiple
build slaves to share immutable parts of RAM from the snapshot, and
avoid a costly deserialization step at startup although currently Qemu's
save/load IO code works nothing like this.

Is there some technical restriction I'm missing that would prevent this?
It would allow further cutting ephemeral VM boot time from a few seconds
to perhaps a few hundred milliseconds, in addition to saving on RSS.


David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]