How to access virtual machines started with QEMU?

813 views Asked by At

I wish I could connect to virtual machines started with QEMU.

Then I should extract the information about the registers (EIP, EBP, etc.)

In XEN for this, there is the function get_vcpu_context, also there are other functions through which you can connect to each virtual machine separately.

Is there any such support for QEMU, and where can I find QEMU hypercalls documentation?

1

There are 1 answers

2
Peter Maydell On

You have a couple of options:

  • you can connect to the QEMU gdbstub and use the GDB remote protocol to query CPU state. This is probably the most reliable method.
  • you can connect to the QEMU monitor and use the "info registers" command. Note that the output format of this might change between QEMU releases, though (it is intended for human consumption, not other programs), so it will be less reliable long-term than using GDB remote protocol.