From 677f0c10dcae3695b5b6d48b2e48292598f26035 Mon Sep 17 00:00:00 2001 From: SimonFair <39065407+SimonFair@users.noreply.github.com> Date: Mon, 29 Dec 2025 19:01:09 +0000 Subject: [PATCH] Fix: remove MAC addresses for all interfaces. --- .../plugins/dynamix.vm.manager/include/libvirt_helpers.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php index e102fe0d1..65366e450 100644 --- a/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php +++ b/emhttp/plugins/dynamix.vm.manager/include/libvirt_helpers.php @@ -2673,8 +2673,11 @@ function addtemplatexml($post) { unset($usertemplate['pci']); unset($usertemplate['usb']); unset($usertemplate['usbboot']); - unset($usertemplate['nic']['mac']); - + if (isset($usertemplate['nic'])) { + foreach($usertemplate['nic'] as $nickey => $nicdata) { + if (isset($usertemplate['nic'][$nickey]['mac'])) unset($usertemplate['nic'][$nickey]['mac']); + } + } $templatename=$usertemplate['templatename']; if ($templatename == "") $templatename=$usertemplate['template']['os']; unset($usertemplate['templatename']);