In Part 2 we saw how we can onboard machines at scale to Azure Update Manager by using Azure Policy. Further we saw how we can create alerts for the update process.

In this part I will focus on how to updating SUSE Linux Enterprise by using the Azure Update Manager.



Determine configured repositories on SUSE Linux Enterprise Server (SLES)

The VM is registered by Azure to the SCC which is the default behavior when BYOS is disabled in Azure.


When the VM is registered by Azure (BYOS is disabled) to the SCC, the repository URL is always plugin:/susecloud?……….


Below the SLES15-SP5-VM1 which was registered by hand to the SCC and BYOS was enabled during provisioning in Azure.

# SUSEConnect --status-text





Disable Bring Your Own Subscription (BYOS) for SLES Azure VMs

We can change the licensing for our SLES virtual machines below under Settings -> Operating system.


When disabling BYOS for SLES, we also need to execute the following commands below to enable

Register a SUSE Linux Enterprise instance with the closest, in most cases region local, SUSE operated update infrastructure. The client will reach out to a so called region server to obtain information about the closest update servers.

The information about how to find any one of the region servers running in a given cloud framework is built into the image that contains the registercloudguest executable.

The information of the update servers is cached to aid with HA fail-over if one of the update servers is
unreachable. The system is registered with the first responsive update server.

Source: https://github.com/SUSE-Enceladus/cloud-regionsrv-client/blob/master/man/man1/registercloudguest.1

# SUSEConnect --cleanup
# registercloudguest --force-new
# zypper refresh

Source: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/linux/suse-public-cloud-connectivity-registration-issues#action-4-force-registration


The defined repositories will change immediately to the plugin:/susecloud?…… URLs.





Zypper Locks

The message “The following items are locked and will not be changed by any action” when executing the zypper update command indicates that some packages have been locked (held) to prevent updates, downgrades, or removal. This is typically done to maintain stability, avoid unwanted updates, or for troubleshooting purposes.

To see which packages are locked, run:

# zypper locks

Plymouth is a graphical boot system and logger for Red Hat Enterprise Linux 7, which makes use of the kernel-based mode setting (KMS) and Direct Rendering Manager (DRM). Plymouth also handles user interaction during boot.

Source: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/desktop_migration_and_administration_guide/plymouth


If you want to remove the lock on specific packages so they can be updated, use:

# zypper removelock <package_name>


If you want to prevent specific packages from being updated (for example, to lock them again after unlocking), use:

# zypper addlock <package_name>




Reset Repositories and SUSEConnect


When switching from PAYG (pay-as-you-go subscription models) to BYOS aka Azure Hybrid Benefit (AHB)

BYOS virtual machines needs to use move the cloud update infrastructure to one of three options that provide software updates and patches to those virtual machines:


# zypper removerepo -all
# zypper refresh --services
# SUSEConnect --cleanup



When switching from BYOS aka Azure Hybrid Benefit (AHB) to PAYG (pay-as-you-go subscription models)

When disabling BYOS for SLES, we also need to execute the following commands below.

# SUSEConnect --cleanup
# registercloudguest --force-new
# zypper refresh


Remove specific Repo

# zypper removerepo <repo_alias_or_number>
# zypper removerepo 56





Links

Managing Software with Command Line Tools
https://documentation.suse.com/sles/12-SP5/html/SLES-all/cha-sw-cl.html

Troubleshoot connectivity and registration issues for SUSE Linux Enterprise Server VMs
https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/linux/suse-public-cloud-connectivity-registration-issues

Accessing the Public Cloud Update Infrastructure via a Proxy
https://www.suse.com/c/accessing-the-public-cloud-update-infrastructure-via-a-proxy/

SUSE Manager Server 5.0
https://www.suse.com/releasenotes/x86_64/SUSE-MANAGER/5.0/index.html