Reputation: 808
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:
ami-0f65671a86f061fcd
(this is Canonical's Ubuntu Server 18.04 LTS (HVM), SSD Volume Type)sudo apt-get -y update
sudo apt-get -y install ubuntu-desktop
Image > Create Image
Expected result:
Actual result:
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
Upvotes: 6
Views: 2265
Reputation: 1255
I wanted to post this as a comment (because the other answer is correct) but I can't because I don't have enough reputation.
Anyway the exact command I entered was:
touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
And I was then able to SSH in.
This was taken from this comment 6 on this issue: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1638842/comments/6
Upvotes: 2
Reputation: 310
I also had this exact same problem with Ubuntu 18.04 on AWS. This answer resolved it for me:
The correct way to do it is to use an empty /etc/NetworkManager/conf.d/10-globally-managed-devices.conf that will overshadow/overwrite the one in /usr/lib – solsTiCe Jan 2 '17 at 13:41
This answer is from this Ask Ubuntu question: https://askubuntu.com/questions/838865/network-manager-refusing-to-manage-wired-interfaces
Upvotes: 5