提交 24aa0d18 编写于 作者: W Wojciech Macek 提交者: Roman Bogorodskiy

bhyve: MAC address configuration

Add support for MAC address configuration on network bridge
interface.
上级 990363bd
......@@ -113,6 +113,7 @@ bhyveBuildNetArgStr(const virDomainDef *def, virCommandPtr cmd)
char *brname = NULL;
char *realifname = NULL;
int *tapfd = NULL;
char macaddr[VIR_MAC_STRING_BUFLEN];
if (def->nnets != 1) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
......@@ -176,7 +177,8 @@ 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=%s",
realifname, virMacAddrFormat(&net->mac, macaddr));
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册