diff --git a/src/core/virtio.cc b/src/core/virtio.cc index 91d1196e..b8d1cb86 100644 --- a/src/core/virtio.cc +++ b/src/core/virtio.cc @@ -26,6 +26,10 @@ static void scan_virtio_block(hwNode & device, const sysfs::entry & entry) if (devname.empty()) return; device.setLogicalName(devname); + vector e = entry.devices(); + if (e.size() == 1) { + device.setSerial(e[0].string_attr("serial")); + } scan_disk(device); device.claim(); }