[neon/ubuntu-core] /: Enable file sharing with the host through local-snaps to iterate faster
Kevin Ottens
null at kde.org
Tue Apr 23 22:35:17 BST 2024
Git commit 7862d97cb415dbaa016d20c3710ab7e503fba491 by Kevin Ottens.
Committed on 23/04/2024 at 21:28.
Pushed by ervin into branch 'master'.
Enable file sharing with the host through local-snaps to iterate faster
M +6 -0 run-image.sh
https://invent.kde.org/neon/ubuntu-core/-/commit/7862d97cb415dbaa016d20c3710ab7e503fba491
diff --git a/run-image.sh b/run-image.sh
index ec25a8e..8bb39b1 100755
--- a/run-image.sh
+++ b/run-image.sh
@@ -17,15 +17,21 @@ find_ovmf_bin() {
return 1
}
+SCRIPT_PATH=`readlink -f $0`
+SCRIPT_DIR=`dirname $SCRIPT_PATH`
+
IMAGE=$1
OVMF_BIN=`find_ovmf_bin`
+echo "If you need to access local-snaps from the guest run: mount -t 9p host_share /mnt"
qemu-system-x86_64 -smp 2 -m 2048 -machine accel=kvm \
-display gtk,gl=on \
-net nic,model=virtio -net user,hostfwd=tcp::8022-:22 \
-drive file=$OVMF_BIN,if=pflash,format=raw,unit=0,readonly=on \
-drive file=$IMAGE,cache=none,format=raw,id=main,if=none \
-device virtio-blk-pci,drive=main,bootindex=1 \
+ -fsdev local,id=fsdev0,path=$SCRIPT_DIR/local-snaps,security_model=none \
+ -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=host_share \
-audiodev pa,id=snd0 \
-device ac97,audiodev=snd0
More information about the Neon-commits
mailing list