With SLES11 SP2 we support unattended migrations/upgrades from SLES10 and SLES11 to SLES11 SP2. I wrote a little blog post about that a while ago.
Today I want to show you how to use that feature with SUSE Manager, so I’ll write down some steps to take for doing an unattended migration of a SLES10 system to SLES11 SP2 by using the SUSE Manager Web Interface.
Step 1 – be uptodate
make sure your SUSE Manager and the client you want to migrate has installed all available updates, including the SUSE Manager tools. I know it sounds like a phrase but this time it’s serious. You’ll run into bugs or missing features if you don’t have the latest packages.
Step 2 – sync the SP2 channels
SP2 is not an extra base-channel but the SLES11 SP1 base-channel will be enhanced by two new child channels.
- SLES11 SP2 core
- SLES11 SP2 updates
if you open a terminal and run:
mgr-ncc-sync -l
you’ll see something like this:
[P] sles11-sp1-pool-i586
[.] sle11-hae-sp1-pool-i586
[.] sle11-hae-sp1-updates-i586
[.] sle11-hae-sp2-pool-i586
[.] sle11-hae-sp2-updates-i586
[.] sle11-sdk-sp1-pool-i586
[.] sle11-sdk-sp1-updates-i586
[X] sle11-sdk-sp2-core-i586
[.] sle11-sdk-sp2-updates-i586
[.] sle11-smt-updates-i586
[.] sle11-sp1-debuginfo-pool-i586
[.] sle11-sp1-debuginfo-updates-i586
[.] sle11-webyast-sp1-pool-i586
[.] sle11-webyast-sp1-updates-i586
[.] sles11-extras-i586
[P] sles11-sp1-suse-manager-tools-i586
[P] sles11-sp1-updates-i586
[P] sles11-sp2-core-i586
[P] sles11-sp2-updates-i586
so, subscribe to the channels via
mgr-ncc-sync -c sles11-sp2-core-i586
mgr-ncc-sync -c sles11-sp2-updates-i586
and they will be added automatically as a child channel to sles11-sp1-pool-i586 in your SUSE Manager.

SLES11 SP2 Channels
Because the SP2 channels are just children of the SP1 base-channel, you can migrate from SP1 to SP2 very easily by just adding the new child channels to the Activation Key and do a “zypper dup”. That will do an online migration (without reboot) of SP1 to SP2. unfortunately the sentence before might be wrong. In theory it should work but problems were reported with that step, so I need to try it on my own. Anyway, this blog post is about migrating with AutoYaST and not with zypper 
This blog post is about offline migration. That means the machine will reboot to do the upgrade – it’s not happening in the running system and the upgrade is controlled by YaST/AutoYaST, not a script doing zypper calls.
Step 3 – create an Autoinstall distribution
like with all distributions you want to autoinstall, we need to create a SLES11 SP2 distribution in the SUSE Manager. So mount the SLES11 SP2 DVD and then, in the SUSE Manager web UI, click on “Systems” -> “Autoinstallation” -> “Distributions” and then the create new distribution link in the upper right.
You’ll see a mask like the one in the screenshot.

SLES11 SP2 Autoinstall Tree
In my screenshot I mounted the DVD to /media/sles11-sp2-dvd. If you remember, in step 2 we synced the SP2 channels as child channels of the SP1 base-channel. That’s why we choose the SP1 base-channel here, even if we upgrade to SP2.
Step 4 – create an Activation Key for your SP2 systems
We need to switch from the old SLES10 base channel to the new SP2 base channel and so we need a key that is bound to that channel.

Create Activation Key
don’t forget to add all the required channels to the key by clicking on
Child Channels in the Activation Key menu bar.

Channels for Activation Key
Step 5 – upload an AutoYaST profile for the upgrade
as base I used the XML file from my blog post about the unattended upgrade process with just a few enhancements:
- I added all child channels as an add-on
- I added a chroot-script to fix the grub-config
- I added an init-script SNIPPET to do the registration at the
end of the installation automatically
<?xml version="1.0"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<scripts>
<chroot-scripts config:type="list">
<script>
<source><![CDATA[
sed -i '/^title kick/,/initrd/d' /boot/grub/menu.lst
sed -i 's/^default .*/default 0/' /boot/grub/menu.lst
]]>
</source>
<filename>fix_menu_lst.sh</filename>
<debug config:type="boolean">true</debug>
<chrooted config:type="boolean">true</chrooted>
</script>
</chroot-scripts>
<init-scripts config:type="list">
$SNIPPET('spacewalk/register_sles')
</init-scripts>
</scripts>
<add-on>
<add_on_products config:type="list">
<listentry>
<ask_on_error config:type="boolean">true</ask_on_error>
<media_url>http://$redhat_management_server/ks/dist/child/sles11-sp1-suse-manager-tools-i586/sles11-sp2-i586-ks2</media_url>
<name>susemanager tools</name>
<product>SM Tools</product>
<product_dir>/</product_dir>
</listentry>
<listentry>
<ask_on_error config:type="boolean">true</ask_on_error>
<media_url>http://$redhat_management_server/ks/dist/child/sles11-sp1-updates-i586/sles11-sp2-i586-ks2</media_url>
<name>SLES11-SP1-updates</name>
<product>SLES11 SP1 updates</product>
<product_dir>/</product_dir>
</listentry>
<listentry>
<ask_on_error config:type="boolean">true</ask_on_error>
<media_url>http://$redhat_management_server/ks/dist/child/sles11-sp2-core-i586/sles11-sp2-i586-ks2</media_url>
<name>SLES11-SP2-Core</name>
<product>SLES11 SP2 Core</product>
<product_dir>/</product_dir>
</listentry>
<listentry>
<ask_on_error config:type="boolean">true</ask_on_error>
<media_url>http://$redhat_management_server/ks/dist/child/sles11-sp2-updates-i586/sles11-sp2-i586-ks2</media_url>
<name>SLES11-SP2-updates</name>
<product>SLES11 SP2 updates</product>
<product_dir>/</product_dir>
</listentry>
</add_on_products>
</add-on>
<upgrade>
<only_installed_packages config:type="boolean">false</only_installed_packages>
<stop_on_solver_conflict config:type="boolean">true</stop_on_solver_conflict>
</upgrade>
<software>
<packages config:type="list">
<package>autoyast2-installation</package>
</packages>
<patterns config:type="list">
<pattern>base</pattern>
</patterns>
</software>
<backup>
<sysconfig config:type="boolean">true</sysconfig>
<modified config:type="boolean">true</modified>
<remove_old config:type="boolean">false</remove_old>
</backup>
<networking>
<keep_install_network config:type="boolean">true</keep_install_network>
<start_immediately config:type="boolean">true</start_immediately>
</networking>
<general>
$SNIPPET('spacewalk/sles_no_signature_checks')
<mode>
<confirm config:type="boolean">true</confirm>
</mode>
</general>
</profile>
The ‘spacewalk/register_sles’ SNIPPET makes use of a variable called registration_key and so you want to set it to the key created in step 4. My SLES11 SP2 key is called sles11-sp2-i586-key so I set the variable to that.

Autoinstall Key Variable
You can take a closer look at the SNIPPET if you click on the
Kickstart Snippets link on the left. Of course you can use your own SNIPPETS if you like – the
‘spacewalk/register_sles’ is just an example.
Step 6 – add the autoupgrade=1 parameter

autoupgrade parameter
to tell the installer that this will be an upgrade, you need to put
autoupgrade=1 to your kernel parameter list. Do that in the
Kernel Options field of the profile, like I did in the screenshot.
I have a patch ready that will do that step automatically but it’s probably not yet in the code you are using because it’s still experimental at the current state.
Step 7 – you are done
everything is prepared to do the upgrade now, so you can choose the
system you want to upgrade and go to:
“Provisioning” -> “Autoinstallation” -> “Schedule”
choose the XML profile you have uploaded in step 5

Start Migration Process
click on
Schedule Autoinstallation and Finish at the bottom of that page.
The next time the machine asks the SUSE Manager server for jobs, it’ll receive a reinstallation job. It will fetch the kernel and the initrd and will write a new /boot/grub/menu.lst with a config that will load the new kernel+initrd the next time it boots – so no PXE boot is required.
A shutdown of the machine is initiated as well, that’ll take effect 3 minutes after the job was fetched.
A drawback of this method online and offline is, that you’ll lose the history of the machine in SUSE Manager. There is no way to prevent that at the moment but we’ll look into it to enhance that part of the migration but for the moment, it is like it is.
That’s all you need to know to do a migration from an old SLES to the new SLES11 SP2 with SUSE Manager.
I’d also recommend you to read the blog post about the unattended upgrade in general, so you learn more about that process.
ciao, Uwe