public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH storage] esxi: use mac address when static, generated and vpx
@ 2024-03-26 11:03 Aaron Lauterer
  2024-03-26 11:36 ` Thomas Lamprecht
  0 siblings, 1 reply; 3+ messages in thread
From: Aaron Lauterer @ 2024-03-26 11:03 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

end of thread, other threads:[~2024-03-26 12:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-26 11:03 [pve-devel] [PATCH storage] esxi: use mac address when static, generated and vpx Aaron Lauterer
2024-03-26 11:36 ` Thomas Lamprecht
2024-03-26 12:06   ` Aaron Lauterer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal