From 29828f841e482d8637c4ce26f12bb6a069f8c13e Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 5 Sep 2021 13:18:19 +0200 Subject: Updated simple qemu vm blog article --- content/blog/commands/qemu-bis.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'content/blog/commands') diff --git a/content/blog/commands/qemu-bis.md b/content/blog/commands/qemu-bis.md index ddaf4b1..d0af3c4 100644 --- a/content/blog/commands/qemu-bis.md +++ b/content/blog/commands/qemu-bis.md @@ -17,16 +17,22 @@ I know I already blogged about it in 2019 in [this article]({{< ref "qemu.md" >} qemu-img create -f raw alpine.raw 16G qemu-system-x86_64 -drive file=alpine.raw,format=raw,cache=writeback \ -cdrom Downloads/alpine-virt-3.14.0-x86_64.iso \ - -net user -boot d -machine type=q35,accel=kvm \ - -cpu host -smp 2 -m 1024 -vnc :0 + -boot d -machine type=q35,accel=kvm \ + -cpu host -smp 2 -m 1024 -vnc :0 \ + -device virtio-net,netdev=vmnic -netdev user,id=vmnic ``` -Connect to the console with a `vncviewer localhost`. +Connect to the console with a `vncviewer :0`. ## Afterwards ```sh qemu-system-x86_64 -drive file=alpine.raw,format=raw,cache=writeback \ - -net user -machine type=q35,accel=kvm \ - -cpu host -smp 2 -m 1024 -vnc :0 + -boot c -machine type=q35,accel=kvm \ + -cpu host -smp 2 -m 1024 -vnc :0 \ + -device virtio-net,netdev=vmnic -netdev user,id=vmnic ``` + +## References + + * https://wiki.gentoo.org/wiki/QEMU/Options#Networking -- cgit v1.2.3