Google
Edit File: 61-persistent-lw-virtio.rules
# persistent lw virtio links: /dev/{type}/{uniq_id} ACTION!="add|change", GOTO="persistent_lw_virtio_end" SUBSYSTEM!="block", GOTO="persistent_lw_virtio_end" # ignore partitions that span the entire disk TEST=="whole_disk", GOTO="persistent_lw_virtio_end" KERNEL=="vd*", ENV{DEVTYPE}=="disk", PROGRAM="/bin/sed 's|-|/|' /sys/block/%k/serial", SYMLINK+="%c" KERNEL=="vd*", ENV{DEVTYPE}=="partition", PROGRAM="/bin/sed 's|-|/|;s|$|-part%n|' /sys/block/%P/serial", SYMLINK+="%c" LABEL="persistent_lw_virtio_end"