Create Custom AMI

Create Custom AMI

create vpc for linux instance

  1. Access the [AWS Management Console] interface(https://aws.amazon.com/vi/console/)

    • Find EC2
    • Select EC2
    • Select Instances
    • Select Windows-instance
    • Select Instance state, select Stop instance

    create vpc for linux instance

    • Make sure EC2 is in Stopped state

    create vpc for linux instance

    • Next, Select Actions
    • Choose Image and templates

    create vpc for linux instance

    • Choose Create image

    create vpc for linux instance

    • Note: in practice, you can create an AMI when EC2 is in Running state. However, in this lab creating an AMI from EC2 windows, you need EC2 to be in a completely Stopped state to ensure that the sysprep function configured in lab 3.2 is completely processed before creating new AMI with sysprep configuration information
  2. Configure AMI

    • Image name: Enter Custom Windows AMI
    • Image description: Enter Custom Windows AMI
    • No reboot: Select Enable

    create vpc for linux instance

    • Noted: Normally, AWS will reboot the instance to ensure the integrity of the data stored in the EBS volume that is attached directly to EC2 - which we are preparing to create an AMI, i.e. without any write action interacts with the Instance at image creation time, ensuring data consistency for the AMI.

    • However, this reboot will cause EC2 downtime and change the Public IP address (if EC2 is placed in the public subnet and is not assigned an elastic IP), so the No reboot function is Enable to prevent the above effects

    • Choose Create image

    create vpc for linux instance

  3. In the EC2 interface

    • Choose AMIs

    create vpc for linux instance

    • Wait for approximately 5 minutes to complete the initialization of the AMI

    create vpc for linux instance