Detailed Instructions are here : https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html ( for VMWare and VirtualBox and Hyoer-V in addiation to KVM )
Instructions sample configs and cloud-init files for on on-premises images: https://cdn.amazonlinux.com/os-images/2.0.20201111.0/
KVM / qemu / virt-manager instructions -
Download 2 files - the seed.iso and then the actual OS disk image. For KVM/qemu/virt-manager the OS file is currently named amzn2-kvm-2.0.20201111.0-x86_64.xfs.gpt.qcow2
Here:
https://cdn.amazonlinux.com/os-images/2.0.20201111.0/kvm/
Download "SHA256sums" file containing sha256 sums and download shasums signature file ( .gpg )
check sha256sum
import this AWS key: 0x11CF1F95C87F5B1A
validate signature on the shasum signature file ( SHA256SUMS.gpg ) with gpg
If the sha256sum checks out and the signature file is valid then proceed:
Create two simple local text configuration files named 'meta-data' and 'user-data' .
meta-data is network settings and user-data sets up the ec2-user username account.
See this link for default settings;
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html#amazon-linux-2-virtual-machine-prepare
Change the network settings to fit your local network IP addresses or DHCP.
Note - the 2 local text files act as a "data source" named NoCloud - that is the IP addresses and usernames are NOT taken from AWS-EC2 or from DigitalOcean etc etc. See this: https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html
and the far more intimidating version of that info here:
https://cdn.amazonlinux.com/os-images/2.0.20201111.0/README.cloud-init and finally - the whole list of potential data sources here, with some blah-blah about telling the guest OS about the host virt. platform
https://cloudinit.readthedocs.io/en/latest/topics/datasources.html
Generate a boot ISO using seed.iso along with data-source files named 'meta-data' and 'user-data' that you created:
That is to say - run the genisoimage command below:
$ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data
Create a new vm in virt-manager
Select Import existing disk image and use the qcow VM file ( amzn2-kvm-2.0.20201111.0-x86_64.xfs.gpt.qcow2 )
" For OS type and Version, choose Linux and Red Hat Enterprise Linux 7.0 "
Create a _new_ CDROM custom storage
Browse local and choose the _generated_ seed.iso
Begin Installation.
"After the VM has booted, log in using one of the user accounts that is defined in the user-data configuration file. " Disconnect the seed.iso after you log in supposedly