Skip to contentSkip to conversation

qemu replay?

Qemu-devel Tim Leek 2 participants 2 messages Jul 21, 2008 – Jul 22, 2008

lore
Share & tools
lore

Tim Leek

author
#0 lore raw

A quick question for the gurus. Please cc my email address with replies?

Is there anything out there that implements record/replay for Qemu? I'm sure all of you are aware of this paper. Others have done similar things.

"Decoupling Dynamic Program Analysis from Execution in Virtual Environments". Chow, Garfinkel, and Chen of VMWare. USENIX 2008 "Best Paper".

It uses VMWare's record feature to save to disk a log of all inputs to the CPU and then (after some crazy engineering jiggery-pokery) sucks this log into a heavily instrumented version of Qemu which replays the log to generate the same instruction stream as during record. Even though the instrumentation of Qemu is heavy (bounds checking, e.g.), replay ends up running about as fast as record because replay doesn't need to do some things. Like HLT, because "interrupt delivery is immediate". Like disk and network writes. Etc. Basically, it knows the future and the future is in its log.

It seems a Qemu record and replay feature would be awfully useful for a bunch of reasons and to a bunch of people. Any chance such a thing exists? Anything in the works? The system described in this paper is both not available and, apparently, a bit of a Frankenstein's monster: VMware -> VMware (again) -> Qemu. Yuck! Why not just Qemu -> Qemu? Answer is because these researchers work for VMware, I imagine.

Any information greatly appreciated. We might end up doing this ourselves but don't want to reinvent any wheels that are already sufficiently square!

Tim Leek
Technical Staff
MIT Lincoln Laboratory
Lexington, MA, 02144
[email protected]

#1 lore raw
Quoted 5 lines · Tim Leek

A quick question for the gurus. Please cc my email address with replies?

Is there anything out there that implements record/replay for Qemu? I'm sure all of you are aware of this paper. Others have done similar things.

Interesting paper. There are patches to capture network traffic to a file and some I/O can be captured by recompiling with debug code enabled. Some of this can be replayed (just keyboard and mouse) using the monitor interface, but not for other I/O.

Support of record/replay should not be too difficult to add. I haven't looked, but the live migration stuff in Xen could be a good starting point.