1. 21
  1. 1

    Spinning up a arch, centos or nix VM with a single command is very appealing. Automatic hostname even!

    1. 1

      well, works nicely with vagrant, though.

      1. 3

        Vagrant is a valid way to do this, however I admit my needs are a bit self-inflicted. I don’t like Ruby (the package manager is a pain) and wanted to have it be a single command to choose distribution/version, CPU core count, disk size, memory that the VM has and what machine to run it on. I also wanted to be able to run waifuctl on a machine that is NOT the one that runs the VM. Basically I want waifud to be instrumental to making my private cloud run. Ideally I’d like it to be like having my own private EC2 that I can also let friends use.

        My homelab setup is a bit weird (4 kinda powerful machines that run libvirtd instead of 1 really powerful machine to rule them all), so this software reflects that weirdness. I’d love to use Vagrant, however most Vagrant boxes do not support libvirtd, so my options are limited at best. My current biggest limiting factor in waifud’s implementation is the fact that I have to sling around base images, this will probably be done better in the future (NFS? 9P? Samba?), but for now it works enough.

        1. 4

          I had the same issues with Vagrant and similar design goals as what you mention:

          • Multiple physical hosts (in different providers or at home)
          • Single standard way to provision VMs from an underpowered laptop
          • Version controlled config files
          • Standard images format

          I ended up using terraform + libvirtd to achieve the above goals. Three years later and it still works fine for provisioning VMs and networks in my laptop, desktop and various physical hosts in datacenters.

          However as you noted, I have the same issue with moving images around, which is somewhat alleviated by creating images in each host locally using packer.

          1. 2

            no worries, i like the approach. Have you had a look at the generic/* images from the roboxes.org project? Theyre all available for libvirt, using the vagrant-libvirt plugin, too.

            I dont like ruby, too, but with the generic/* boxes and an centralized dhcp service its also possible to easily spin up machines on multiple hosts, if required, which comes more closely to your approach (vms must run qemu agent within them for vagrant to be able to find out about the assigned ip address, and vagrant must be configured to run a remote connection to the libvirtd host)

            1. 3

              I have had a look at them just now, but I am deep enough into making waifud a thing that it may be too late for me now :)

            2. 2

              At the risk of being unduly opinionated, I’d advise that you don’t use NFS. Sling the images around in userspace. In the medium to long run the bugs you get that way will be less nasty.

              1. 1

                Why not Ubuntu MaaS (metal as a service) / lxd? (I can think of a few reasons, just wondering)

                1. 3

                  My homelab runs NixOS. I didn’t want to try and get MaaS working on there. I also remembered that exists today.