Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure-arm.autogenerated_1: ERROR: -> OperationNotAllowed : Creation of managed images are not supported for virtual machine with TrustedLaunch security type." #13189

Closed
mycheryhr opened this issue Oct 18, 2024 · 2 comments
Labels

Comments

@mycheryhr
Copy link

Community Note

  • Base the Ubuntu 22.04 image on Azure galleries. I need to construct an application image using it as the foundation. The security type is Trusted Launch. The build process proceeds normally, however, an error arises during the push: Creation of managed images are not supported for virtual machine with TrustedLaunch security type.
  • It appears that Azure does not support creating an image with the security type set to TrustedLaunch, but it does support sharing it to a gallery as a VM image version. How can I accomplish this?

Overview of the Issue

A paragraph or two about the issue you're experiencing.
1
2

Reproduction Steps

Steps to reproduce this issue

Packer version

From Packer v1.11.2 packer-plugin-azure_v2.0.5_x5.0_linux_amd64

Simplified Packer Template

source "azure-arm" "autogenerated_1" {
  location                          = "${var.location}"
  managed_image_name                = "${var.dst_image_name}"
  managed_image_resource_group_name = "${var.dst_resource_group}"
  os_type                           = "Linux"
  security_type                     = "TrustedLaunch"
  shared_image_gallery {
    gallery_name   = "${var.src_gallery_name}"
    image_name     = "${var.src_image_name}"
    image_version  = "${var.src_image_version}"
    resource_group = "${var.src_resource_group}"
    subscription   = "${var.src_subscription}"
  }
  shared_image_gallery_destination {
    gallery_name        = "${var.dst_gallery_name}"
    image_name          = "${var.dst_image_name}"
    image_version       = "${var.dst_image_version}"
    replication_regions = "${var.dst_location}"
    resource_group      = "${var.dst_resource_group}"
  }
  vm_size = "${var.vm_size}"
}

Operating system and Environment details

Linux 5413070d-cf77-4f36-4f58-c9030abcbd6b 5.15.0-1073-azure #82~20.04.1-Ubuntu SMP Tue Sep 3 12:27:43 UTC 2024 x86_64 Linux

Log Fragments and crash.log files

==> azure-arm.autogenerated_1: performing CreateOrUpdate: images.ImagesClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status= Code="OperationNotAllowed" Message="Creation of managed images are not supported for virtual machine with TrustedLaunch security type."

@mycheryhr mycheryhr added the bug label Oct 18, 2024
@mycheryhr mycheryhr changed the title zure-arm.autogenerated_1: ERROR: -> OperationNotAllowed : Creation of managed images are not supported for virtual machine with TrustedLaunch security type." Azure-arm.autogenerated_1: ERROR: -> OperationNotAllowed : Creation of managed images are not supported for virtual machine with TrustedLaunch security type." Oct 18, 2024
@mycheryhr
Copy link
Author

Remove managed_image_name and managed_image_resource_group_name parameters, it's works normally.

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant