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?

  • Botzo@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    8 hours ago

    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.

  • Not a newt@piefed.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 hours 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.