Having a virtual machine host server has been quite useful

January 5, 2024

I've been using virtual machines for various sorts of testing and scratch development for a long time. For many years, that was done using VMWare Workstation on my work desktop machine, but in early 2022 I reached a tipping point of unhappiness with it and subsequently switched over to Linux's libvirt. It didn't take me long to realize that I could do this on one of our servers, not just my desktop, and I built out a VM host server. Both the VM host server and my desktop have basically the same libvirt setup for (server) testing, where I have a bunch of scratch VMs that are each set up with a starting install of various Ubuntu versions and then snapshotted before we do any post-install customization. When I want to test something on a scratch server, I pick a currently unused VM, roll it back to the appropriate Ubuntu version snapshot, and fire it up to finish installing it as whatever I want.

When I first built the VM host server, I wasn't sure how much I was going to use it. After all, my work desktop was perfectly good at running virtual machines under libvirt, and it had some conveniences since the VMs were right there. But over the past year and a half, I've switched to mostly using the VM host server's waiting VMs when I want an Ubuntu test server, instead of the VMs on my desktop. To the extent that I can sort out why I've drifted this way, I think that having a separate VM host server has removed various quiet bits of friction and cognitive dissonance.

The obvious advantage is that the VM server is a separate machine from my desktop and it only runs VMs, so I don't have to worry about the impact of anything else on any VMs or the impact of VMs on anything else. If I fire up too many VMs and overload the machine, the only thing it affects are scratch test VMs. Related to this, the machine is more stable in practice than my Fedora desktop, partly because Fedora has fairly frequent kernel updates. The VM server also has the VM disk images on an ext4 filesystem rather than a ZFS filesystem; I like ZFS, but it can have unpredictable interactions with things like virtual machine images (for both IO volume and memory usage).

As a system administrator, I'm quite aware of the standard jokes about services (important or otherwise) running on someone's desktop. The VM host server isn't my desktop; it's a real server, racked in our machine room, and so it feels better to leave something running on it than on my desktop. One result is that I'm more comfortable running scratch services for an extended period of time on the VM host server. This can be an actual service we're testing or simply letting a new version of some piece of software I don't fully trust run for long enough to be a 'burn in' test for problems.

The summary of all of this is that having a VM host server has made using virtual machines on it into something that feels like the easy way to get a real (Ubuntu) server set up temporarily. VMs on my desktop were just that bit further away from that 'basically a real server' feeling, and that bit makes a difference.

(I still do run Ubuntu VMs on my work desktop for some things, but those VMs tend to be for entirely personal experimentation and poking.)


Comments on this page:

Instead of rolling your own 'VM host', DIY-style, I would recommend looking at Proxmox. It uses Debian as a base and adds a layer of software that makes management easier (one can still access the CLI, and there are CLI utilities for the software). It's open source, but has "enterprise" support available, but can run with full functionality without it.

You can have stand-alone server(s), or link multiple ones together in a cluster (with live migration available, even if you use local storage (and not something like Ceph)).

By cks at 2024-01-17 11:01:00:

If we were to do a full scale VM environment, perhaps Proxmox or something would make sense. In this case, the VM environment is being used as a way to get low-effort test (virtual) servers, which means that the combination of Ubuntu (which we run on regular servers) and libvirt (which I run on my Fedora desktops) is the best low-effort approach; it requires us to learn and operate basically nothing new.

Written on 05 January 2024.
« 'Unmaintained' (open source) code represents a huge amount of value
Some ballpark numbers for fun on filling filesystem cache with NFS traffic »

Page tools: View Source, View Normal.
Search:
Login: Password:

Last modified: Fri Jan 5 23:15:19 2024
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.