f-56: agent: MTU unique network.mtu_vm, underlay à 9000 contrôlé à la création, option DHCP 26 et host_mtu #56
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
8eb77b302b
commit
8639c4727f
37 changed files with 518 additions and 24 deletions
|
|
@ -102,9 +102,13 @@ func buildArgs(cfg Config) ([]string, error) {
|
|||
return nil, fmt.Errorf("vm %s has %d interfaces, the pci map holds %d", cfg.Name, len(cfg.NICs), maxNICs)
|
||||
}
|
||||
for i, n := range cfg.NICs {
|
||||
device := fmt.Sprintf("virtio-net-pci,netdev=net%d,mac=%s,bus=pci.0,addr=0x%02x", i, n.Mac, firstNICSlot+i)
|
||||
if n.MTU > 0 {
|
||||
device += fmt.Sprintf(",host_mtu=%d", n.MTU)
|
||||
}
|
||||
args = append(args,
|
||||
"-netdev", fmt.Sprintf("tap,id=net%d,ifname=tap%d,script=no,downscript=no", i, n.TapID),
|
||||
"-device", fmt.Sprintf("virtio-net-pci,netdev=net%d,mac=%s,bus=pci.0,addr=0x%02x", i, n.Mac, firstNICSlot+i),
|
||||
"-device", device,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue