I have a VM running using:

qemu-system-x86_64 -m 8192 -smp 3 \
  -net user -net nic,model=virtio -boot menu=on \
  -drive file=guixsd-usb-install-0.13.0.x86_64-linux \
  -drive file=guixsd.img

per the GuixSD VM installation guide (with some slight modifications like the RAM usage, file names and CPU cores allocated). I would like to save the machine state so that I can restore it later (exactly as it was before I saved it, right in the middle of running the guix system init ... command. Sort of the equivalent to the "Save the machine state" option for VirtualBox VMs. I saw this answer https://unix.stackexchange.com/a/361015/27613 but it requires the name of the VM, running virsh list --all doesn't list the name of VMs started via this command. DuckDuckGo searching for answers hasn't revealed anything as most results related to if I had started the VM from virt-manager.


1 Answer 1


It seems that your qemu displays a window. If this is the case, press ctrl-alt-2 to switch to the monitor interface (and ctrl-alt-1 to get back).

You should see the (qemu) prompt, now you can type in the following commands

  • loadvm <snapshot name>
  • savevm <snapshot name>
  • delvm <snapshot name>
  • info snapshots

While qemu is not running, you can list the saved states with qemu-img snapshot -l guix.img.

You can load a snapshot directly when starting qemu by adding the switch

-loadvm <snapshot name>

to the command line.

For more convenient access to the monitor interface, add the directive

-monitor telnet:,server,nowait

to the command line. You can then use telnet localhost 1234 to talk to qemu. Caveat: do not enter q or quit to get out of there, this will cause the emulator to shut down! Press ctrl-] instead and then type q.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .