Archive for June, 2022

qemu-kvm: file driver requires to be a regular file for ZFS volume

Thursday, June 23rd, 2022

After one of the recent updates, a few KVM-based systems could not boot anymore.

I am using ZFS for my emulated block devices, and I was happy with that until recently. Now – VMs won’t start, showing the error message in this post’s header.

The source of the problem is rather nasty – qemu update to version 6 has changed compatibility (see here) and libvirt has not followed through.

An ugly workaround is to modify the XML directly (either using Virt-Manager or using text editor of the VM’s XML) and modify the disk to the following. Change ‘file’ into ‘block’ as the type, and change source from ‘file’ type to ‘dev’ type.

An example:

<disk type="block" device="disk">
  <driver name="qemu" type="raw"/>
  <source dev="/dev/share/VMs/hassos-updated.lun"/>
  <target dev="vda" bus="virtio"/>
  <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>

SuperMicro IPMI License

Friday, June 3rd, 2022

This is a bit on the less legit side, but a need rose where I was required to update the BIOS on an old SuperMicro SBB server. The thing is – the IPMI, which is fully capable otherwise, did not allow me to update the BIOS using this interface, and the other options were using DOS or EFI – both less than ideal in this situation.

Buying IPMI license (A SFT-DCMS-SINGLE per node license) is a time consuming option, and I did not have the time at this stage. I do intend on completing the purchase, but in the meanwhile – I needed the license for this simple task.

I found in this post a small guide on how to do it. The general idea, which I will describe below, is to obtain the IPMI MAC address (in the format of xx-xx-xx-xx-xx-xx) and generate it through the script, like this:

export bmc_mac=xx-xx-xx-xx-xx-xx #obtain from IPMI
echo -n $bmc_mac | xxd -r -p | openssl dgst -sha1 -mac HMAC -macopt hexkey:8544E3B47ECA58F9583043F8 | awk '{print $2}' | cut -c 1-24 | fold -w4

Again – I urge you to purchase a license and do the right thing. It’s just sometimes you need a fast response. That’s all.