I have been trying to find a way to use autoinstall inside of cloud-init. Assuming i use something like this:
#cloud-config
autoinstall:
version: 1
identity:
hostname: test-vlan353
The system comes up during deployment stating that subiquity is required, so I added this:
#cloud-config
snap:
commands:
0: snap install subiquity --classic
autoinstall:
version: 1
identity:
hostname: test-vlan353
But then I get this error:
2024-11-19 15:49:04,263 ERROR root:38 finish: subiquity/apply_autoinstall_config: FAIL: Command ‘[‘systemd-run’, ‘–wait’, ‘–same-dir’, ’
–property’, ‘SyslogIdentifier=subiquity_log.4919’, ‘–setenv’, ‘PATH=/snap/subiquity/6190/bin:/snap/subiquity/6190/usr/bin:/usr/local/sbi
n:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/subiquity/6190/bin:/snap/subiquity/6190/sbin’,
‘–setenv’, ‘PYTHONPATH=:/snap/subiquity/6190/lib/python3.10/site-packages’, ‘–setenv’, ‘PYTHON=/snap/subiquity/6190/usr/bin/python3.10’,
‘–setenv’, ‘SNAP=/snap/subiquity/6190’, ‘–’, ‘mount’, ‘-o’, ‘lowerdir=/media/filesystem,upperdir=/tmp/tmpl0u0wuyh/upper,workdir=/tmp/tm
pl0u0wuyh/work’, ‘-t’, ‘overlay’, ‘overlay’, ‘/tmp/tmpl0u0wuyh/mount’]’ returned non-zero exit status 32
Reading the other forum posts it looks like autoinstall is not really supported and cloud-init should be used. I am trying to confirm that autoinstall can be used (if so how to instantiate it) or that it cant be used.
In my environment I used snap to install MAAS and I have noticed that some things are different when using snap, so not adverse to reinstalling using apt if that provides more flexibility.