Hi, > I'm not sure you can recycle something from it, but my (ugly) approach > to make this fast (for a different purpose -- I'm using qemu to run > tests in guests, not testing qemu) is to build an initramfs by copying > the host binaries I need (a shell, ip, jq) and recursively sourcing > libraries using ldd (I guess I mentioned it's ugly).
By design limited to the host architecture, but might be good enough depending on what you want test ... > No downloads, systemd, dracut, etc., guest boots in half a second > (x86_64 on x86_64, KVM -- no idea with TCG). Host kernel with a few > modules packed and loaded by a custom init script. I've simply used dracut for that in the past. Recursively sourcing libraries is one of the things it does which I didn't have to code up myself that way. Used to work pretty well. But these days dracut doesn't want give you a shell prompt without asking for a password beforehand, which is annoying if all you want do is run some simple tests, and there was to easy way to turn that off last time I checked ... take care, Gerd