On Thu, Apr 05, 2018 at 11:40:31AM +1000, Lindsay Mathieson wrote: > Thanks Stefan, looking to develop a lizardfs block driver. A process that > only involved building a module rather than the entire qemu tree would mike > life easier, especially if I could test it on a live system (proxmox > cluster). A custom qemu install is not an option for that.
Since your final goal is to create a native LizardFS block driver, it is necessary to build a full QEMU. With libvirt you can edit the domain XML to point <emulator>/usr/bin/qemu-kvm</emulator> at your custom binary for just that VM. In the worst case you can put a little shell script in place of the system QEMU binary that checks the command-line arguments to detect your test VM. It can exec your custom QEMU binary for the test VM, and the system QEMU binary for all other VMs: # mv /usr/bin/qemu-kvm /usr/bin/qemu-kvm.orig # cat >/usr/bin/qemu-kvm #!/bin/sh if echo "$*" | grep -q -- '-name testvm'; then exec /path/to/custom/qemu "$@" else exec /usr/bin/qemu-kvm.orig "$@" fi ^D # chmod 755 /usr/bin/qemu-kvm I recommend using qemu.git/master and not an old source tree to avoid extra work if you want to contribute your code or if you need to ask for help (the first question will be "does it work on qemu.git/master?" :)). QEMU does not have stable APIs or out-of-tree modules. Development is most convenient when done upstream as part of the community. Anything else requires you to maintain a fork and community support will be very limited. Stefan
signature.asc
Description: PGP signature