All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: "தாசெ ௩" <paxi.three@gmail.com>
Cc: qemu-arm@nongnu.org
Subject: Re: Running server from within qemu
Date: Mon, 17 Oct 2022 18:24:34 +0100	[thread overview]
Message-ID: <878rlee4yf.fsf@linaro.org> (raw)
In-Reply-To: <CAChpoR45q6huduz7J7jrOrJz3gqHYT+jr1j=QKnfmPbj=wd_pg@mail.gmail.com>


தாசெ ௩ <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

  reply	other threads:[~2022-10-17 17:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-16 22:23 Running server from within qemu தாசெ ௩
2022-10-17 17:24 ` Alex Bennée [this message]
2022-10-17 22:13   ` தாசெ ௩
2022-10-18  0:34   ` தாசெ ௩

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rlee4yf.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=paxi.three@gmail.com \
    --cc=qemu-arm@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.