Image from snapshot will not boot

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
[LIST]
[] 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”
[/LIST]

2.) Edit /etc/fstab
Replace “/dev/disk/by-id…” with “/dev/sda1”

3.) Edit /boot/menu.lst
[LIST]
[] 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”
[/LIST]

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
[LIST]
[] 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”
[/LIST]

2.) Edit /etc/fstab
Replace “/dev/disk/by-id…” with “/dev/sda1”

3.) Edit /etc/default/grub
[LIST]
[] 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”
[/LIST]

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

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.

rjschwei,

It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.

Has your issue been resolved? If not, you might try one of the following options:

Be sure to read the forum FAQ about what to expect in the way of responses:
http://forums.suse.com/faq.php

If this is a reply to a duplicate posting, please ignore and accept our apologies
and rest assured we will issue a stern reprimand to our posting bot.

Good luck!

Your SUSE Forums Team
http://forums.suse.com