* [pve-devel] [PATCH storage v2] esxi: use mac address when static, generated and vpx
@ 2024-03-26 12:04 Aaron Lauterer
2024-03-26 12:05 ` Aaron Lauterer
0 siblings, 1 reply; 3+ messages in thread
From: Aaron Lauterer @ 2024-03-26 12:04 UTC (permalink / raw)
To: pve-devel
static -> defined manually
generated -> by ESXi
vpx -> generated by vCenter
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
src/PVE/Storage/ESXiPlugin.pm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
index 77fb6c0..c5ddfea 100644
--- a/src/PVE/Storage/ESXiPlugin.pm
+++ b/src/PVE/Storage/ESXiPlugin.pm
@@ -793,7 +793,10 @@ sub for_each_netdev {
my $ty = $dev->{addressType};
my $mac = $dev->{address};
- if ($ty && fc($ty) eq fc('generated')) {
+ if ($ty && (fc($ty) eq fc('static')
+ || fc($ty) eq fc('generated')
+ || fc($ty) eq fc('vpx') # vCenter generated
+ )) {
$mac = $dev->{generatedAddress} // $mac;
}
--
2.39.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pve-devel] [PATCH storage v2] esxi: use mac address when static, generated and vpx
2024-03-26 12:04 [pve-devel] [PATCH storage v2] esxi: use mac address when static, generated and vpx Aaron Lauterer
@ 2024-03-26 12:05 ` Aaron Lauterer
0 siblings, 0 replies; 3+ messages in thread
From: Aaron Lauterer @ 2024-03-26 12:05 UTC (permalink / raw)
To: pve-devel
please ignore this one
On 2024-03-26 13:04, Aaron Lauterer wrote:
> static -> defined manually
> generated -> by ESXi
> vpx -> generated by vCenter
>
> Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
> ---
> src/PVE/Storage/ESXiPlugin.pm | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
> index 77fb6c0..c5ddfea 100644
> --- a/src/PVE/Storage/ESXiPlugin.pm
> +++ b/src/PVE/Storage/ESXiPlugin.pm
> @@ -793,7 +793,10 @@ sub for_each_netdev {
>
> my $ty = $dev->{addressType};
> my $mac = $dev->{address};
> - if ($ty && fc($ty) eq fc('generated')) {
> + if ($ty && (fc($ty) eq fc('static')
> + || fc($ty) eq fc('generated')
> + || fc($ty) eq fc('vpx') # vCenter generated
> + )) {
> $mac = $dev->{generatedAddress} // $mac;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pve-devel] [PATCH storage v2] esxi: use mac address when static, generated and vpx
@ 2024-03-26 12:04 Aaron Lauterer
0 siblings, 0 replies; 3+ messages in thread
From: Aaron Lauterer @ 2024-03-26 12:04 UTC (permalink / raw)
To: pve-devel
static -> defined manually
generated -> by ESXi
vpx -> generated by vCenter
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
src/PVE/Storage/ESXiPlugin.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
index 77fb6c0..9c9f680 100644
--- a/src/PVE/Storage/ESXiPlugin.pm
+++ b/src/PVE/Storage/ESXiPlugin.pm
@@ -793,7 +793,7 @@ sub for_each_netdev {
my $ty = $dev->{addressType};
my $mac = $dev->{address};
- if ($ty && fc($ty) eq fc('generated')) {
+ if ($ty && fc($ty) =~ /^(static|generated|vpx)$/) {
$mac = $dev->{generatedAddress} // $mac;
}
--
2.39.2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-26 12:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-26 12:04 [pve-devel] [PATCH storage v2] esxi: use mac address when static, generated and vpx Aaron Lauterer
2024-03-26 12:05 ` Aaron Lauterer
2024-03-26 12:04 Aaron Lauterer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox