Amazon EC2 AMI Lifecycle (Part 4)
Create an Amazon EC2 AMI
using Windows Sysprep
The Microsoft System
Preparation (Windows Sysprep) tool produces a generalized version of the
operating system by removing instance-specific system configurations before
capturing a new image. It is advisable to utilize EC2 Image Builder to automate
the processes of creating, managing, and deploying customized, secure, and
current "golden" server images that have software and settings
pre-installed and configured. Additionally, you can use Windows Sysprep to
generate a standardized AMI by employing the Windows launch agents.
Windows Sysprep phases
Windows Sysprep runs
through the following phases:
Generalize: The
Sysprep utility eliminates information and configurations that are specific to
an image. For instance, Windows Sysprep eliminates the security identifier
(SID), the device name, the event logs, and certain drivers, among others. Once
this process is finished, the operating system (OS) is prepared to generate an
AMI.
Specialize: The
Plug and Play feature analyzes the computer and sets up drivers for any
identified devices. The Sysprep utility produces the operating system
specifications, such as the machine name and SID. You may also execute commands
during this stage if desired.
Out-of-Box Experience
(OOBE): The system performs a simplified version of Windows
Setup, prompting you to provide details like system language, time zone, and
registered organization. When executing Windows Sysprep with Windows launch
agents, the answer file streamlines this stage.
Post Sysprep
After Windows Sysprep
completes, EC2Launch v2 sends the following message to the console output:
Windows
sysprep configuration complete.
EC2Launch v2 then performs the following actions:
- Reads the content of the agent-config.yml file and runs configured tasks.
- Executes all tasks in the preReady stage.
- After it is finished, sends a Windows is ready message to the instance system logs.
- Executes all tasks in the PostReady stage.
Comments
Post a Comment