this post was submitted on 28 Feb 2026
15 points (100.0% liked)

Linux

12636 readers
437 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
 

I'm looking to use KVM/QEMU on my Linux computer.

Are there scripts that help me automate deploying the same VM builds I've done before -- with the same RAM, HDD, networking, etc.. settings.

I've found the following but I'm not sure if there are better options:

https://github.com/doccaz/kvm-scripts

https://github.com/doccaz/kvm-scripts

Would Ansible be a better option for this?

top 9 comments
sorted by: hot top controversial new old
[–] ken@discuss.tchncs.de 1 points 1 day ago* (last edited 1 day ago)

packer + ansible + cloud-init; then libvirtd or proxmox or incus as you do

i also hear you can build such images straight up with nix though i have yet to try that

My recommendation is to use an abstraction layer that runs qemu-kvm under the hood and automate that. Some people have mentioned libvirt, but Incus is another good option.

[–] Botzo@lemmy.world 6 points 4 days ago (1 children)

It sounds like you want to create a vm template image.

Some options:

Both virsh and virt-manager have tools for managing libvirt xml files that you can turn into a template to use for launching additional images.

Proxmox and ovirt both have template concepts and APIs you can interact with for automation.

If you're looking to create a golden image or just automate configuration, virt-clone, ansible, puppet, packer, and even pxe boot are good options depending on the methods you prefer.

There are so many well-established ways to approach this problem domain. Just don't get decision paralysis. There isn't a best either.

[–] moonpiedumplings@programming.dev 1 points 2 days ago (1 children)

Have you used ovirt? It's currently being maintained by Oracle after Red Hat gave it up.

I've been meaning to try it, but the documentation is dense and hard to get through, and I unironically find the openstack install instructions more approachable in some ways...

[–] Botzo@lemmy.world 1 points 2 days ago* (last edited 2 days ago)

It has been 7 or 8 years since I touched it, but yes. I extended some intern-built VMware automation to ovirt so we could validate KVM images and reduce VMware costs for internal dev and because that was the platform the manager decided on. We initially only dedicated 6U or 8U to it.

In general, I'd say it worked just fine and the python sdk was approachable. It wouldn't be my first choice knowing it's Oracle Virtualization now, but that's a moral stance instead of technical.

As for maintaining it long term, I can't really say. I left that team to go play in the clouds with terraform and kubernetes. But I also haven't heard anything negative from that team since (and I'm still friends with one of the system engineers who is responsible for it). And there was a much needed fundamental rewrite of the bits I original extended that continued with ovirt that went smoothly.

[–] just_another_person@lemmy.world 3 points 3 days ago (1 children)
[–] BetterDev@programming.dev 2 points 2 days ago (1 children)

I use this, I will say, the latest version is vibecoded with AI and it shows. I'm sticking to the previous v0.8.x release, and forking from there.

Other than that, its a great project, and works well for my needs

Good to know!

[–] lemmyng@piefed.ca 2 points 3 days ago

Are you looking at reproducibility for dev environments, or for a home server?

For the former, Vagrant is probably the tool you're looking for.

For the latter it depends on the level of complexity and reproducibility that you're comfortable dealing with. Something like Proxmox lets you snapshot and restore VMs, which may be enough. On the other end of the spectrum you would have golden images that you rebuild on demand, or cloud init coupled with ansible or chef to customize VMs on demand based on metadata.