New Question

Revision history [back]

first creating a vm from a 1909 Azure base image

Please note that 19.09 is out of service on both the Client and Server offerings.

I'd recommend switching either to a Server 2022-based image, or the Server 2019 18.09 LTS if you really need to stick to 2019.

I'm not sure if the ovf-env.xml was never mounted, or it was dismounted before cloudbase-init could process it?

You are correct in that Azure will neglect to serve metadata to any VM whose image it deems was not properly sysprepped to its standards. (most notably, whether it was properly "/generalized" or not)

Here is a working example of sysprep arguments known to produce Azure-palatable images.

sysprep.exe /oobe /generalize /mode:vm /quit /quiet /unattend:$UNATTEND_XML_PATH

The above was lifted from a colleague's repository which contains Azure image building configs for Packer, which should be a quick and repeatable way to build Cloudbase-init into your images.

If you'd like to run the Packer builds yourself, please examine the README of that repository, as well as the notes in this reply to a similar question which includes various tips. (like replacing the Cloudbase-init config file Packer will inject)

Please let us know how it goes!