Azure / Azure/azure-linux-extensions

Backup not possible from Azure Portal with waagent + Ubuntu 26.04

Open
#2,172 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
333
Forks
278
Avg merge
2d 9h
Merged PRs (30d)
4

Description

Deployed the new Ubuntu 26.04 LTS and everything was working fine until the backup was configured.
Seems to be related to the similar issue with Ubuntu 24.04 LTS when it got released in 2024.
Ubuntu 26.04 is installed with Python 3.14 which does not have crypt or imp.

[stderr]
counting is deprecated, ignoring assignment: CPUAccounting=no
Running as unit: enable_5733d770-43a9-4362-a43a-8dfa1866776d.scope; invocation ID: fdb3594c441e4c0f9e1c0a450d34ff80
Traceback (most recent call last):
File "/var/lib/waagent/Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0.9225.0/main/Utils/WAAgentUtil.py", line 66, in
spec.loader.exec_module(waagent)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "", line 759, in exec_module
File "", line 491, in _call_with_frames_removed
File "/var/lib/waagent/Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0.9225.0/main/WaagentLib.py", line 26, in
import crypt
ModuleNotFoundError: No module named 'crypt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/var/lib/waagent/Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0.9225.0/main/Utils/WAAgentUtil.py", line 69, in
import imp
ModuleNotFoundError: No module named 'imp'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/var/lib/waagent/Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0.9225.0/main/handle.py", line 40, in
from mounts import Mounts
File "/var/lib/waagent/Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0.9225.0/main/mounts.py", line 25, in
from Utils.DiskUtil import DiskUtil
File "/var/lib/waagent/Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0.9225.0/main/Utils/DiskUtil.py", line 29, in
import Utils.HandlerUtil
File "/var/lib/waagent/Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0.9225.0/main/Utils/HandlerUtil.py", line 69, in
import Utils.WAAgentUtil
File "/var/lib/waagent/Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0.9225.0/main/Utils/WAAgentUtil.py", line 76, in
raise Exception(str(e))
Exception: No module named 'imp'
Traceback (most recent call last):
File "/var/lib/waagent/Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0.9225.0/main/Utils/WAAgentUtil.py", line 66, in
spec.loader.exec_module(waagent)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "", line 759, in exec_module
File "", line 491, in _call_with_frames_removed
File "/var/lib/waagent/Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0.9225.0/main/WaagentLib.py", line 26, in
import crypt
ModuleNotFoundError: No module named 'crypt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/var/lib/waagent/Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0.9225.0/main/Utils/WAAgentUtil.py", line 69, in
import imp
ModuleNotFoundError: No module named 'imp'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/var/lib/waagent/Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0.9225.0/main/handle.py", line 40, in
from mounts import Mounts
File "/var/lib/waagent/Microsoft.Azure., duration=0
2026-05-12T06:18:13.542963Z INFO ExtHandler ExtHandler ProcessExtensionsGoalState completed [etag_9836062535883227515 2061 ms]

2026-05-12T06:18:21.544287Z WARNING ExtHandler ExtHandler [PERIODIC] This status is being reported by the Guest Agent since no status file was reported by extension Microsoft.Azure.RecoveryServices.VMSnapshotLinux: [ExtensionStatusError] Status file /var/lib/waagent/Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0.9225.0/status/2.status does not exist
2026-05-12T06:18:22.271698Z INFO ExtHandler ExtHandler Extension status: [('Microsoft.Azure.RecoveryServices.VMSnapshotLinux', 'transitioning')]
2026-05-12T06:19:03.244321Z INFO MonitorHandler ExtHandler Stopped tracking cpu cgroup Microsoft.Azure.RecoveryServices.VMSnapshotLinux-1.0.9225.0 [/sys/fs/cgroup/azure.slice/azure-vmextensions.slice/azure-vmextensions-Microsoft.Azure.RecoveryServices.VMSnapshotLinux.slice]

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the source corresponding to main/Utils/WAAgentUtil.py and main/WaagentLib.py, then inspect the imports that fail under Python 3.14. Reproduce the Azure Recovery Services snapshot backup on Ubuntu 26.04 and run the extension's available tests. Done means the extension initializes without crypt or imp errors and the backup completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python, ubuntu
Domain
cloud, devops, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.