update network dev: MTU is not hot-pluggable

Avoid pretending that a MTU change on a existing network device gets
applied live to a running VM.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
 [ T: reworded and expanded commit message slightly ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Alexandre Derumier 2022-11-26 08:20:25 +01:00 committed by Thomas Lamprecht
parent 93e21fd230
commit 62fdcfd4cf

View File

@ -5326,6 +5326,7 @@ sub vmconfig_update_net {
if (safe_string_ne($oldnet->{model}, $newnet->{model}) || if (safe_string_ne($oldnet->{model}, $newnet->{model}) ||
safe_string_ne($oldnet->{macaddr}, $newnet->{macaddr}) || safe_string_ne($oldnet->{macaddr}, $newnet->{macaddr}) ||
safe_num_ne($oldnet->{queues}, $newnet->{queues}) || safe_num_ne($oldnet->{queues}, $newnet->{queues}) ||
safe_num_ne($oldnet->{mtu}, $newnet->{mtu}) ||
!($newnet->{bridge} && $oldnet->{bridge})) { # bridge/nat mode change !($newnet->{bridge} && $oldnet->{bridge})) { # bridge/nat mode change
# for non online change, we try to hot-unplug # for non online change, we try to hot-unplug