* [PATCH pve-storage] esxi plugin: keep uuid inside vm the same as in esxi
@ 2026-07-27 15:17 Nicolas Reinecke
2026-08-07 12:55 ` Max R. Carrara
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Reinecke @ 2026-07-27 15:17 UTC (permalink / raw)
To: pve-devel; +Cc: Nicolas Reinecke
There needs to be done some byte swapping in the first 3 parts to keep
the uuid the same.
RegEx Group Mapping to Bytes:
$1-$4 : 1st section (4 bytes) -> Reversed to $4$3$2$1
$5-$6 : 2nd section (2 bytes) -> Reversed to $6$5
$7-$8 : 3rd section (2 bytes) -> Reversed to $8$7
$9 : 4th section (2 bytes) -> Kept as-is
$10 : 5th section (6 bytes) -> Kept as-is
Signed-off-by: Nicolas Reinecke <nr@das-labor.org>
---
src/PVE/Storage/ESXiPlugin.pm | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
index 19f23bb..fd0ef0a 100644
--- a/src/PVE/Storage/ESXiPlugin.pm
+++ b/src/PVE/Storage/ESXiPlugin.pm
@@ -1010,14 +1010,19 @@ sub smbios1_uuid {
if (
$uuid =~ /^
- ([0-9a-fA-F]{8})
- ([0-9a-fA-F]{4})
- ([0-9a-fA-F]{4})
+ ([0-9a-fA-F]{2})
+ ([0-9a-fA-F]{2})
+ ([0-9a-fA-F]{2})
+ ([0-9a-fA-F]{2})
+ ([0-9a-fA-F]{2})
+ ([0-9a-fA-F]{2})
+ ([0-9a-fA-F]{2})
+ ([0-9a-fA-F]{2})
([0-9a-fA-F]{4})
([0-9a-fA-F]{12})
$/x
) {
- return "$1-$2-$3-$4-$5";
+ return "$4$3$2$1-$6$5-$8$7-$9-$10";
}
return;
}
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH pve-storage] esxi plugin: keep uuid inside vm the same as in esxi
2026-07-27 15:17 [PATCH pve-storage] esxi plugin: keep uuid inside vm the same as in esxi Nicolas Reinecke
@ 2026-08-07 12:55 ` Max R. Carrara
2026-08-07 15:24 ` Nicolas Reinecke
0 siblings, 1 reply; 3+ messages in thread
From: Max R. Carrara @ 2026-08-07 12:55 UTC (permalink / raw)
To: Nicolas Reinecke, pve-devel
On Mon Jul 27, 2026 at 5:17 PM CEST, Nicolas Reinecke wrote:
> There needs to be done some byte swapping in the first 3 parts to keep
> the uuid the same.
>
> RegEx Group Mapping to Bytes:
> $1-$4 : 1st section (4 bytes) -> Reversed to $4$3$2$1
> $5-$6 : 2nd section (2 bytes) -> Reversed to $6$5
> $7-$8 : 3rd section (2 bytes) -> Reversed to $8$7
> $9 : 4th section (2 bytes) -> Kept as-is
> $10 : 5th section (6 bytes) -> Kept as-is
>
> Signed-off-by: Nicolas Reinecke <nr@das-labor.org>
Thanks for your patch! Have you by change filled out a CLA yet?
If not, see here: https://proxmox.com/en/about/open-source/developers
Once confirmed that the CLA's in, I'll have a closer look at this.
- Max
> ---
> src/PVE/Storage/ESXiPlugin.pm | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
> index 19f23bb..fd0ef0a 100644
> --- a/src/PVE/Storage/ESXiPlugin.pm
> +++ b/src/PVE/Storage/ESXiPlugin.pm
> @@ -1010,14 +1010,19 @@ sub smbios1_uuid {
>
> if (
> $uuid =~ /^
> - ([0-9a-fA-F]{8})
> - ([0-9a-fA-F]{4})
> - ([0-9a-fA-F]{4})
> + ([0-9a-fA-F]{2})
> + ([0-9a-fA-F]{2})
> + ([0-9a-fA-F]{2})
> + ([0-9a-fA-F]{2})
> + ([0-9a-fA-F]{2})
> + ([0-9a-fA-F]{2})
> + ([0-9a-fA-F]{2})
> + ([0-9a-fA-F]{2})
> ([0-9a-fA-F]{4})
> ([0-9a-fA-F]{12})
> $/x
> ) {
> - return "$1-$2-$3-$4-$5";
> + return "$4$3$2$1-$6$5-$8$7-$9-$10";
> }
> return;
> }
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH pve-storage] esxi plugin: keep uuid inside vm the same as in esxi
2026-08-07 12:55 ` Max R. Carrara
@ 2026-08-07 15:24 ` Nicolas Reinecke
0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Reinecke @ 2026-08-07 15:24 UTC (permalink / raw)
To: Max R. Carrara; +Cc: pve-devel
I signed the CLA already and IT got confirmed on 24. july. Thanks for reviewing.
07.08.2026 14:56:01 Max R. Carrara <m.carrara@proxmox.com>:
> On Mon Jul 27, 2026 at 5:17 PM CEST, Nicolas Reinecke wrote:
>> There needs to be done some byte swapping in the first 3 parts to keep
>> the uuid the same.
>>
>> RegEx Group Mapping to Bytes:
>> $1-$4 : 1st section (4 bytes) -> Reversed to $4$3$2$1
>> $5-$6 : 2nd section (2 bytes) -> Reversed to $6$5
>> $7-$8 : 3rd section (2 bytes) -> Reversed to $8$7
>> $9 : 4th section (2 bytes) -> Kept as-is
>> $10 : 5th section (6 bytes) -> Kept as-is
>>
>> Signed-off-by: Nicolas Reinecke <nr@das-labor.org>
>
> Thanks for your patch! Have you by change filled out a CLA yet?
> If not, see here: https://proxmox.com/en/about/open-source/developers
>
> Once confirmed that the CLA's in, I'll have a closer look at this.
>
> - Max
>
>> ---
>> src/PVE/Storage/ESXiPlugin.pm | 13 +++++++++----
>> 1 file changed, 9 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
>> index 19f23bb..fd0ef0a 100644
>> --- a/src/PVE/Storage/ESXiPlugin.pm
>> +++ b/src/PVE/Storage/ESXiPlugin.pm
>> @@ -1010,14 +1010,19 @@ sub smbios1_uuid {
>>
>> if (
>> $uuid =~ /^
>> - ([0-9a-fA-F]{8})
>> - ([0-9a-fA-F]{4})
>> - ([0-9a-fA-F]{4})
>> + ([0-9a-fA-F]{2})
>> + ([0-9a-fA-F]{2})
>> + ([0-9a-fA-F]{2})
>> + ([0-9a-fA-F]{2})
>> + ([0-9a-fA-F]{2})
>> + ([0-9a-fA-F]{2})
>> + ([0-9a-fA-F]{2})
>> + ([0-9a-fA-F]{2})
>> ([0-9a-fA-F]{4})
>> ([0-9a-fA-F]{12})
>> $/x
>> ) {
>> - return "$1-$2-$3-$4-$5";
>> + return "$4$3$2$1-$6$5-$8$7-$9-$10";
>> }
>> return;
>> }
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-07 15:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-27 15:17 [PATCH pve-storage] esxi plugin: keep uuid inside vm the same as in esxi Nicolas Reinecke
2026-08-07 12:55 ` Max R. Carrara
2026-08-07 15:24 ` Nicolas Reinecke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox