This message was deleted.
# harvester
a
This message was deleted.
a
Are you using cloudinit when starting up the new VMs?
n
I was creating the VM custom image and preinstalling everything I needed and then exported that image with in harvester to use for multiple VM's that need to be deployed with RKE2. This however causes issues when it needs to get a fresh IP from my DHCP because it is commiting the same IP as the VM originally was created from. Because of this I now am using the runcmd for all my custom installs which has to happen now on any new VM deployed which is not ideal. If there was a way to clear out the VM for all IP created configs before I export the image that should help ensure that any new VM that uses that image gets a fresh IP and uses a fresh MAC addy.
b
I think what you want to do is create a new
cloud-init
enabled image. https://cloudinit.readthedocs.io/en/latest/
1
c
Highly recommend checking out Packer and/or Packer tutorials. They will teach you what to do to an OS image to reset it before you turn it into an image. Which differs for each OS slightly. I highly recommend installing everything AFTER you deploy it, but there are definitely certain scenarios where it is less of a big deal and depending on how long it takes to setup the environment then it might make sense to bake it into an image. It is definitely less of a concern with Linux compared to Windows, but there are still things you need to do to a Linux image to "reset" it before you turn it into an image.
1