I was wondering if it's possible to script qemu so that you can boot it up and automatically get it to run programs in the guest OS? In my case, that's Linux. Basically, I want to avoid having to interact with the guest so that I can perform a batch of experiments with condor or something similar.
I saw this question which suggests a method using python, but I'm wondering if there's any other way at all that is supported by qemu itself?
I don't want to do anything too fancy. Assuming automatic login on the guest to a simple shell, I was thinking of a script such as this:
cd <some_dir>
./experiment
scp result [email protected]:
Any ideas, otherwise I'll try out the python method above?
The QEMU Monitor can interact with guest systems to a limited extent using its own console. This includes reading registers, controlling the mouse/keyboard, and getting screen dumps. There is a QEMU Monitor Protocol (QMP) that lets you pass JSON commands to and read values from the guest system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With