So - I have been trying to get some sort of automation of my Ubuntu VM creation in Prism, either by setting up a template machine that I would later modify using cloud-init custom scripts, or even better using a custom cloud-init script at creation to run through the “Ubuntu autoinstall”
I have tried a few times now to install an Ubuntu server by clicking my way through the GUI and then using the resulting .yml file to try and install a VM from scratch…
Using “clone” from a template I can use a custom script to change hostname and so forth, but still having some problems changing the network settings (saying they are disabled by system.cfg). I guess I will be able to figure that part out eventually, but my main goal is to be able to register a new machine in Netbox, and from the info I have entered there automatically create a cloud-init fileand use that to trigger VM creation in Nutanix…
When I try to create a new VM - mounted with the Ubuntu 20.04.4 installer ISO and a 100GB disk - and then paste my “autoinstall information” into the Custom Script area - it doesn’t get picked up for some reason. Why not? (I also have different versions trying to do storage modifications, but since basically nothing happens with this fairly simple config, I doubt it will be much better with the full file…. ) Do I HAVE to use a template or a cloud image?
Is it just a matter of Nutanix not understanding the “autoinstall” keyword, or is it an error in the yaml-file, or is this type of installation just not supported?
#cloud-config
autoinstall:
apt:
geoip: true
preserve_sources_list: false
primary:
- arches: ramd64, i386]
uri: http://some.internal.repo/ubuntu
- arches: rdefault]
uri: http://some.internal.repo/ubuntu
identity: {hostname: my-hostname-n01, password: "SomeLongAndCryptedPassword",
realname: My Name, username: memyselfandi}
keyboard: {layout: 'no', toggle: null, variant: ''}
locale: en_US
network:
ethernets:
ens3:
addresses: 192.168.10.15/24]
gateway4: 192.168.10.1
nameservers:
addresses: e192.168.10.11, 192.168.10.12, 192.168.10.13, 192.168.10.14]
search: 2one.domain, two.domain, three.domain]
version: 2
ssh:
allow-pw: true
authorized-keys: -]
install-server: true
version: 1