Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

Default VM configuration incompatible with Gen2 images #57

@timtylin

Description

@timtylin

I'm using the following field in properties in order to get a Gen2 CentOS7 image:

                "vmProfile": {
                    "vmSize": "Standard_D2s_v3",
                    "osDiskSizeGB": 20
                },
                "source": {
                    "type": "PlatformImage",
                    "publisher": "OpenLogic",
                    "offer": "CentOS",
                    "sku": "7_8-gen2",
                    "version": "latest"
                }

However, when running the build, I'm noticing this in the logs:

PACKER OUT ==> azure-arm: ERROR: -> DeploymentFailed : At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.
PACKER ERR ==> azure-arm: ERROR:   -> BadRequest
PACKER OUT ==> azure-arm: ERROR:   -> BadRequest
PACKER ERR ==> azure-arm: ERROR:   -> BadRequest : Generation 2 Hypervisor Image and VM Size can only be used with managed-disk VMs.
PACKER OUT ==> azure-arm: ERROR:   -> BadRequest : Generation 2 Hypervisor Image and VM Size can only be used with managed-disk VMs.
PACKER ERR ==> azure-arm:

When I go to look at the deployment template that AIB is trying to provision in the temporary resource group, I noticed that the VM is seemingly hard-wired to use VHDs:

    "osDisk": {
        "caching": "ReadWrite",
        "createOption": "FromImage",
        "name": "[parameters('osDiskName')]",
        "vhd": {
            "uri": "[concat(parameters('storageAccountBlobEndpoint'),variables('vmStorageAccountContainerName'),'/', parameters('osDiskName'),'.vhd')]"
        }
    }

So I'm basically wondering whether Gen2 images are supported?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions