How can I troubleshoot issues when I upgrade the SUSE operating system on my EC2 instance?

4 minute read

I tried to upgrade the SUSE operating system (OS) on my Amazon Elastic Compute Cloud (Amazon EC2) instance and received errors, such as instance status check failure, de-registered OS, or Zypper commands failure.


Look for instance status check failures

For instance status check failures, see How do I troubleshoot an EC2 Linux instance that failed the instance status check due to operating system issues?

Use the susecloud-repocheck script to automatically diagnose and fix minor issues

The susecloud-repocheck script performs an OS repository check. And, it corrects issues that prevent the instance from registering to the SUSE update infrastructure for the following:

  • Microsoft Azure
  • AWS
  • Google Cloud Platform (GCP)
  • Pay-as-you-go (PAYG) on-demand instances

For more information, see susecloud-repocheck on the SUSE GitHub repository.

To run the script, use the following command:

$ python3 <(curl -sL

The script creates logs in the /var/log/ directory named sc-repocheck_<YYMMDD_hhmmss>.tar.xz.

Manually verify registration and resolve upgrade failures

Verify the instance billingProducts or marketplaceProductCodes code

For PAYG vanilla SLES, verify the instance's billingProducts code. For PAYG SLES for SAP Applications, verify the marketplaceProductCodes code.

Run the following command to verify the billingProducts or marketplaceProductCodes code:

# /usr/bin/curl --noproxy '*' -w "\n" -s -H "X-aws-ec2-metadata-token: $(curl --noproxy '*' -s -X PUT "" -H "X-aws-ec2-metadata-token-ttl-seconds: 300")" | grep -E 'billingProducts|marketplaceProductCodes'

The following is the output for the command:

 billingProducts" : [ "bp-********" ]


"marketplaceProductCodes" : \[ "\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*" \],

Check for the SMT registration entries in the /etc/hosts file

In the /etc/hosts file, look for an entry that follows the line # Added by SMT registration do not remove, retain comment as well.

Note: More than one SUSE public cloud update server exists within an AWS Region. For more information, see the list of update server IP addresses for AWS Regions on the SUSE Public Cloud Solutions website.

To verify the current registration status, run the following command:

# SUSEConnect -s

In the preceding command output, verify whether the Status parameter is Registered or Not Registered. If the output is Not Registered, then re-register the instance.

To remove entries from previous registrations, run the following command:

# registercloudguest --clean

To re-register the instance, run the following command:

# registercloudguest --force-new

To verify the current registration status, run the following command:

# SUSEConnect -s

If registration fails, then review the logs in /var/log/cloudregister to determine the failure reason. The following is an example error in the logs:

SUSEConnect error: Errno::ENOSPC: No space left on device

Remove any duplicate or additional SMT registration entries in the /etc/hosts file. The following is a sample entry added by SMT registration:

# vi /etc/hosts
# Added by SMT registration do not remove, retain comment as well smt-ec2

Troubleshoot common registration errors

To troubleshoot common registration errors, complete the following steps:

  1. To verify that the required cloud-regionsrv-client and related dependency packages are installed in your OS, run the following command:

    # rpm -qa | grep -E 'cloud-regionsrv-client|cloud-regionsrv-client-plugin-ec2|regionServiceClientConfigEC2|SUSEConnect|suseconnect-ng|python3-ec2metadata|python3-dnspython|python3-lxml|python3-cssselect|python3-M2Crypto|python3-zypp-plugin|libzypp|ruby-common'

    The following is sample out from the preceding command:


    If the packages are outdated or missing and the operating system doesn't have access to Zypper, then upgrade offline. To upgrade offline, download the rpm packages using Zypper on another working host and transfer the rpm to the non-working host. Then, perform a Zypper install of the rpm packages

  2. Identify missing repositories.

  3. If your SUSE instance is missing software repositories, then run the following commands to force a new registration with all available repositories.

    # registercloudguest --force-new
    # SUSEConnect --list-extensions
    # zypper lr --uri

Related information

SUSE Linux Enterprise Server (SLES) on Amazon EC2 FAQs

AWS OFFICIALUpdated 3 months ago