[pve-devel] [RFC qemu-server] Make the smbios UUID unique if --unique is used.

Wolfgang Link w.link at proxmox.com
Thu Feb 1 12:22:36 CET 2018


When we clone a VM we also make the smbios unique.

---
 PVE/QemuServer.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 9c0de45..cdba28d 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -5347,6 +5347,8 @@ sub restore_update_config_line {
 	} else {
 	    print $outfd $line;
 	}
+    } elsif (($line =~ m/^(smbios1: )uuid=[\w-]*$/) && $unique) {
+	print $outfd $1.generate_smbios1_uuid()."\n";
     } else {
 	print $outfd $line;
     }
-- 
2.11.0





More information about the pve-devel mailing list