New Question

Facing issue with cloudbase in Azure deployment

asked 2023-07-07 17:28:46 +0300

slingshot-123 gravatar image

Facing issue while trying to use Cloudbase init for post-provisioning post the Windows deployment in Azure. Cloudbase init is configured with the same steps as provided by GitHub Cloudbase and it is failing on Windows Cloudbase init service start.

Error : 2023-07-05 18:56:20.136 1808 ERROR cloudbaseinit.exception.ItemNotFoundException: No drive containing file E6DA6616-8EC4-48E0-BE93-58CE6ACE3CFB.tag could be found 2023-07-05 18:56:20.136 1808 ERROR 2023-07-05 18:56:20.151 1808 ERROR cloudbaseinit.init [-] No metadata service found: cloudbaseinit.exception.MetadataNotFoundException: No available service found 2023-07-05 18:56:20.151 1808 INFO cloudbaseinit.init [-] Plugins execution done 2023-07-05 18:56:20.151 1808 INFO cloudbaseinit.init [-] Stopping Cloudbase-Init service

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2023-07-11 13:08:26 +0300

Nashwan Azhari gravatar image

updated 2023-07-11 15:03:11 +0300

Hello, and thanks for running Cloudbase-init!

The error would indicate that Azure did not set up any metadata sources for the VM, as it will only do so for VM images which have been both sysprep'd and generalized, so my current suspicion is that there was some misstep in the image building process.

I can confirm that Cloudbase-init successfully boots and sets up SSH/WinRM on Server 2022 on Azure with a freshly-built image, so I'm not sure what might have caused your exact issue.

Seeing as through the process of building Azure VM images is finicky and prone to issues, I recommend you try to automate as many steps of it as possible, and preferably directly on Azure instead of doing it locally and uploading a VHD.

You may find an unofficial set of Packer configurations in this repository maintained by a colleague of mine. After installing Packer and the Azure az CLI on your host machine, please follow the instructions shown in the README of the /packer directory to build the image directly on Azure.

Some notes:

  • You may update any Cloudbase-init configuration options before running the Packer image build.
  • You may explicitly choose the version of the Cloudbase-init MSI or event a custom URL for the MSI you'd like to have installed in the image before building it. (though I'd recommend you use the current release)
  • You may also change the base Windows image Packer should use, though I recommend only using official Server 2019/2022 images provided by Microsoft as a base.
  • Packer uses Azure Vaults and some other resources not usually accessible by Service Principal accounts, so either create or update your account to allow for 'Microsoft.KeyVault/vaults/write' capabilities
  • There's also a handy script to create a test VM from the image in the same repo.

Please let us know if you were able to successfully build/run your image.

Additionally, for posterity, could you please provide full details on your broken image like the build versions of Windows and Cloudbase-init, as well as exactly how you installed and configured Cloudbase-init within the image?

EDIT: removed note on inject_user_pass setting, since the Cloudbase-init config in the linked repository has now been changed to always inject the password.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2023-07-07 17:28:46 +0300

Seen: 221 times

Last updated: Jul 11 '23