Update all qemu article to add host port forwarding
This commit is contained in:
parent
f8329249d1
commit
de7791d148
1 changed files with 3 additions and 3 deletions
|
@ -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 \
|
-cdrom Downloads/alpine-virt-3.14.0-x86_64.iso \
|
||||||
-boot d -machine type=q35,accel=kvm \
|
-boot d -machine type=q35,accel=kvm \
|
||||||
-cpu host -smp 2 -m 1024 -vnc :0 \
|
-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
|
## 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 \
|
qemu-system-x86_64 -drive file=alpine.raw,format=raw,cache=writeback \
|
||||||
-boot c -machine type=q35,accel=kvm \
|
-boot c -machine type=q35,accel=kvm \
|
||||||
-cpu host -smp 2 -m 1024 -vnc :0 \
|
-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
|
## References
|
||||||
|
|
Loading…
Add table
Reference in a new issue