I’m in the process of putting together a custom cloud-init.yaml file which configures a multipass instance for a specific environment (LAMP, but with multiple PHP versions available, and some additional software, PHPMyAdmin, MailHog, and a few other things)
In trying to test out my yaml file, I’ve essentially launched and then deleted and purged a number of multipass instances. Every time a launch new instance, it is assigned the next IP address in the range.
Is it possible to somehow “recover” used IP addresses of deleted instances, or set a specific IP address for a newly launched instance?
I did some digging in the GitHub repository and found some mentions of using the
–network switch when launching a new instance, but this doesn’t seem to be what I’m looking for.
The main reason I’m asking is that I have an /etc/hosts record set on the host machine, and I have to update it every time I launch a new instance. Perhaps there’s a better way to achieve this.