Create a custom Windows image with cloudbase-init in Azure

To create a custom Windows image with cloudbase-init in Azure:

  1. Deploy a Windows VM

  2. Connect to the VM using RDP

  3. Download the right cloudbase-init installer from GitHub - cloudbase/cloudbase-init: Cross-platform instance initialization

  4. Run the installer:

    1. Do not select the Use metadata password checkbox, because Azure does not support password setting through metadata

    2. Click Next

    3. Select the checkboxes to Run Sysprep… and Shutdown when Sysprep terminates.
      Do not click Finish yet

    4. Go into the VM console and edit the cloudbase-init-unattend.conf file (at C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf by default) and set the following options:

      metadata_services=cloudbaseinit.metadata.services.azureservice.AzureService plugins=cloudbaseinit.plugins.windows.createuser.CreateUserPlugin,cloudbaseinit.plugins.common.setuserpassword.SetUserPasswordPlugin,cloudbaseinit.plugins.common.userdata.UserDataPlugin first_logon_behaviour=no
    5. Click Finish

  5. In Azure, go to the Azure portal and save a snapshot of the VM to create the custom Windows image.

Copyright © 2006-2024, Abiquo Holdings SL. All rights reserved