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

husskii

Member
Jun 19, 2022
13
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
 
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
hi so much bbgeek
thank you for the reply, will these effect anything on the network etc when creating a clone and it has an identical Machine ID? Also is there a guide you know of that can show me how to put the custom procedure. basically most of my vms atm start of the same then during install i may add to a vm extra apps etc. so i am trying to build like a custom template for myself that i can go off giving me less work. also i am still in trial and error on my home lab, more trying to learn things and find myself installing cleaning formatting starting again..
I have collected 3 mini pc, 1 small factor, 2x pi4 and 1 SMB storage and once i am done learning and trying to work out on my setup, then I will do a final install/config. and if i can have custom templates and clones and they all be unique ID etc. I can just run off them and do a final setup install, without having to go through each one from start to finish. (which is what i am having to do now)
 
will these effect anything on the network etc when creating a clone and it has an identical Machine ID?
I am not aware if such effect. However, it does not mean that it`s not possible. Potentially any licensing that relies on this, or DHCP server that may expect uniqueness.
Also is there a guide you know of that can show me how to put the custom procedure.
I don't know of one such guide, but it does not mean that such guide does not exist.
You can pull data from multiple places:
https://ubuntu.com/core/docs/build-an-image
https://cloudinit.readthedocs.io/en/latest/

Good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: husskii
I am not aware if such effect. However, it does not mean that it`s not possible. Potentially any licensing that relies on this, or DHCP server that may expect uniqueness.

I don't know of one such guide, but it does not mean that such guide does not exist.
You can pull data from multiple places:
https://ubuntu.com/core/docs/build-an-image
https://cloudinit.readthedocs.io/en/latest/

Good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
I am following a guide from Jim's Garage on youtube its a Kubernetes but he is going through step by step guide on creating a cloud-init vm setup. and i dont mind the Kubernetes setup either something new to learn :)
so hopefully i will know more by the end of it.. its a multi part tutorial so will keep me busy for a while.

I really appreciate you pointing me in the right direction, i feel this is what i needed to be able to clone multiple vms properly. once i see it actually done it will be easier for me to follow written documents and hopefully better understand what i am doing
Thanks Again :)
 

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!