Live data from Hacker News

Ditching Vagrant: VMs with KVM and Virsh on Debian

benjamintoll.com

41–49 of 49 posts

Re: Ditching Vagrant: VMs with KVM and Virsh on Debian

#41
post #32

What are people using Vagrant for these days? The last time I encountered it was before Docker become widespread.

My homelab consists of several baremetal hosts, Vagrant lets me instantiate a full testing environment from a text file and kick off provisioning scripts.

Re: Ditching Vagrant: VMs with KVM and Virsh on Debian

#42

virt-builder is an alternative to installing a guest OS from scratch. It has a selection of popular guest OSes template images that you can quickly install non-interactively. It's convenient when you don't want to manually install a guest and also don't want to figure out preseed/kickstart/etc. It makes creating new KVM guests easier and has handy features like the ability to copy in ssh keys so you can connect to th…

I think this is a backwards way to set up VMs. "Installing a guest" is the wrong concept. Use a VM image pre-prepared from your favourite distro to skip that step. cloud-init is the standard way for it to specialize to your use case.

Re: Ditching Vagrant: VMs with KVM and Virsh on Debian

#43

This is the first time in my entire life I've ever seen someone use a Plan 9 formatted disk. Deep respect.

9P is a filesystem protocol (like NFS or CIFS) rather than a local file system (like btrfs or NTFS). It's used to share files between the host and the guest. That way there's no need to copy files between the host and the guest.

Thanks for the clarification and another example of my ignorance about it. The only time I've ever seen it is when I was trying to build a "slender" kernel and I was removing all the stuff I've never used(eg: 9P ).

The only thing I did know about it was that it was named after the movie "Plan 9 from Outer Space". Kinda cool reference.

Re: Ditching Vagrant: VMs with KVM and Virsh on Debian

#44

Honestly though... why not just systemd containers with minimal mounts, and if you're needing an ip, what not an unprivledged LXC container? The surface area is far smaller and they're way easier to inspect.

Systemd-nspawn is great. You can have any networking you like with it too, no need for LXC.

I haven't dove into that yet! But it does look pretty danged neat. I'm really starting to realize that containership should be handled by the process manager

Re: Ditching Vagrant: VMs with KVM and Virsh on Debian

#46

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.

Damn, I didn't know about vmspawn, will keep an eye. But I've been running VMs inside nspawn containers by binding /dev/kvm and using plain qemu. Works great.

Re: Ditching Vagrant: VMs with KVM and Virsh on Debian

#47
post #32

What are people using Vagrant for these days? The last time I encountered it was before Docker become widespread.

My homelab consists of several baremetal hosts, Vagrant lets me instantiate a full testing environment from a text file and kick off provisioning scripts.

Same. And now, my AI agent uses Vagrant to validate it's ansible yaml before it creates pull requests. It even does `vagrant up` inside a running vagrant when making changes to Vagrantfiles.

Re: Ditching Vagrant: VMs with KVM and Virsh on Debian

#48
post #14
post #9

Earlier quoted context omitted.

"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 homelabb…

Red Hat is still using and developing libvirt (though the user facing layer is Kubevirt instead of oVirt) and virt-install, and even though virt-manager is not growing new features libvirt takes backwards compatibility extremely seriously, so new libvirt works with relatively old virt-manager.

kubevirt is a cute joke, but hardly a replacement for ovirt or vmware. It's a real shame redhat keeps sabotaging itself to chase hypes with half-assed non-solutions.

Re: Ditching Vagrant: VMs with KVM and Virsh on Debian

#49

There used to be virt-manager Wonder if it’s still around ? Hope it’s doing well !

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…

You have to give your user libvirt rights (i think it's a group) and connect as user rather than system.
Post reply on HN