Appendix
Windows Configuration Service
Before bundling an instance, you can configure the instance using the EC2Config service. The EC2Config service sets up and initializes the instance during startup, prepares the service for bundling, and manages the event log.
There are three EC2Config files that you can modify: Config.xml
, BundleConfig.xml
, and EventLogConfig.xml
.
Note | |
---|---|
By default, the EC2Config service is installed on all Amazon EC2 public Windows AMIs (Program Files\Amazon\Ec2ConfigSetup\). |
Config.xml File
This section describes the Config.xml
file.
Config.xml File
Ec2SetPassword—Generates a new password on instance launch.
By default, Amazon EC2 disables this after the first launch. To continue generating random passwords, set this to
Enabled
,Ec2SetComputerName—When enabled, sets the hostname to the internal DNS name of the instance and reboots.
Ec2InitializeDrives—Initializes and formats the instance stores during startup. For more information on instance storage, see
Ec2ConfigureRDP—Sets up a self-signed certificate on the instance, so users can securely access the instance using Remote Desktop.
Ec2OutputRDPCert—Copies the Remote Desktop certificate information to the console, so the user can verify it against the thumbprint
Ec2EventLog—Puts eventlog entries on the console based on the configuration of the eventlogconfig file.
BundleConfig.xml File
The BundleConfig.xml
file controls how the EC2Config service prepares an instance for bundling.
This includes configuring sysprep on the system, changing the state of the Ec2ConfigureRDP plugin, and
shutting down the instance for bundling. To not use sysprep, change the value of SetSysprep
to No
. To not set the Remote Desktop Certificate, set the value of SetRDPCertificate
to No
.
EventLogConfig.xml File
This section describes the EventLogConfig.xml
file.
EventLogConfig.xml File
-
Category—Event log key to monitor.
For more information, go to the Microsoft Web Site,
-
Errortype—The type of error (i.e., Error, Warning, Information).
For more information, go to the Microsoft Web Site,
-
AppName—The event source or application that logged the event.
For more information, go to the Microsoft Web Site,
-
NumEntries—The number of events stored for this category.
-
LastMessageTime—To prevent the same message from being pushed repeatedly, the service updates this every time it pushes a message.
Example
The following are examples of event log entries. The first entry pushes the last 3 errors from system category, regardless of the application that generated the LastMessage entry. The second entry pushes the last 3 error entries written by Ec2Config generated after LastMessageTime.
<EventLogConfig> <Event> <Category>System</Category> <ErrorType>Error</ErrorType> <NumEntries>3</NumEntries> <LastMessageTime>2008-09-10T00:00:00.000Z</LastMessageTime> <AppName></AppName> </Event> <Event> <Category>Application</Category> <ErrorType>Error</ErrorType> <NumEntries>3</NumEntries> <LastMessageTime>2008-09-10T00:00:00.000Z</LastMessageTime> <AppName>Ec2Config</AppName> </Event> </EventLogConfig>