Hello, I have a kali 2021.1 image trying to prepare before uploading to Azure. The documentation on preparing the image is here:


My issue is that once I run the command:

sudo waagent ?force -deprovision

I get this result:

File "/usr/sbin/waagent", line 11, in 
load_entry_point('WALinuxAgent==2.2.47', 'console_scripts', 'waagent')()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2859, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2450, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2456, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/lib/python3/dist-packages/azurelinuxagent/agent.py", line 34, in 
import azurelinuxagent.common.event as event
File "/usr/lib/python3/dist-packages/azurelinuxagent/common/event.py", line 632, in 
event_logger = EventLogger()
File "/usr/lib/python3/dist-packages/azurelinuxagent/common/event.py", line 304, in init
osutil = get_osutil()
File "/usr/lib/python3/dist-packages/azurelinuxagent/common/osutil/factory.py", line 50, in get_osutil
return _get_osutil(distro_name, distro_code_name, distro_version, distro_full_name)
File "/usr/lib/python3/dist-packages/azurelinuxagent/common/osutil/factory.py", line 79, in _get_osutil
return DebianOSBaseUtil()
NameError: name 'DebianOSBaseUtil' is not defined

I have looked this up and the most promising thread was this one:


My issue is that I am not entirely sure how to import this package manually or where to find it. Thank you for any help, it is greatly appreciated.