qmrestore does not update UUID

shantanu

Well-Known Member
Mar 30, 2012
112
11
58
Hello,

I recently discovered that 'qmrestore' does not update/change the UUID after a successful restore from a backup image.

My experiments involved creating many VMs from the same vzdump image.

As far as functionality goes, this may be expected behavior, but it caught me off guard, as some other software (consul + nomad) was using the VM UUID from inside the VM to determine unique identity in its cluster.

Code:
# pveversion
pve-manager/4.4-12/e71b7a74 (running kernel: 4.4.35-2-pve)


The way I solved it was by adding a 'qm set' command to change the UUID after the 'qmrestore' completed

Code:
UUID=$(cat /proc/sys/kernel/random/uuid)
qm set $vmid -smbios1 uuid=${UUID}

Could this functionality (of setting a new UUID) be added to qmrestore itself?
Like qmrestore's "-unique" parameter.

Regards,
Shantanu
 
Could this functionality (of setting a new UUID) be added to qmrestore itself?
Like qmrestore's "-unique" parameter.

Maybe we can reuse the unique parameter to also renew the uuid? Please can you file a bug report (feature request) at bugzilla.proxmox.com?
 

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!