I'm learning to use multipass. My version of multipass is multipass 1.9.0+mac. I'm trying to create a very simple cloud-init configuration:
package:
- build-essential
- zsh
I start this with
multipass launch -n test --cloud-init config.yaml
I open a shell into that environment, but there is no zsh in /bin/.
Why was zsh not installed?
packageis not a valid top-level key, butpackagesis. See the docs here.It really should warn for this error but does not currently.
Try this:
Upstream cloud-init is working on better warnings/errors for this using jsonschema validation for configs (many changes on this front in upcoming releases). Currently, however, top level keys are not validated currently.
Also, it looks like multipass automatically inserts the
#cloud-configheader for you so I don't think you need it on multipass specifically, but for portability to other datasources I would consider adding it anyways. Based on the userdata values in a multipass instance I tested I see the header both ways, so for portability I recommend adding it even though it's a no-op on multipass.