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

Packer Failed to enable fast launch: %!s(<nil>) #12509

Closed
Eddie4Frost opened this issue Jul 18, 2023 · 2 comments
Closed

Packer Failed to enable fast launch: %!s(<nil>) #12509

Eddie4Frost opened this issue Jul 18, 2023 · 2 comments

Comments

@Eddie4Frost
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Overview of the Issue

During a Windows AMI creation, using the Amazon EBS Source, the feature related to Fast Launch is returning the following error:
Failed to enable fast launch: %!s(<nil>)

Important to mention, I tested with a custom fast-launch template forcing a default VPC, but the issue still occurs.

Reproduction Steps

To reproduce the issue, you can use an AMI template using the Amazon EBS source and enable the Fast Launch feature to Windows AMI

Packer version

From 1.9.1-1

Packer Template

variable "access_key" {
  type    = string
  default = "YOUR_ACCESS_KEY"
}

variable "secret_key" {
  type    = string
  default = "YOUR_SECRET_KEY"
}

variable "region" {
  type    = string
  default = "us-east-1"
}

variable "source_ami" {
  type    = string
  default = "ami-0123456789abcdef0"
}

variable "instance_type" {
  type    = string
  default = "t2.micro"
}

variable "ssh_username" {
  type    = string
  default = "Administrator"
}

variable "ami_name" {
  type    = string
  default = "MyWindowsAMI {{timestamp}}"
}

builders {
  name          = "amazon-ebs"
  type          = "amazon-ebs"
  access_key    = var.access_key
  secret_key    = var.secret_key
  region        = var.region
  source_ami    = var.source_ami
  instance_type = var.instance_type
  ssh_username  = var.ssh_username
  ami_name      = var.ami_name

  fast_launch {
    enable_fast_launch = true
    template_name = "packer_windows_fast_launch"
  }

provisioner "powershell" {
  inline = [
    "Write-Output 'Hello, World!'",
    "# Additional provisioning commands go here"
  ]
}

Operating system and Environment details

Docker using gitlab-runner 15.11.1 image as base

@github-actions
Copy link

This issue has been migrated to hashicorp/packer-plugin-amazon#405 due to the Packer Plugin split.

Please follow the new issue for updates.

@github-actions
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 Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants