From de7791d14872b320f51a5c85b20047f2aa717890 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Tue, 30 Aug 2022 16:14:08 +0200 Subject: Update all qemu article to add host port forwarding --- content/blog/commands/qemu-bis.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/blog/commands/qemu-bis.md b/content/blog/commands/qemu-bis.md index 3526316..72709b2 100644 --- a/content/blog/commands/qemu-bis.md +++ b/content/blog/commands/qemu-bis.md @@ -19,10 +19,10 @@ qemu-system-x86_64 -drive file=alpine.raw,format=raw,cache=writeback \ -cdrom Downloads/alpine-virt-3.14.0-x86_64.iso \ -boot d -machine type=q35,accel=kvm \ -cpu host -smp 2 -m 1024 -vnc :0 \ - -device virtio-net,netdev=vmnic -netdev user,id=vmnic + -device virtio-net,netdev=vmnic -netdev user,id=vmnic,hostfwd=tcp::10022-:22 ``` -Connect to the console with a `vncviewer :0`. +Connect to the console with a `vncviewer :0`, or if an ssh server is running, use `ssh -p10022 root@localhost`. ## Afterwards @@ -30,7 +30,7 @@ Connect to the console with a `vncviewer :0`. qemu-system-x86_64 -drive file=alpine.raw,format=raw,cache=writeback \ -boot c -machine type=q35,accel=kvm \ -cpu host -smp 2 -m 1024 -vnc :0 \ - -device virtio-net,netdev=vmnic -netdev user,id=vmnic + -device virtio-net,netdev=vmnic -netdev user,id=vmnic,hostfwd=tcp::10022-:22 ``` ## References -- cgit v1.2.3