0

I am using the https://github.com/Azure/avdaccelerator Bicep files to setup AVD.

In my AVD Shared Services subscription I am trying to generate the VM Image Version so I can use it to deploy a Confidential VM. Confidential requires that I host the image myself versus pulling from the marketplace.

I don't think Confidential VM has anything to do with my issues though, because the Image Template has no notion of sercurityType.

I'm using the latest win11 multi image

  win11_22h2: {
    osType: 'Windows'
    osState: 'Generalized'
    offer: 'windows-11'
    publisher: 'MicrosoftWindowsDesktop'
    sku: 'win11-22h2-avd'
    hyperVGeneration: 'V2'
    version: 'latest'
}

The logs of the Image Template build aren't showing any obvious errors. It just gets to the end and decides for some reason that there are no artifacts to publish. I've tried many different skus and they all result in the same thing.

PACKER ERR ==> Builds finished but no artifacts were created.

The troubleshooting docs just say to try again, but I've been trying all day and can't get past this. Any help would be appreciated. I went through the process of creating an image version from the "capture" tool inside of the vm blade.

Part of that process was logging into the vm and running sysprep. When I did that, I had to disable bitlocker before it would run. I am wondering if something similar is going on behind the scenes within Image Template builder? I'm not sure what is enabling bitlocker on the vms, so it's possible the one being spun up during image build is having the same issue? Could be unrelated.

Even more confusing is one attempt it made it past customization.log and started on validation.log... and that failed with the same no artifacts were created message in the logs. But in the portal ui when I click the red fail link it shows "Failed in distributing 1 images out of total 1: Check the logs file for more information"

This is the Bicep that created the Image Template

module imageTemplate '../carml/1.3.0/Microsoft.VirtualMachineImages/imageTemplates/deploy.bicep' = {
    scope: resourceGroup(sharedServicesSubId, varResourceGroupName)
    name: 'Image-Template_${time}'
    params: {
        name: varImageTemplateName
        subnetId: !empty(existingVirtualNetworkResourceId) && !empty(existingSubnetName) ? '${existingVirtualNetworkResourceId}/subnets/${existingSubnetName}' : ''
        userMsiName: userAssignedManagedIdentity.outputs.name
        userMsiResourceGroup: userAssignedManagedIdentity.outputs.resourceGroupName
        location: deploymentLocation
        imageReplicationRegions: varImageReplicationRegions
        storageAccountType: imageVersionStorageAccountType
        sigImageDefinitionId: image.outputs.resourceId
        vmSize: varVmSize
        customizationSteps: varCustomizationSteps
        imageSource: {
            type: 'PlatformImage'
            publisher: varOperatingSystemImageDefinitions[operatingSystemImage].publisher
            offer: varOperatingSystemImageDefinitions[operatingSystemImage].offer
            sku: varOperatingSystemImageDefinitions[operatingSystemImage].sku
            version: varOperatingSystemImageDefinitions[operatingSystemImage].version
        }
        tags: enableResourceTags ? varCommonResourceTags : {}
    }
    dependsOn: [
        image
        gallery
        avdSharedResourcesRg
        roleAssignments
    ]
}
Josh
  • 1,648
  • 8
  • 27
  • 58

0 Answers0