mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
feat(host): startvm: set vpc nic mtu
Windows DHCP client does not respect DHCP MTU option
This commit is contained in:
@@ -277,6 +277,7 @@ func (s *SKVMGuestInstance) getNicAddr(index int) int {
|
||||
}
|
||||
|
||||
func (s *SKVMGuestInstance) getVnicDesc(nic jsonutils.JSONObject) string {
|
||||
bridge, _ := nic.GetString("bridge")
|
||||
ifname, _ := nic.GetString("ifname")
|
||||
driver, _ := nic.GetString("driver")
|
||||
mac, _ := nic.GetString("mac")
|
||||
@@ -295,6 +296,9 @@ func (s *SKVMGuestInstance) getVnicDesc(nic jsonutils.JSONObject) string {
|
||||
cmd += fmt.Sprintf(",vectors=%d", vectors)
|
||||
}
|
||||
cmd += fmt.Sprintf("$(nic_speed %d)", bw)
|
||||
if bridge == options.HostOptions.OvnIntegrationBridge {
|
||||
cmd += fmt.Sprintf("$(nic_mtu %q)", bridge)
|
||||
}
|
||||
}
|
||||
return cmd
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user