I wanted to install OpenBSD as a guest VM on my home server so that I could have a sandbox to test some potentially destructive commands for live copying my primary hard drive. My home server is running headless- I don’t have a display connected, nor do I have X11 installed. I also wanted to avoid using VNC for the install and do everything from the command line.

Create a Disk Image

> qemu-img create -f qcow2 openbsd.qcow2 16G
Formatting 'openbsd.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=17179869184 lazy_refcounts=off refcount_bits=16
>

The Install Command

Here’s the command to run virt-install to set up the guest VM.

My OpenBSD router has an old spinning disk in it and I’d like to move that disk to a new SSD. I want to keep downtime to a minimum since my home internet doesn’t work when this machine is powered down, so I’m going to try to do the copy live using OpenBSD’s dump and restore.

I ended up spending way more time on this doing things partition by partition than if I had just taken the machine down and dd’ed everything. In the future I probably wouldn’t go this route, but if you’re looking for a way to minimize downtime while migrating to a new drive these steps might work for you.

Errors After Upgrading to MySQL 9.0

I recently ran into an error with my Wordpress/mysql docker containers since I was using mysql-native-password and MySQL 9.0 removed support for the native password plugin. I think I was using that flag because of this very helpful DigitalOcean Guide for installing Wrodpress with Docker Compose.

Getting out of it was a bit tricky because once you upgrade to MySQL 9.0 you can’t roll back to 8.x, so you have to find a way to fix the authentication entries in the database by hand. I hope that writing up my steps here will save someone else some frustration when they hit this same problem.