The root cause of the problem was operator error. I should have specified a serial number for the disk when running virt-install
. I assumed that if I didn’t specify one, one would be generated automatically. But according to man virt-install
:
serial
Serial number of the emulated disk device. This is used in linux guests to set /dev/disk/by-id
symlinks. An example serial number might be: WD-WMAP9A966149
which I now know means that if one is not provided no /dev/disk/by-id
will be created. That is why by-id
(which is the default for zfs import
in the init
script) didn’t work and @dalto’s suggestion of using by-partuuid
fixed my problem. You learn something every day. I now see why @dalto uses by-partuuid
.