I'm working on a database project that uses `io_uring` and NVMe, and I'm looking to improve my testing workflow. Currently, I'm utilizing KVM with an NVMe device emulator for my development environment, but the process is clunky. I have a script to recreate the KVM image, but it still involves some manual steps, and I prefer not to commit the KVM image itself. I'm wondering if there's an alternative to Dockerfiles for KVM images, or what my best options are for this use case. Also, what alternatives do I have to emulate NVMe devices?
3 Answers
One option you might consider is building a base binary image and hosting it statically somewhere. You could then use wget in your setup to pull that into the VM while continuing with your specific dependencies after that.
Consider using Packer to automate your VM image creation. You can execute shell commands or even utilize Ansible to set everything up. There are plenty of examples online, including how to build AWS AMIs, and it supports various platforms as well.
You could try creating a template and use cloud-init to provision new instances. Automate the template instance generation with Packer, and then use Terraform to automate the VM generation using that template with cloud-init.
That seems more suited for cloud setups, but I guess I can adapt that workflow for local development!

That's what I'm doing currently, but since I want to open source the database, maintaining those resources for easy access is a concern.