boxcutter / ubuntu

Virtual machine templates for Ubuntu written in legacy JSON
Apache License 2.0
736 stars 375 forks source link

Update to use the new subiquity installer #195

Closed nrundle closed 3 years ago

nrundle commented 3 years ago

Ubuntu has deprecated support for the legacy debian installer. This change updates the default builders to use the new subiquity installer. For releases older than Ubuntu 18.04, the legacy installer support is still available via the ubuntu-legacy.json packer template.

The subiquity installer uses a different template format for the autoinstall. These can be found in http/user-data and http/meta-data. They effectively replace the older preseed files.

nrundle commented 3 years ago

I was only able to test with virtualbox, but the changes are just to update the ISO URLs to the latest version and use the new subiquity installer for >=18.04

The legacy installer boot commands were the same for the 3 builders so I made the same change to all 3 and assume that will work for vmware and parallels.

The one thing I couldn't figure out was a way to allow the user to customize the locale. The autoinstall has this value in the JSON file and I don't see anything in the subiquity documentation that suggests a way to override this value on the boot line.

One area that may cause some trouble depending on network speeds is the fact that the new installer runs an SSH server during install. If packer attempts to connect before the installer is finished, then it will fail since the credentials won't match the ones provided during install. Packer issue #9115 discusses this and the community solution at this time is to increase the ssh_handshake_attempts so that packer will keep retrying long enough for the installer to finish and reboot before packer gives up. Based on my own network speeds and trial and error, I set this value to 200.