Kvm api?

Hey everyone,

I was wondering if an API exists for KVM. I thought it might be interesting to get some bash scripts to run when a VM is started to maybe automate a couple of things. I bought a USB switcher that might be cool to modify that with an Arduino so it automatically switches to the VM USB ports when its turned on. It might also be cool to have a nicer interface for system metrics.

Any ideas?

libvirt and qemu hooks

we did something similar with monitor switching:

if you do write any hook scripts, submit a PR and we’ll add them to the helper/patcher library after some validation

1 Like