Issues Cloning A New VM, Machine ID: stays the same.

husskii

Member
Jun 19, 2022
11
1
8
Hi I am trying to clone a ubuntu vm and with each vm i am changing the vm id, ip, hostname and so on. but when i run hostnamectl i notice that on all of my vms they have the same Machine ID:
my Boot ID changes but not the Machine ID and i dont know if this would be an issue somewhere later on or not. and i am unsure how to get this to change. This also happens if i backup my vm and create a new machine from the backup.

Any advice would be great.

thanks
 
Hi @husskii ,
There are two types of clones in PVE: full and thin. Both are an identical copy bit-by-bit of the original VM.
MAC and VMID changes are controlled by PVE. The IP/Hostname could also be controlled externally, ie via PVE or DHCP.
The boot-id change is expected on every boot, whether it's a clone or the same VM.

The Machine-ID will not change unless you put a procedure in place to do so. At scale you would do it with Cloud-Init: https://cloudinit.readthedocs.io/en/latest/reference/cli.html#clean

You could also put a systemd startup task that changes the machine-id based on some condition, i.e. hostname change.

In short, unless you are using a properly prepared template (for example the official cloud image of Ubuntu) or a custom procedure, the behavior you are seeing is normal.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!