[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Running server from within qemu
From: |
Alex Bennée |
Subject: |
Re: Running server from within qemu |
Date: |
Mon, 17 Oct 2022 18:24:34 +0100 |
User-agent: |
mu4e 1.9.1; emacs 28.2.50 |
தாசெ ௩ <paxi.three@gmail.com> writes:
> Hi,
>
> I am new to using QEMU. Is it possible to host a simple http/tcp server on a
> Linux which is running on qemu, without any
> accompanying vm (KVM), and hit that http server from the host OS (say
> Windows)? What options should I choose in army
> (command line args) to run any TCP based server from within qemu?
>
> As of now I use the following to start my OpenWRT Linux on QEMU:
> $ qemu-sysyem-arm -M vert-2.9 -kernel openwrt-22.03.1-armvirt-32-zImage
> -no-reboot -nographic -drive
> file=openwrt-32-rootfs-ext4.img,if=virtio,format=raw -append "root=/dev/vda"
> -m 1G -nic user -nic user
>
You have two nics in the command line. Anyway using a proper split
-netdev/-device specification:
-netdev user,id=unet,hostfwd=tcp::2222-:22 -device virtio-net-pci,netdev=unet
which in this case forwards tcp port 2222 on the host to port 22 on the
guest. Just don't expect brilliant performance.
> Thankyou
--
Alex Bennée