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

Default VM configuration incompatible with Gen2 images #57

Open
timtylin opened this issue Jul 17, 2020 · 8 comments
Open

Default VM configuration incompatible with Gen2 images #57

timtylin opened this issue Jul 17, 2020 · 8 comments
Labels
enhancement New feature or request

Comments

@timtylin
Copy link

timtylin commented Jul 17, 2020

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?

@danielsollondon danielsollondon added the enhancement New feature or request label Jul 18, 2020
@danielsollondon
Copy link
Owner

Hi @timtylin - Gen2 image are not yet supported with AIB. This is on the roadmap, I would hope by the end of the calendar year, but I will have a better idea in September.

@timtylin
Copy link
Author

Ah okay. It would be great to have somewhere in the documentation a warning regarding this, as that would have saved me quite a few hours of digging around.

@danielsollondon
Copy link
Owner

Hi @timtylin , apologies for the delayed response and the lack of docs, I did update the docs a while ago, however, we do now have a workaround. As mentioned AB does not natively support distributing Gen2 images to the Shared Image Gallery (SIG), or Managed Images. However, you can select a Gen2 source, a distribute to a VHD, then as a post process, create a Managed Image from the VHD, and inject that as a Gen2 image into the SIG. Not ideal, but maybe useful.

@virtualwebber
Copy link

@danielsollondon I came across this whilst looking for gen2 support in AIB and SIG, do you know when its expected?

@agm83
Copy link

agm83 commented Oct 12, 2021

Hi , same here... Any news?
BTW, I was able to use above workaround. Thank you!

@kof-f
Copy link

kof-f commented Oct 19, 2021

Hey All,

I'm Kofi and I'm currently the PM for Azure Image Builder. Dan has transitioned to another team.

Gen2 support is expected by the end of the calendar year. We are deprecating this repo soon, so in the future please leave any issues/feature requests in our official repo: https://github.com/Azure/azvmimagebuilder

@schiffne
Copy link

schiffne commented Nov 8, 2021

HI Kofi, are there any updates in regards to Gen 2 support. Can we join a private preview to provide feedback to your team. Please let us know asap, as it would help our Windows 365 rollout, in order to decide how we would create our base image going forward. Thanks!

@seemonrajs
Copy link

Hi @danielsollondon ,

We are planning to implement AIP with Windows 11 multi-session for our production AVD rollout. Could you please suggest if AIB is fully supported for this scenario now, especially for Gen 2 VMs?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants