This is an old revision of the document!


iPXE in Alibaba Cloud

You can use iPXE to boot Alibaba Cloud Elastic Compute Service (ECS) instances using a public iPXE image. You can use an iPXE script to direct the ECS instance to boot via any means supported by iPXE. For example, you could boot a set of diskless ECS instances using HTTPS or iSCSI from a single server hosted in the same Alibaba Cloud region.

Launching

The ECS iPXE images are published as community images owned by account 5967261230407415.

CPU architecture Image family name
x86_64 acs:5967261230407415:ipxe
x86_64 (UEFI) acs:5967261230407415:ipxe-uefi-x86-64
arm64 (UEFI) acs:5967261230407415:ipxe-uefi-arm64

You can launch an instance using a command such as

  aliyun ecs RunInstances \
         --ImageFamily acs:5967261230407415:ipxe \
         ...

You can use any compatible ECS instance type.

Configuring

iPXE ECS instances are controlled via an iPXE script stored as the instance user-data. The iPXE image includes an embedded script that will automatically obtain an IP address via DHCP, print out some useful diagnostic information, and then download and execute http://100.100.100.200/latest/user-data.

You can set the user-data using the --UserData option when creating the instance. You must encode the user-data using Base64 encoding. For example:

  aliyun ecs RunInstances \
         --ImageFamily acs:5967261230407415:ipxe \
         --UserData $(base64 my-ipxe-boot-script.ipxe) \
         ...

You can use this metadata iPXE script to direct the remainder of the network boot process. For example, to download and boot Tiny Core Linux, you could set your instance's user-data to contain:

  #!ipxe
  set base http://tinycorelinux.net/12.x/x86/release/distribution_files/
  kernel ${base}/vmlinuz64
  initrd ${base}/rootfs.gz
  initrd ${base}/modules64.gz
  boot

Alibaba Cloud iPXE boot

Congratulations on successfully booting an Alibaba Cloud instance using iPXE!

Success

Troubleshooting

You can use the Alibaba Cloud ECS VNC console to interact directly with your ECS instance by browsing to the URL:

  https://ecs.console.alibabacloud.com/vnc/index.htm?instanceId=${INSTANCE_ID}&regionId=${REGION}
  

(replacing ${INSTANCE_ID} and ${REGION_ID} with the instance and region identifiers as needed).

In theory, you can also view the iPXE output by obtaining the serial port output using aliyun ecs GetInstanceConsoleOutput. However, obtaining serial console output within Alibaba Cloud ECS is notoriously unreliable, with a failure rate above 90%.

As a last resort, you can also stop the ECS instance and then obtain the iPXE disk console log using the ali-int13con tool (found in the contrib directory in the iPXE source tree).

Building from source

You can build your own version of the public iPXE images using:

  make CONFIG=cloud EMBED=config/cloud/ali.ipxe \
       bin-x86_64-pcbios/ipxe.usb \
       bin-x86_64-efi/ipxe.usb \
       bin-arm64-efi/ipxe.usb

and import them using the ali-import tool (found in the contrib directory in the iPXE source tree).

howto/alicloud.1777030790.txt.gz ยท Last modified: 2026/04/24 11:39 by mcb30
Recent changes RSS feed CC Attribution-Share Alike 4.0 International Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL https://ipxe.org
References to "iPXE" may not be altered or removed.