I am trying to create a custom AMI with some software installed including the package called ubuntu-desktop
. However, installing this package makes the resulting AMI unusable.
Exact steps for a minimal repro:
- Create EC2 instance from AMI
ami-0f65671a86f061fcd
(this is Canonical's Ubuntu Server 18.04 LTS (HVM), SSD Volume Type) - SSH into the box and run two commands:
sudo apt-get -y update
sudo apt-get -y install ubuntu-desktop
- From EC2 console, right click the instance, and hit
Image > Create Image
- Fill in name/description, but make sure to not to check "No Reboot"
- Create a new instance from that AMI that you just created
Expected result:
- New instance is created, passes all status checks, and you can SSH into it.
Actual result:
- New instance is created, does not pass the reachability check, and times out upon trying to SSH.
The system log in the instance launched from the AMI shows:
[ 12.125396] cloud-init[691]: Cloud-init v. 18.3-9-g2e62cb8a-0ubuntu1~18.04.2 running 'init' at Fri, 09 Nov 2018 02:15:09 +0000. Up 11.47 seconds.
[ 12.145064] cloud-init[691]: ci-info: +++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++
[ 12.161038] cloud-init[691]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[ 12.180149] cloud-init[691]: ci-info: | Device | Up | Address | Mask | Scope | Hw-Address |
[ 12.192161] cloud-init[691]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[ 12.209635] cloud-init[691]: ci-info: | eth0 | False | . | . | . | 0a:6a:25:9c:47:cc |[[0;32m OK [0m] Started Initial cloud-init job (metadata service crawler).
[ 12.223002] cloud-init[691]: ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | host | . |
SO formatting makes that unreadable but the interesting part is that eth0
is not Up