all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] blockdev: add NBD: fix handling of IPv6 host to unbreak TCP disk live migration
@ 2025-11-24 12:21 Fiona Ebner
  2025-11-29 22:49 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2025-11-24 12:21 UTC (permalink / raw)
  To: pve-devel

As reported in the community forum [0], live disk migration using
migration type 'insecure' would fail when the target is an IPv6 host.
When passing the IPv6 address to QMP, the surrounding square brackets
need to be removed first.

[0]: https://forum.proxmox.com/threads/176727/

Fixes: 3fee3186 ("blockdev: add support for NBD paths")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/QemuServer/Blockdev.pm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/PVE/QemuServer/Blockdev.pm b/src/PVE/QemuServer/Blockdev.pm
index 26e9c383..af7e769b 100644
--- a/src/PVE/QemuServer/Blockdev.pm
+++ b/src/PVE/QemuServer/Blockdev.pm
@@ -274,8 +274,13 @@ my sub generate_file_blockdev {
         my $server = { type => 'unix', path => "$1" };
         $blockdev = { driver => 'nbd', server => $server, export => "$2" };
     } elsif ($drive->{file} =~ m/^$NBD_TCP_PATH_RE_3$/) {
-        my $server = { type => 'inet', host => "$1", port => "$2" }; # port is also a string in QAPI
-        $blockdev = { driver => 'nbd', server => $server, export => "$3" };
+        my ($host, $port, $export) = ($1, $2, $3);
+        if ($host =~ m/^\[(.*)\]$/) { # IPv6 address needs to be passed without square brackets
+            $host = $1;
+        }
+        # port is also a string in QAPI
+        my $server = { type => 'inet', host => "$host", port => "$port" };
+        $blockdev = { driver => 'nbd', server => $server, export => "$export" };
     } elsif ($drive->{file} eq 'cdrom') {
         my $path = PVE::QemuServer::Drive::get_iso_path($storecfg, $drive->{file});
         $blockdev = { driver => 'host_cdrom', filename => "$path" };
-- 
2.47.3



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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH qemu-server] blockdev: add NBD: fix handling of IPv6 host to unbreak TCP disk live migration
  2025-11-24 12:21 [pve-devel] [PATCH qemu-server] blockdev: add NBD: fix handling of IPv6 host to unbreak TCP disk live migration Fiona Ebner
@ 2025-11-29 22:49 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-11-29 22:49 UTC (permalink / raw)
  To: pve-devel, Fiona Ebner

On Mon, 24 Nov 2025 13:21:51 +0100, Fiona Ebner wrote:
> As reported in the community forum [0], live disk migration using
> migration type 'insecure' would fail when the target is an IPv6 host.
> When passing the IPv6 address to QMP, the surrounding square brackets
> need to be removed first.
> 
> [0]: https://forum.proxmox.com/threads/176727/
> 
> [...]

Applied, thanks!

[1/1] blockdev: add NBD: fix handling of IPv6 host to unbreak TCP disk live migration
      commit: d8bd9aba33326812ed5a44dc18886e97744d16ae


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-29 22:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-24 12:21 [pve-devel] [PATCH qemu-server] blockdev: add NBD: fix handling of IPv6 host to unbreak TCP disk live migration Fiona Ebner
2025-11-29 22:49 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal