Ditching Vagrant: VMs with KVM and Virsh on Debian

(benjamintoll.com)

22 points | by fanf2 4 days ago ago

8 comments

  • happyPersonR 4 days ago

    There used to be virt-manager

    Wonder if it’s still around ? Hope it’s doing well !

    • creshal 3 minutes ago

      "around" is the best way to describe it; the libvirt/virt-manager ecosystem isn't dead, but redhat killing off ovirt/rhev support drained a lot of resources out of it.

      And for some bizarre reason people decided that the much less mature (both organizationally and technologically) proxmox VE is the best thing since sliced bread, so everyone who does care about linux virtualization is now trying to hammer some homelabbers' collection of perl scripts into a replacement.

      It would be funny if it wasn't so sad.

    • MisterTea 4 days ago

      Unfortunately it still exists. Virt manager drives me crazy because it hides the VM files in its own directory with permissions that aren't yours forcing you to use sudo to manually manage your own fucking vm files. Creating a new VM? You're forced to pick an OS by typing the name of your OS into a search box which is tedious and doesnt give you an option for generic x86 machine. I hate it with a burning passion and instead manually manage VMs by reading the qemu man page and writing a script to directly invoke qemu. I'd recommend VirtualBox over it any day.

      • jeroenhd an hour ago

        I can't say I share your hatred. It's my go-to management interface for VMs like this. Especially because it allows managing a remote libvirt install over SSH, handling things like forwarding the screen and input for you.

        If you don't want to pick an OS preset, you can always just go for "manual install" and a "generic" OS and pick your own preferred configuration later. Or you paste the URL for an online install directory, which is even easier.

        To manage libvirt machine without root, you can add your user to the libvirt group.

      • tosti 29 minutes ago

        You can add directories to the storage, including ones in your home directory. Generic is actually the default option, all you have to do is to disable auto-detection.

        It's fine to run qemu directly, but virt-manager ain't bad.

  • shellwizard 4 days ago

    Have you tried distrobox/toolbox instead of having to spin up VMs? Also microvm looks nice

  • zamadatix 4 days ago

    This is another area I hope I'm able to migrate to systemd. I already use nspawn for containers but vmspawn is still a bit new and limited in the options. Once it gets there though it'll be nice to have system+containers+vms under one consistent roof.

  • s8kur 40 minutes ago

    Membership in the libvirt group is root-equivalent, not a permissions fix. Through qemu:///system it lets you attach arbitrary host block devices to a VM, so anyone in that group can mount and read the host's own disk. If you want to manage VMs without root or that group, use qemu:///session instead: unprivileged, images live under ~/.local/share/libvirt, no sudo. Tradeoff is you lose bridged networking without a setuid helper.