Why a machine fails to boot on target site with the message Timed out waiting for device

Why a machine fails to boot on target site with the message "Timed out waiting for device"

Challenge

A machine fails to boot with the message "Timed out waiting for device".

Cause

During a cross-hypervisor replication, storage device names might change (e.g. /dev/sda might become /dev/vda) 

Solution

Use device paths in /etc/fstab for Linux machines.

For example, here is one of these configurations:


/dev/mapper/lv_vg-root  / ext4    defaults 1 1

UUID=e9d508f8-fd84-4a92-a2e2-9b86a95bcfe6 /boot                   ext4 defaults 1 2

/dev/mapper/lv_vg-swap  swap swap    defaults 0 0

/dev/sdb1  /data ext4  defaults 0   0


The line starting with /dev/sdb1 is dangerous, because it might become /dev/vdb1 after migration and the machine will fail to boot with message "Timed out waiting for device".


To avoid this use either UUIDs or LVM names instead of device paths (like in the other lines of this example fstab).