Skip to content
Permalink
Browse files

[build] Add named configuration for public cloud environments

Add a named CONFIG=cloud configuration, which enables console types
useful for obtaining output from virtual machines in public clouds
such as AWS EC2.

An image suitable for use in AWS EC2 can be built using

  make bin/ipxe.usb CONFIG=cloud EMBED=config/cloud/aws.ipxe

The embedded script will direct iPXE to download and execute the EC2
"user-data" file, which is always available to an EC2 VM via the URI
http://169.254.169.254/latest/user-data (regardless of the VPC
networking settings).  The boot can therefore be controlled by
modifying the per-instance user data, without having to modify the
boot disk image.

Console output can be obtained via syslog (with a syslog server
configured in the user-data script), via the AWS "System Log" (after
the instance has been stopped), or as a last resort from the log
partition on the boot disk.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Jan 18, 2016
1 parent 8af8886 commit cc252605ce9e0e224fbc34f946b80e90d012dc42
@@ -0,0 +1,7 @@
#!ipxe

echo Amazon EC2 - iPXE boot via user-data
ifstat ||
dhcp ||
route ||
chain -ar http://169.254.169.254/latest/user-data
Empty file.
@@ -0,0 +1,31 @@
/*
* Console configuration suitable for use in public cloud
* environments, or any environment where direct console access is not
* available.
*
*/

/* Log to syslog(s) server
*
* The syslog server to be used must be specified via e.g.
* "set syslog 192.168.0.1".
*/
#define CONSOLE_SYSLOG
#define CONSOLE_SYSLOGS

/* Log to serial port
*
* Note that the serial port output from an AWS EC2 virtual machine is
* generally available (as the "System Log") only after the instance
* has been stopped.
*/
#define CONSOLE_SERIAL

/* Log to partition on local disk
*
* If all other log mechanisms fail then the VM boot disk containing
* the iPXE image can be detached and attached to another machine in
* the same cloud, allowing the log to be retrieved from the log
* partition.
*/
#define CONSOLE_INT13
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.

0 comments on commit cc25260

Please sign in to comment.