Cloned machine does not boot up properly
This document (3048119) is provided subject to the disclaimer at the end of this document.
environment
Novell SUSE Linux Enterprise Server 10
Novell SUSE Linux Enterprise Server 9
Novell Open Enterprise Server (Linux based)
Novell Open Enterprise Server 1 (OES1) Support Pack 2 Linux
Novell Open Enterprise Server 1 (OES1) Support Pack 1 Linux
Novell SUSE Linux Enterprise Desktop 10
Novell Linux Desktop 9

situation
A virtual machine has been cloned (or a physical machine has been cloned onto identical hardware).
When trying to boot the clone, it does not come up properly:

the root filesystem or other filesystems are not being found, or
the network does not come up, or
the network device names have changed.

resolution
Disable the use of persistent network device names and of persistent storage device names prior to cloning.

additional notes
Background: persistent device names

Please refer to the product documentation for in-depth background on persistent device names. In short, persistent device names provide stable names for network and storage devices, regardless of the order of recognition or the connection used for the device.

Disabling the use of persistent network device names (CODE10 products)

On CODE10 products like SUSE Linux Enterprise Server 10, the use of persistent network device names is disabled in three steps.

Clear the udev configuration for the network devices.

Clear the udev configuration for the network devices as follows:

cat < /dev/null > /etc/udev/rules.d/30-net_persistent_names.rules


Rename the Ethernet configuration files

In order for the Ethernet configuration to come up on boot, the Ethernet
configuration has to be renamed.

Go to /etc/sysconfig/network
Find the ifcfg-eth... file for each Ethernet device (the trailing identifier is the MAC address for the device), for example: ifcfg-eth-id-00:AA:BB:11:22:33
Rename the file to ifcfg-ethX. For example, to have the configuration
for eth0 the name would be: ifcfg-eth0
Change network configuration to not use udev

Open /etc/sysconfig/network/config for editing
Find the line reading:
FORCE_PERSISTENT_NAMES="yes"
Change it to:
FORCE_PERSISTENT_NAMES="no"
Save
Reboot

Disabling the use of persistent network device names (CODE9 products)

On CODE9 products like SUSE Linux Enterprise Server 9, udev is not used, and is not as involved as in SLE 10. All that needs to be done is to rename the Ethernet configuration file.

Rename Ethernet configuration files

In order for the Ethernet configuration to come up on boot, the Ethernet configuration has to be renamed.

Go to /etc/sysconfig/network
Find the ifcfg-eth... file for each Ethernet device (the trailing identifier is the MAC address for the device), for example: ifcfg-eth-id-00:AA:BB:11:22:33
Rename the file to ifcfg-ethX. For example, to have the configuration for eth0 the name would be: ifcfg-eth0.


Disabling the use of persistent storage device names (CODE10 and CODE9 products)

On CODE10 products like SUSE Linux Enterprise Server 10, the use of persistent names for storage devices is recommended in general; it is documented in the OpenSUSE wiki entry Persistant_Storage_Device_Names. As with network devices, the use of persistent names for storage can cause problems when cloning machines though.

To disable the use of persistent storage device names, proceed as follows:

Examine the boot loader configuration file /boot/grub/menu.lst and the filesystem table /etc/fstab for the presence of /dev/disk/by-* references.
Store the mapping of /dev/disk/by-* symlinks to their targets in a scratch file:

ls -l /dev/disk/by-* > /tmp/scratchpad.txt

Remove all entries that involve storage that is not local to the system (such as SAN or iSCSI volumes) from the scratch file.

Edit /boot/grub/menu.lst and /etc/fstab, replacing the /dev/disk/by-* entries in them which occur in the scratch file by the device names the symlinks point to.
Reboot the system and verify that it comes up cleanly.