Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
documentation.suse.com / Public Cloud Guide / Managing cloud instances
Applies to SUSE Linux Enterprise

3 Managing cloud instances

SUSE Linux Enterprise in public clouds is managed almost like on bare metal or in virtual environments. Learn about what is different in the cloud.

3.1 Registering instances

Like other SUSE products, SUSE Linux Enterprise in public clouds has to be registered to receive updates. There are different ways to register, depending on the image flavor chosen for the instance.

  • PAYG instances are registered automatically against the SUSE-operated update infrastructure in the cloud framework region, or a geographically close region. The guestregister.service manages the registration on first boot.

    Important
    Important: Do not register PAYG instances with the SUSE Customer Center

    Registering PAYG instances with the SUSE Customer Center or your own RMT server will create conflicts that are not easily solved. Only register BYOS instances. PAYG instances are automatically registered against the correct update server.

  • BYOS instances have to be registered manually with your SUSE registration key. You can register with the cloud framework's SUSE update servers, the SUSE Customer Center, or your own SUSE Manager or RMT infrastructure.

There are two different ways to register BYOS instances:

  1. Any BYOS instance can be registered with the SUSE Customer Center or your own SUSE Manager or RMT infrastructure using SUSEConnect. Refer to Section 3.1.2, “Register with SUSEConnect for instructions.

  2. BYOS instances with cloud-regionsrv-client version 9.3.0 or higher can be registered with the cloud framework's SUSE update servers using registercloudguest. Using the cloud framework's update servers will result in faster package downloads. Registrations are forwarded from the update server to the SUSE Customer Center, so your cloud instances show up in your SUSE account and count against the system count of your subscription. Refer to Section 3.1.1, “Register with registercloudguest for instructions.

    Important
    Important: registercloudguest limitations

    Not all products and flavors can be registered with registercloudguest.

    • Container host (chost) images are optimized for container workloads and contain only a few packages outside of the bare minimum to make containers run. These images do not contain registercloudguest, but you can register instances with the SUSE Customer Center first, install the necessary packages and then register with the SUSE-operated update infrastructure in the cloud framework region. Refer to Procedure 3.1, “Switching from SUSEConnect to registercloudguest for instructions.

    • SUSE Linux Enterprise Micro (sle-micro) 5.1 and 5.2 images do not contain registercloudguest. To register an instance, use the command transactional-update register. Refer to the SUSE Linux Enterprise Micro Administration Guide for more information. Images of SLE Micro 5.3 and later versions include registercloudguest and can be registered as described in Section 3.1.1, “Register with registercloudguest.

    • SUSE Manager (suse-manager) can only be registered with the SUSE Customer Center.

In summary, use registercloudguest to register with the local cloud update infrastructure to benefit from faster downloads. Use SUSEConnect to register with SUSE Customer Center or your own SUSE Manager or RMT infrastructure.

3.1.1 Register with registercloudguest

To register a BYOS instance with registercloudguest, run:

# registercloudguest -r REGISTRATION_CODE  -e EMAIL_ADDRESS

Replace REGISTRATION_CODE with a valid registration code. Replace EMAIL_ADDRESS with the e-mail address associated with the SUSE account you or your organization uses to manage subscriptions.

BYOS instances created from images with a datestamp of 20220103 or later contain all required packages. For BYOS instances created from images with a date stamp prior to 20220103, perform the following steps:

Procedure 3.1: Switching from SUSEConnect to registercloudguest
  1. Check if the cloud-regionsrv-client package is installed:

    # rpm -q cloud-regionsrv-client

    If the package is not installed or older than version 9.3.0, install or update it.

    For instances created from images with a date stamp prior to 20220103, you first have to enable the Public Cloud Module. For SUSE Linux Enterprise 15 SP4, run:

    # SUSEConnect -p sle-module-public-cloud/15.4/x86_64

    For other versions or a complete list of modules and their product identifiers, run SUSEConnect --list-extensions.

    Install cloud-regionsrv-client. Depending on your cloud framework, you will need some additional packages.

    1. For Amazon EC2 run:

      # zypper in cloud-regionsrv-client cloud-regionsrv-client-plugin-ec2 \
       regionServiceClientConfigEC2 regionServiceCertsEC2
    2. For Microsoft Azure run:

      # zypper in cloud-regionsrv-client cloud-regionsrv-client-plugin-azure \
       regionServiceClientConfigAzure regionServiceCertsAzure
    3. For Google Compute Engine run:

      # zypper in cloud-regionsrv-client cloud-regionsrv-client-plugin-gce \
       regionServiceClientConfigGCE regionServiceCertsGCE
  2. Disconnect your instance from the SUSE Customer Center:

    # registercloudguest --clean

    Do not use SUSEConnect -d; it will no longer work.

  3. Connect the instance to the SUSE update infrastructure in the public cloud. Replace REGISTRATION_CODE with a valid registration code. Replace EMAIL_ADDRESS with the e-mail address associated with the SUSE account you or your organization uses to manage subscriptions.

    # registercloudguest -r REGISTRATION_CODE  -e EMAIL_ADDRESS

    This will only register the base product and any recommended products. For instances created from images with a datestamp later than 20220103, it will also set up the repositories for the Public Cloud Module.

3.1.2 Register with SUSEConnect

To register a BYOS instance with SUSEConnect, run:

# SUSEConnect -r REGISTRATION_CODE -e EMAIL_ADDRESS

Replace REGISTRATION_CODE with a valid registration code. Replace EMAIL_ADDRESS with the e-mail address associated with the SUSE account you or your organization uses to manage subscriptions.

To register with your own registration server, also provide its URL:

# SUSEConnect -r REGISTRATION_CODE -e EMAIL_ADDRESS --url URL

If the instance was already registered with registercloudguest, perform the following steps:

Procedure 3.2: Switching from registercloudguest to SUSEConnect
  1. Disconnect your instance from the SUSE-operated update infrastructure in the cloud framework:

    # registercloudguest --clean
  2. Uninstall the cloud-regionsrv-client package and its dependencies:

    # zypper rm -u cloud-regionsrv-client
  3. Clean up the registration status:

    # SUSEConnect --cleanup --url https://scc.suse.com
  4. Register the instance with SUSEConnect.

    1. To connect the instance to the SUSE Customer Center, run:

      # SUSEConnect -r REGISTRATION_CODE -e EMAIL_ADDRESS
    2. To connect the instance to the your own registration server, run:

      # SUSEConnect -r REGISTRATION_CODE -e EMAIL_ADDRESS --url URL

3.2 Deregister instances

If you are to decommission an instance, remember to deregister it before termination. This will ensure that the system gets removed from the SUSE Customer Center and is no longer counted against your subscription.

  1. Run SUSEConnect --status-text to check the registration status.

  2. If the system is registered, check if the file /var/log/guestregister exists. This usually indicates the system was registered with registercloudguest.

  3. Deregister the system:

    1. If a system was registered with registercloudguest, run:

      # registercloudguest --clean
    2. If a system was registered with SUSEConnect, run:

      # SUSEConnect -d

      If this does not work, make sure the package cloud-regionsrv-client is not installed. It may have been installed after the system was registered.