With --shared=4 qemu-nbd allows 4 concurrent connections. Without this
only the first connection succeed and the rest will block forever.
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
copy/copy-file-to-qcow2.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/copy/copy-file-to-qcow2.sh b/copy/copy-file-to-qcow2.sh
index 57c18b3..ae41ed0 100755
--- a/copy/copy-file-to-qcow2.sh
+++ b/copy/copy-file-to-qcow2.sh
@@ -54,7 +54,7 @@ qemu-img create -f qcow2 $qcow2 $size
# Run qemu-nbd as a separate process so that we can copy to and from
# the single process in two separate operations.
-qemu-nbd -f qcow2 -t --socket=$sock --pid-file=$pidfile $qcow2 &
+qemu-nbd -f qcow2 -t --shared=4 --socket=$sock --pid-file=$pidfile $qcow2 &
cleanup_fn kill $!
# Wait for qemu-nbd to start up.
--
2.26.3