--- /usr/share/perl5/PVE/QemuServer.pm.orig 2018-08-30 03:07:40.885517605 +0300
+++ /usr/share/perl5/PVE/QemuServer.pm 2018-08-30 02:56:40.191065007 +0300
@@ -715,6 +715,12 @@
description => "Rate limit in mbps (megabytes per second) as floating point number.",
optional => 1,
},
+ mtu => {
+ type => 'number',
+ minimum => 1200, maximum=> 9000,
+ description => "MTU",
+ optional => 1,
+ },
tag => {
type => 'integer',
minimum => 1, maximum => 4094,
@@ -1839,6 +1845,7 @@
$tmpstr .= ",vectors=$vectors,mq=on";
}
$tmpstr .= ",bootindex=$net->{bootindex}" if $net->{bootindex} ;
+ $tmpstr .= ",host_mtu=$net->{mtu}" if $net->{mtu} ;
if ($use_old_bios_files) {
my $romfile;
@@ -4634,7 +4641,7 @@
&$safe_string_ne($oldnet->{trunks}, $newnet->{trunks}) ||
&$safe_num_ne($oldnet->{firewall}, $newnet->{firewall})) {
PVE::Network::tap_unplug($iface);
- PVE::Network::tap_plug($iface, $newnet->{bridge}, $newnet->{tag}, $newnet->{firewall}, $newnet->{trunks}, $newnet->{rate});
+ PVE::Network::tap_plug($iface, $newnet->{bridge}, $newnet->{tag}, $newnet->{firewall}, $newnet->{trunks}, $newnet->{rate}, $newnet->{mtu});
} elsif (&$safe_num_ne($oldnet->{rate}, $newnet->{rate})) {
# Rate can be applied on its own but any change above needs to
# include the rate in tap_plug since OVS resets everything.