public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH-SERIES qemu-server v2 0/4] virtio-net: fix migration between default/non-default MTUs, part one and two
Date: Wed,  3 Sep 2025 16:22:27 +0200	[thread overview]
Message-ID: <20250903142238.116492-1-f.ebner@proxmox.com> (raw)

Changes in v2:
* push make tidy change already to master
* add part two - migration
* move version_guard() call to outside of print_netdevice_full() call
* add comment about why host_mtu is always set in source code

The virtual hardware is generated differently (at least for i440fx
machines) when host_mtu is set or not set on the netdev command line
[0]. When the MTU is the same value as the default 1500, Proxmox VE
did not add a host_mtu parameter. This is problematic for migration
where host_mtu is present on one end of the migration, but not on the
other [1].

Always set the host_mtu parameter starting with machine version
10.0+pve1 to avoid this issue going forward. For snapshots, the
nets-host-mtu information needs to be recorded in the snapshot config.
When the information is not present, and the machine version is
10.0+pve0, the Proxmox VE 9 behavior can be used. For other machine
versions we need to decide whether to use Proxmox VE 8 or Proxmox VE 9
behavior. The VM start parameter already provides an escape hatch in
any case. This will be the third an final part of these series.

Moreover, the effective setting in the guest (state) will
still be the host_mtu from the source side, even if a different value
is used for host_mtu on the target instance's commandline. This will
not lead to an error loading the migration stream in QEMU, but having
a larger host_mtu than the bridge MTU is still problematic for certain
network traffic like
> iperf3 -c 10.10.10.11 -u -l 2k
when host_mtu=9000 and bridge MTU=1500.

Add the necessary parameter for VM start and pass the values along for
migration to preserve the values going forward.

For Proxmox VE 8, add a dummy setting for VM start and also start
passing along the values.


Fiona Ebner (3):
  virtio-net: fix migration between default/non-default MTUs starting
    with machine version 10.0+pve1
  api: vm start: introduce nets-host-mtu parameter for migration compat
  migration: preserve host_mtu for virtio-net devices


stable-bookworm:

Fiona Ebner (1):
  migration: preserve host_mtu for virtio-net devices

 src/PVE/API2/Qemu.pm                          | 11 +++
 src/PVE/QemuMigrate.pm                        | 37 ++++++++++
 src/PVE/QemuServer.pm                         | 69 +++++++++++++++++--
 src/PVE/QemuServer/Machine.pm                 |  6 ++
 src/test/MigrationTest/QemuMigrateMock.pm     |  9 +++
 src/test/cfg2cmd/bootorder-empty.conf.cmd     |  4 +-
 src/test/cfg2cmd/bootorder-legacy.conf.cmd    |  4 +-
 src/test/cfg2cmd/bootorder.conf.cmd           |  4 +-
 src/test/cfg2cmd/efidisk-on-rbd.conf.cmd      |  4 +-
 src/test/cfg2cmd/ide.conf.cmd                 |  4 +-
 .../cfg2cmd/netdev-7.1-multiqueues.conf.cmd   |  2 +-
 src/test/cfg2cmd/netdev-7.1.conf.cmd          |  2 +-
 src/test/cfg2cmd/netdev_vxlan.conf.cmd        |  2 +-
 src/test/cfg2cmd/q35-ide.conf.cmd             |  4 +-
 .../q35-linux-hostpci-mapping.conf.cmd        |  4 +-
 .../q35-linux-hostpci-multifunction.conf.cmd  |  4 +-
 ...q35-linux-hostpci-x-pci-overrides.conf.cmd |  4 +-
 src/test/cfg2cmd/q35-linux-hostpci.conf.cmd   |  4 +-
 src/test/cfg2cmd/q35-simple.conf.cmd          |  4 +-
 src/test/cfg2cmd/seabios_serial.conf.cmd      |  4 +-
 src/test/cfg2cmd/simple-btrfs.conf.cmd        |  4 +-
 .../cfg2cmd/simple-disk-passthrough.conf.cmd  |  4 +-
 src/test/cfg2cmd/simple-rbd.conf.cmd          |  4 +-
 src/test/cfg2cmd/simple-virtio-blk.conf.cmd   |  4 +-
 .../cfg2cmd/simple-zfs-over-iscsi.conf.cmd    |  4 +-
 src/test/cfg2cmd/simple1.conf.cmd             |  4 +-
 26 files changed, 165 insertions(+), 45 deletions(-)

-- 
2.47.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


             reply	other threads:[~2025-09-03 14:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-03 14:22 Fiona Ebner [this message]
2025-09-03 14:22 ` [pve-devel] [PATCH qemu-server v2 1/4] virtio-net: fix migration between default/non-default MTUs starting with machine version 10.0+pve1 Fiona Ebner
2025-09-03 14:22 ` [pve-devel] [PATCH qemu-server v2 2/4] api: vm start: introduce nets-host-mtu parameter for migration compat Fiona Ebner
2025-09-04  9:11   ` Fabian Grünbichler
2025-09-04  9:28     ` Fiona Ebner
2025-09-04  9:52       ` Fabian Grünbichler
2025-09-04 10:03         ` Fiona Ebner
2025-09-04  9:55       ` Fiona Ebner
2025-09-03 14:22 ` [pve-devel] [PATCH qemu-server v2 3/4] migration: preserve host_mtu for virtio-net devices Fiona Ebner
2025-09-03 14:22 ` [pve-devel] [PATCH qemu-server v2 stable-bookworm 4/4] " Fiona Ebner
2025-09-04  9:11   ` Fabian Grünbichler
2025-09-04  9:32     ` Fiona Ebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250903142238.116492-1-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal