packer-plugin-amazon icon indicating copy to clipboard operation
packer-plugin-amazon copied to clipboard

Add support for launching EC2 instances with hibernation configured

Open ericrafalovsky opened this issue 3 years ago • 1 comments

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 "me too" comments, 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.

Description

Allow launching an EC2 instance with EC2 hibernation enabled.

EC2 supports launching instances that support hibernation by providing the appropriate configuration at runtime when an instance launches. The packer plugin currently does not support passing through this configuration.

Use Case(s)

  • Greater control of instance lifecycle used for creating AWS images
  • Creating images with instances with configuration parity with other EC2 instances

Potential configuration

hibernation_options {
    configured  = true
 }

Potential References

Hibernate your On-Demand Linux instance

ericrafalovsky avatar Nov 02 '22 14:11 ericrafalovsky

hibernation is not configured in the AMI. You have to build support for hibernation in the image, with the correct software packages, but actually configuring it happens when you create an instance. You need to enable hibernation then or in your launch template.

jasonrollins avatar Oct 03 '24 20:10 jasonrollins