Using Qemu Tools

While moving virtual machines from my unraid NAS to my new proxmox node way back when, I ended up needing to use a few of the qemu-img tools. This is a toolset for handling virtual disks used by kvm/qemu.

Conversions

Something I hadn’t realized while using unraid as my kvm host was that it wasn’t always using qcow2 format, which was my go to format, despite that the webui saying that the file format was qcow2. There were also a few virtual machines I made that ended up in different forms, so to handle these, I ended up having to convert the machines using the following commands.

The first command is to convert from a raw image to a qcow2 file.

qemu-img convert -f raw - O qcow2 /path/to/file.img

The second command is to convert from a qcow to a qcow2 file.

qemu-img convert -f qcow2 -O qcow2 /path/to/img.qcow

File Information

The other command I made use of was the info command from the qemu-img tool. This gives out useful file information for the file input to the command.

qemu-img info

These are just some useful, small commands in the qemu toolbox that can help significantly when working with the VM disk files directly.

Proxmox VM Misconfiguration Downtime

I’ve got a VM running a critical service on my Proxmox host. This VM doesn’t have any real data to speak of, it just runs a few automated tasks that we rely on, so the virtual disk is rather small for it. For some reason while working on the VM (likely restoring a backup from a previous problem I had), I must’ve restored the VM and made my NAS mount the location of the virtual disk. So my virtual machine has been running off my NAS for a while. Until one day, when I had to bring my NAS down for an extended period, and the service went down too. I spent a bit of time trying to get it back up before realizing that the disk was located on the NAS and the NAS wouldn’t be up for a while. Nevertheless, once the NAS was back up, I moved the disk back to the virtual host where all the other VMs run from… oops.

Upgrading Ubuntu Host for Unifi Controller

My unifi controller was installed on an Ubuntu server back on 16.04 LTS. This server finally reached end of life and I needed to run an upgrade to Ubuntu 20.04 LTS. I decided to first try to just release upgrade it two steps. I’d tried this in the past and failed which is why it stayed out of date for so long, but maybe the upgrade process was fixed for things to work automagically. I was a bit wrong on that, however I also found out that rebuilding from scratch is pretty easy.

Continue reading “Upgrading Ubuntu Host for Unifi Controller”

Setting up Z-Wave in Home Assistant on Proxmox

Recently I have ended up with 2 Z-Wave devices in my home, and while the devices work just fine without it enabled, I wanted to mess around with them in home assistant. I’ve seen lots of information on Z-Wave and Zigbee devices and sensors and had been looking at getting some anyway, so I used this as a reason to jump in.

Since I run Home Assistant on a VM via Proxmox, my setup will end up being a bit different than the usual “just plug in the USB Z-Wave controller and go” for those running Home Assistant on a Raspberry Pi or NUC.

Continue reading “Setting up Z-Wave in Home Assistant on Proxmox”

VHost Build

I started looking at servers for a new vhost for a few months, trying to determine what I would need, and what I could utilize. I was running out of RAM in my NAS to run virtual machines, and I was running into odd times when I wanted to reboot my NAS for updates, but didn’t want to reboot my entire lab. So I came to the decision to build a new server that would host the virtual machines that were less reliant on the NAS (IRC bots, websites, wiki pages, etc) as well as other more RAM intensive systems.  The new server was to have a large amount of RAM (>32GB maximum), which would give me plenty of room to play. I plan on leaving some services running on the NAS which has plenty of resources to handle a few extra duties like plex, and backups. The new VHost was also to be all flash, the NAS uses a WD black drive as the virtual machine host drive, which ends up slowing down when running updates on multiple machines. I may also in the future upgrade the NAS to a SSD for its cache drive and VM drive.

Here is what I purchased:

Continue reading “VHost Build”