Closed mikaelhg closed 2 years ago
Thank you for the suggestions. The service team is looking into this. We will provide feedback shortly.
No hurry. At least 80% of my purpose was achieved by making this solution googleable for people who bump into the same issue.
Any updates?
I can't seem get the seed.iso method to update the network settings with 2.0.20210326.0 using vmware. The hostname updates but not the network settings. I used the document listed sample seed.iso on a 192.168.1.0 network so I literally had nothing to change. dmesg gives no clue and the documentation gives no indication of when in the boot process the seed.iso file comes into play.
As far as "easy" ways other than seed.iso file, I need some specific examples of how these would work, possibly including troubleshooting.
So it would be great if there were more detail in the documentation including all the various boot methods.
Alas, I don't have a VMWare license, nor a yacht to sell to finance one.
What the market will bear..:-(
Actually, vmware workstation 16 is free and works well for those constrained by a Windows environment.
As far as Documentation for this use case, it seems "easy" to follow the instructions, but the AL2 network is unchanged and I can't find any information on settings, proper configuration or troubleshooting.
I know the seed file is being read because the hostname changes.
local-hostname: k2a
# eth0 is the default network interface enabled in the image. You can configure
# static network settings with an entry like below.
network-interfaces: |
auto eth0
iface eth0 inet static
address 192.168.1.40
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.254
https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html mentions injecting network settings:
Also, you can inject an /etc/network/interfaces file by providing the content for that file in the network-interfaces field of metadata.
But how network configuration is implemented for al2 interfaces in network-scripts is unclear to me and I feel needs to be documented.
Also, what other configuration options do I have? How would I implement iptables or routing options on boot for AL2?
Just found a forum link https://forums.aws.amazon.com/thread.jspa?messageID=971373󭉭
It appears as though this is method is broken and has been for some time.
This needs to be highlighted in the documentation, rather than wasting peoples time.
From the forum:
This is sadly still broken with the latest 2.0.20210126.0 release.
The documentation in the README.cloud-init is broken, as is the document here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html
The linked reply with a diff to fix cloud-init does look like it would work, but there's no way to patch this at boot time that I can see. I'm really stuck trying to figure out how to work around this, and I'm still stuck loading a two year old image and then upgrading it. Really frustrating - I've tried all sorts of yaml config variants for the seed.iso with no luck.
Another forum link showing heath@aws seems to acknowledge the problem but I am not seeing any final resolution.
https://forums.aws.amazon.com/thread.jspa?messageID=971374󭉮
Seems like you're describing a completely different issue than what is the topic of this ticket, so you might want to open a new ticket for that issue.
The "Run Amazon Linux 2 as a virtual machine on premises" page describes a fairly cumbersome way of running Amazon Linux 2 in local virtual machines through using various tools to provision ISO9660
seed.iso
files just to serve the VM instance two small data files.It would be great it the documentation also pointed out that since the VM provisioning is being done with
cloud-init
, and the image has configured a fairly extensivedatasource_list: [ NoCloud, AltCloud, ConfigDrive, OVF, None ]
which starts with NoCloud, that NoCloud also allows you to serve these files over HTTP.There are two easy ways of using network configuration instead of
seed.iso
. Either you tell GRUB to add a parameter to the kernel boot configuration, or you tell KVM/VMWare/Virtualbox to set the virtual machine's SMBIOS value to something whichcloud-init
'sNoCloud
understands.The documentation page https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html describes the parameters.
If you wish to use Packer, for example, to provision local KVM
qcow2
files of AL2, you'd use a configuration which looks a bit like this:the sillier way to achieve the same is to tell your VM creator to send keypresses to the virtual terminal which is booting up AL2 for the first time: