Is any of these full PC emulators usable as a library? I've been looking at a few of them lately (DOSBox, Qemu, others) and I have the impression that their UI is tightly coupled with the emulation part :(
I'd love to see this as well. I think for your purposes you could extend the emulator backed remakes article (which I still reference from time to time) you did a while back.
That's exactly what I want to do :) But I want to build tooling around x86 + devices (VGA + sound card mostly) + basic OS, rather than building all that from scratch.
I mean, you don't really need to emulate a display. Emulating serial can work enough, depending on exactly what you're looking for. I run my hobby OS mostly on serial (both on hardware and in emulators), because it's easier; but if you're trying to run existing PC software, it's certainly the case that much of it is built to run with display adapters.
It probably would be a good idea to refactor all those emulators to be supported by libvirt - it's not like the it requires the guest be the same arch.