Images created from SUSE Linux Enterprise instance snapshots in Google Compute Engine do not boot.

The problem is two fold. SUSE Linux Enterprise images are configured to use the root disk ID rather than the generic device name. Thus the attempt of booting from an image created from a snapshot will fail as the root device will have a different name than the root device in the original instance. The second problem is the network configuration. During initial boot the instance may encode, depending on he version of the origin of the instance, the mac address of the device in the udev rules and thus when an instance if successfully booted from a snapshot the network is not setup properly.

Both issues have been addressed in images released on or after March 10, 2015:
sles-11-sp3-v20150310
sles-12-v20150310

Any image with a version identifier of v20150310 or higher can be used with the
snapshot feature without making any changes to a running instance.

For already running instances the following procedure outlines how to prepare a running instance to create a snapshot from which a new image can be created that will successfully boot, all actions need to be performed as root.

SUSE Linux Enterprise Server 11 SP3 (sles-11-sp3)
1.) Edit /etc/sysconfig/bootloader
  • In the "DEFAULT_APPEND" assignment replace "root=/dev/disk/by-id.." with "root=/dev/sda1". Reform the same substitution for the "FAILSAFE_APPEND" assignment.
  • Add NON_PERSISTENT_DEVICE_NAMES=1 to the end of the line, after "quiet"



2.) Edit /etc/fstab
Replace "/dev/disk/by-id..." with "/dev/sda1"

3.) Edit /boot/menu.lst
  • Replace "root=/dev/disk/by-id.." with "root=/dev/sda1" and "disk=/dev/disk/by-id/..." with "disk=/dev/sda" in both options.
  • Add NON_PERSISTENT_DEVICE_NAMES=1 to the end of the line starting with "kernel"


4.) Reboot the instance

5.) Execute mkinitrd

6.) Edit /etc/udev/rules.d/70-persistent-net.rules (if it exists)
Remove the mac address condition, "ATTR{address}==.....", from the rules.

SUSE Linux Enterprise Server 12 (sles-12)
1.) Edit /etc/sysconfig/bootloader
  • In the "DEFAULT_APPEND" assignment replace "root=/dev/disk/by-id.." with "root=/dev/sda1" and "disk=/dev/disk/by-id/..." with "disk=/dev/sda". Perform the same substitution for the "FAILSAFE_APPEND" assignment.
  • Add NON_PERSISTENT_DEVICE_NAMES=1 to the end of the line, after "quiet"


2.) Edit /etc/fstab
Replace "/dev/disk/by-id..." with "/dev/sda1"

3.) Edit /etc/default/grub
  • In the "GRUB_CMDLINE_LINUX_DEFAULT" assignment replace "root=/dev/disk/by-id.." with "root=/dev/sda1" and "disk=/dev/disk/by-id/..." with "disk=/dev/sda".
  • Add NON_PERSISTENT_DEVICE_NAMES=1 to the end of the line, after "quiet"


4.) Create a new grub configuration (SLES 12)
  • export GRUB_DISABLE_LINUX_UUID=true
  • grub2-mkconfig > /boot/grub2/grub.cfg


5.) Execute mkinitrd

6.) Edit /etc/udev/rules.d/70-persistent-net.rules (if it exists)
Remove the mac address condition, "ATTR{address}==.....", from the rules.