New Question

Revision history [back]

click to hide/show revision 1
initial version

Azure Metadata Service fails on finding ovf-env.xml

I have a custom Windows image that I'm creating from a shared image gallery. I've created the image by first creating a vm from a 1909 Azure base image, installing cloudbase-init on the vm, sysprepping, then capturing the vm image in a share image gallery image version.

I'm getting on error with retrieving the ovf-env.xml file. On the VM, I can see that the E is available but there's no media:

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     E                       DVD-ROM         0 B  No Media

I'm not sure if the ovf-env.xml was never mounted, or it was dismounted before cloudbase-init could process it? The full error message is below:

 2021-03-30 21:14:05.778 1780 ERROR cloudbaseinit.metadata.services.azureservice [-] No drive containing file E6DA6616-8EC4-48E0-BE93-58CE6ACE3CFB.tag could be found: cloudbaseinit.exception.ItemNotFoundException: 
No drive containing file E6DA6616-8EC4-48E0-BE93-58CE6ACE3CFB.tag could be found
2021-03-30 21:14:05.778 1780 ERROR cloudbaseinit.metadata.services.azureservice Traceback (most recent call last):
2021-03-30 21:14:05.778 1780 ERROR cloudbaseinit.metadata.services.azureservice   File "C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\azureservice.py", line 463, in load
2021-03-30 21:14:05.778 1780 ERROR cloudbaseinit.metadata.services.azureservice     self._get_ovf_env()
2021-03-30 21:14:05.778 1780 ERROR cloudbaseinit.metadata.services.azureservice   File "C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\azureservice.py", line 344, in _get_ovf_env
2021-03-30 21:14:05.778 1780 ERROR cloudbaseinit.metadata.services.azureservice     ovf_env_path = self._get_ovf_env_path()
2021-03-30 21:14:05.778 1780 ERROR cloudbaseinit.metadata.services.azureservice   File "C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\azureservice.py", line 332, in _get_ovf_env_path
2021-03-30 21:14:05.778 1780 ERROR cloudbaseinit.metadata.services.azureservice     base_path = self._get_config_set_drive_path()
2021-03-30 21:14:05.778 1780 ERROR cloudbaseinit.metadata.services.azureservice   File "C:\Program Files\Cloudbase Solutions\Cloudbase-Init\Python\lib\site-packages\cloudbaseinit\metadata\services\azureservice.py", line 328, in _get_config_set_drive_path
2021-03-30 21:14:05.778 1780 ERROR cloudbaseinit.metadata.services.azureservice     OVF_ENV_DRIVE_TAG)
2021-03-30 21:14:05.778 1780 ERROR cloudbaseinit.metadata.services.azureservice cloudbaseinit.exception.ItemNotFoundException: No drive containing file E6DA6616-8EC4-48E0-BE93-58CE6ACE3CFB.tag could be found

This is my cloudbase-init config:

[DEFAULT]
bsdtar_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\bsdtar.exe
mtools_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\

verbose=true
debug=true
logdir=C:\var\log\
logfile=cloudbase-init.log
default_log_levels=comtypes=INFO,suds=INFO,iso8601=WARN,requests=WARN

volumes_to_extend=2

config_drive_raw_hhd=false
config_drive_cdrom=false
config_drive_vfat=false
cdrom=false

first_logon_behaviour=no

volumes_to_extend=2
san_policy=OnlineAll
trim_enabled=True
ephemeral_disk_volume_label="Temporary Storage"

metadata_report_provisioning_started=True
metadata_report_provisioning_completed=True

metadata_services=cloudbaseinit.metadata.services.vmwareguestinfoservice.VMwareGuestInfoService,
        cloudbaseinit.metadata.services.azureservice.AzureService
plugins=cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin,
        cloudbaseinit.plugins.windows.sanpolicy.SANPolicyPlugin,
        cloudbaseinit.plugins.common.trim.TrimConfigPlugin,
        cloudbaseinit.plugins.common.ephemeraldisk.EphemeralDiskPlugin,
        cloudbaseinit.plugins.common.userdata.UserDataPlugin

allow_reboot=true
stop_service_on_exit=false
check_latest_version=false