From 19a5dd551d8e56f98d06281a70c484d9a53d02f1 Mon Sep 17 00:00:00 2001 From: Wolfgang Link Date: Thu, 1 Feb 2018 14:51:05 +0100 Subject: [PATCH] Make the smbios UUID unique if --unique is used. When we clone a VM we also make the smbios unique. --- PVE/QemuServer.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 9c0de45e..66928884 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -5347,6 +5347,13 @@ sub restore_update_config_line { } else { print $outfd $line; } + } elsif (($line =~ m/^(smbios1: )(.*)/) && $unique) { + my ($uuid, $uuid_str); + UUID::generate($uuid); + UUID::unparse($uuid, $uuid_str); + my $smbios1 = parse_smbios1($2); + $smbios1->{uuid} = $uuid_str; + print $outfd $1.print_smbios1($smbios1)."\n"; } else { print $outfd $line; }