commit:     121ee71140fb9f621b6a0dccaf2093e5b8eefae3
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri May  2 16:25:39 2025 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri May  2 16:25:39 2025 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=121ee711

Add a wait after setting up nbd device, let's see if that helps

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 targets/support/create-qcow2.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/targets/support/create-qcow2.sh b/targets/support/create-qcow2.sh
index a9ac60b3..f8cfb5ef 100755
--- a/targets/support/create-qcow2.sh
+++ b/targets/support/create-qcow2.sh
@@ -99,6 +99,9 @@ qemu-img create -f qcow2 "${myqcow2}.tmp.qcow2" 
${clst_qcow2_size/%iB/} || die "
 echo "Connecting the qcow2 file to network block device ${mydevice}"
 qemu-nbd -c ${mydevice} -f qcow2 "${myqcow2}.tmp.qcow2" || die "Cannot connect 
qcow2 file to nbd0"
 
+echo "Waiting 5s to ensure device ${mydevice} is set up"
+sleep 5s
+
 echo "Creating a GPT disklabel"
 parted -s ${mydevice} mklabel gpt 2>&1 || qcow2die "Cannot create disklabel"
 

Reply via email to