Handle bridge name correctly.

This commit is contained in:
Michael Lipp 2023-06-18 14:38:53 +02:00
parent 080156157f
commit 23ca2e0e43
3 changed files with 4 additions and 2 deletions

View file

@ -1,3 +1,4 @@
config.yaml
/config-w11.yaml
/config-fedora.yaml
/config-test-vm.yaml

View file

@ -159,7 +159,7 @@ class Configuration implements Dto {
*/
public static class Network implements Dto {
public String type = "tap";
public String bridge = "br0";
public String bridge;
public String device = "virtio-net";
public String mac;
public String net;

View file

@ -123,7 +123,8 @@
<#list vm.network![] as itf>
<#switch itf.type!"tap">
<#case "tap">
- [ "-netdev", "bridge,id=hostnet${ nwCounter }" ]
- [ "-netdev", "bridge,id=hostnet${ nwCounter }\
<#if itf.bridge??>,br=${ itf.bridge }</#if>" ]
- [ "-device", "${ itf.device },netdev=hostnet${ nwCounter }\
<#if itf.mac??>,mac=${ itf.mac }</#if>" ]
<#break>