After upgrading nixos from an old nixos (I think it was 22.05) to 25.11, and nixos-shell (2.1.0 → 2.2.0), booting a VM that reuses an existing qcow fails in stage-1 due to waiting for /dev/disk/by-label/nixos. The same setup worked on 2.1.0 without issue.
The qcow had a valid ext4 root FS but no filesystem label (vfs-label empty).
I managed to fix this by setting: virtualisation.rootDevice = "/dev/disk/by-id/virtio-root";
If the below helps:
qemu-img info browser.qcow2
image: browser.qcow2
file format: qcow2
virtual size: 30 GiB (32212254720 bytes)
disk size: 6.1 GiB
cluster_size: 65536
Format specific information:
compat: 1.1
compression type: zlib
lazy refcounts: false
refcount bits: 16
corrupt: false
extended l2: false
Child node '/file':
filename: browser.qcow2
protocol type: file
file length: 6.1 GiB (6547046400 bytes)
disk size: 6.1 GiB
After upgrading nixos from an old nixos (I think it was 22.05) to 25.11, and nixos-shell (2.1.0 → 2.2.0), booting a VM that reuses an existing qcow fails in stage-1 due to waiting for
/dev/disk/by-label/nixos. The same setup worked on 2.1.0 without issue.The qcow had a valid ext4 root FS but no filesystem label (
vfs-labelempty).I managed to fix this by setting:
virtualisation.rootDevice = "/dev/disk/by-id/virtio-root";If the below helps: