Skip to content

Commit

Permalink
Merge pull request #2581 from John15321/fix-port-forwarding-qemustart…
Browse files Browse the repository at this point in the history
…script

fix: Dynamically create netdev arguments to correctly include commas
  • Loading branch information
tormath1 authored Jan 17, 2025
2 parents cc1d4cd + 0f0fa2f commit c2d18cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build_library/qemu_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ case "${VM_BOARD}" in
qemu-system-x86_64 \
-name "$VM_NAME" \
-m ${VM_MEMORY} \
-netdev user,id=eth0,${QEMU_FORWARDED_PORTS},hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \
-netdev user,id=eth0${QEMU_FORWARDED_PORTS:+,}${QEMU_FORWARDED_PORTS},hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \
-device virtio-net-pci,netdev=eth0 \
-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 \
"$@"
Expand All @@ -311,7 +311,7 @@ case "${VM_BOARD}" in
qemu-system-aarch64 \
-name "$VM_NAME" \
-m ${VM_MEMORY} \
-netdev user,id=eth0,${QEMU_FORWARDED_PORTS},hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \
-netdev user,id=eth0${QEMU_FORWARDED_PORTS:+,}${QEMU_FORWARDED_PORTS},hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \
-device virtio-net-device,netdev=eth0 \
-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 \
"$@"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fixed creating netdev arguments to correctly include commas when no port forwards are passed ([flatcar/scripts#2581](https://github.com/flatcar/scripts/pull/2581))

0 comments on commit c2d18cf

Please sign in to comment.