I am using libvirt with qemu-kvm to manage virtual machines. The guest makes a vmcall which I want to be notified of, e.g. via a callback function. I know it's possible with 'pure' KVM, but does the libvirt API provide functions to handle a vmcall (or other vm exits)?

Thanks

up vote 0 down vote accepted

A 'vmcall' is a low level instruction for a guest to trap into the hypervisor and as such will always be handled by KVM and/or QEMU. It is not visible to mgmt software like libvirt or anything above that. If you want the guest to interact with mgmt software on the host it is better to use a higher level communications channel. Assuming networking is not an option, then virtio-serial provides a simple stream for apps to use. This is what guest services like the QEMU guest agent, and SPICE agent use to talk to the host.

  • Thanks, I thought so. Are the virtio-serial ports secure tough? But yes you are correct, I need a way to talk to the host. – DaOnlyOwner Apr 23 at 9:04
  • Anyways I am using virtio now. Thanks for the pointer – DaOnlyOwner Apr 23 at 9:58
  • A virtio-serial device is secure - only the guest to which it is assigned can use it, and of course the host. Nothing off-host, nor other guests can see it. So to snoop on it you would have to be root in the host, which is already a privileged account. – DanielB May 3 at 11:14

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.