Closed dongsupark closed 3 months ago
I tried this out with
RG="jcline-azinit-test2" LOCATION="eastus2" BASE_IMAGE="Debian:debian-11:11-backports-gen2:latest" demo/image_creation.sh
and the VM failed configuration with[ 33.134147] cloud-init[918]: /var/log/azure/image/setup.sh: line 14: /etc/netplan/eth0.yaml: No such file or directory
I assume /etc/netplan/ doesn't exist on that image.
I cannot reproduce it myself, but anyway pushed a fix for that in customdata_template.yml
.
Since you're not touching the
customdata_template.yml
this is just an existing issue from what I can tell. The changes themselves look good good to me. You might want to pointShellCheck
at it, but all those were pre-existing so we can do that separately as well.
The image creation script was used with Ubuntu 20.04/22.04. It assumed that netplan was used for networking and a lot of code written was based on that assumption. See issue #90
Added an automated creation of image definition before creating image version. Addressed warnings and infos when running shellcheck.
Improve
image_creation.sh
script.SecurityType=TrustedLaunch
for vm create and sig image-definition create.How to run with custom parameters.
Testing done
Done testing with a couple of possible variables.