So even when using qemu-kvm VM you don"t need
boot = {
zfs = {
devNodes = "/dev/disk/by-uuid";
};
};
all you need to do is to set Serial for every disk
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" discard="unmap"/>
<source file="/var/lib/libvirt/images/nixos-unstable-6-clone.qcow2" index="3"/>
<backingStore/>
<target dev="vdc" bus="virtio"/>
<serial>third</serial>
<alias name="virtio-disk2"/>
<address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/>
</disk>
It is not set by default. and once you do you will see in your pool status
zpool status
pool: boot-pool
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
boot-pool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
virtio-first-part2 ONLINE 0 0 0
virtio-second-part1 ONLINE 0 0 0
errors: No known data errors
pool: tank
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
virtio-third-part1 ONLINE 0 0 0
virtio-fourth-part1 ONLINE 0 0 0
virtio-fifth-part1 ONLINE 0 0 0