SSH Configuration on OpenWRT

If you’ve configured Dropbear (the SSH server) for OpenWRT so that it has a secondary listener for your WAN port (you may want to do this if you want the WAN SSH listener on a different port from the default), then you’ve probably noticed that it doesn’t come up on its own after your WAN link drops.

Read More

Customizing Unit Files in Systemd

On a KVM virtual machine I have, I want to have the MySQL (well, MariaDB) database running on NFS, which means that I need MariaDB to only start up after NFS becomes available.  This would normally require editing the default systemd unit file for MariaDB.  This is a bad idea, since your changes will be reverted every package upgrade.  Here’s how to fix that.

Read More

Easy headless KVM deployment with virt-install

I’d like for the VMs I’m deploying to be entirely headless (that is, no virtual graphics card at all, serial console only).  Turns out that you can do ISO-based installations of CentOS-7, headless, without having to unpack the ISO and mess with stuff.  Enter virt-install, the swiss army knife of KVM O/S installs;

Read More

TRIM Support on KVM Virtual Machines

Messing with KVM as a replacement for my Microserver setup at home.  With KVM, you can define a thin-provisioned VM image file (a qcow2 file), which is a sparse file on the filesystem.  You can then configure the guest O/S so that TRIM support works, and it can then unmap unused blocks by the guest FS and have those blocks get unmapped the whole way down the stack (released from the sparse file, and ultimately trimmed from the underlying SSD if there is one).

Read More