[PATCH 2/4] bhyve: MAC address configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add support for MAC address configuration no network bridge
interface.
---
 src/bhyve/bhyve_command.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c
index 15029cd..42cab10 100644
--- a/src/bhyve/bhyve_command.c
+++ b/src/bhyve/bhyve_command.c
@@ -176,7 +176,11 @@ bhyveBuildNetArgStr(const virDomainDef *def, virCommandPtr cmd)
     }
 
     virCommandAddArg(cmd, "-s");
-    virCommandAddArgFormat(cmd, "1:0,virtio-net,%s", realifname);
+    virCommandAddArgFormat(cmd, "1:0,virtio-net,%s,mac=%02x:%02x:%02x:%02x:%02x:%02x",
+                           realifname,
+                           net->mac.addr[0], net->mac.addr[1],
+                           net->mac.addr[2], net->mac.addr[3],
+                           net->mac.addr[4], net->mac.addr[5]);
 
     return 0;
 }
-- 
1.9.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]