qmrestore does not update UUID

shantanu

Renowned Member
Mar 30, 2012
112
12
83
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?