aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2022-08-30 16:14:08 +0200
committerJulien Dessaux2022-08-30 16:14:08 +0200
commitde7791d14872b320f51a5c85b20047f2aa717890 (patch)
treea3ac7c2e85474c7dd9b2b33fb18e6369d22b016d
parentUpdated previous home network articles (diff)
downloadwww-de7791d14872b320f51a5c85b20047f2aa717890.tar.gz
www-de7791d14872b320f51a5c85b20047f2aa717890.tar.bz2
www-de7791d14872b320f51a5c85b20047f2aa717890.zip
Update all qemu article to add host port forwarding
-rw-r--r--content/blog/commands/qemu-bis.md6
1 files 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