Message ID | 20221109114823.16010-1-atanas.bunchev@konsulko.com |
---|---|
State | New, archived |
Headers | show |
Series | qemu.rst: slirp port forwarding details | expand |
Hi Atanas, On 11/9/22 12:48, Atanas Bunchev wrote: > Explains the default behavior of `runqemu slirp`. > Explains how to forward ports from the guest to the host machine. > > Signed-off-by: Atanas Bunchev <atanas.bunchev@konsulko.com> > --- > documentation/dev-manual/qemu.rst | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/documentation/dev-manual/qemu.rst b/documentation/dev-manual/qemu.rst > index 5a4a82ce6..1f866f1b7 100644 > --- a/documentation/dev-manual/qemu.rst > +++ b/documentation/dev-manual/qemu.rst > @@ -426,6 +426,16 @@ command line: > networking that does not need root access but also is not as easy to > use or comprehensive as the default. > > + Using ``slirp`` will forward the guest machine's 22 and 23 port to host Can we put "by default" somewhere in there? also s/port/ports/ > + machine's 2222 and 2323, incrementing them if they're already taken > + by another ``runqemu`` instance. Specific forwarding rules can be > + configured by setting ``QB_SLIRP_OPT`` in ``qemuboot.conf``. > + Examples:: > + > + QB_SLIRP_OPT="-netdev user,id=net0,hostfwd=tcp::8080-:80" > + > + QB_SLIRP_OPT="-netdev user,id=net0,hostfwd=tcp::8080-:80,hostfwd=tcp::2222-:22" > + Can you say in a few words below what exactly those commands do so that the user has somewhat of an idea what they are doing? Cheers, Quentin
diff --git a/documentation/dev-manual/qemu.rst b/documentation/dev-manual/qemu.rst index 5a4a82ce6..1f866f1b7 100644 --- a/documentation/dev-manual/qemu.rst +++ b/documentation/dev-manual/qemu.rst @@ -426,6 +426,16 @@ command line: networking that does not need root access but also is not as easy to use or comprehensive as the default. + Using ``slirp`` will forward the guest machine's 22 and 23 port to host + machine's 2222 and 2323, incrementing them if they're already taken + by another ``runqemu`` instance. Specific forwarding rules can be + configured by setting ``QB_SLIRP_OPT`` in ``qemuboot.conf``. + Examples:: + + QB_SLIRP_OPT="-netdev user,id=net0,hostfwd=tcp::8080-:80" + + QB_SLIRP_OPT="-netdev user,id=net0,hostfwd=tcp::8080-:80,hostfwd=tcp::2222-:22" + - ``kvm``: Enables KVM when running "qemux86" or "qemux86-64" QEMU architectures. For KVM to work, all the following conditions must be met:
Explains the default behavior of `runqemu slirp`. Explains how to forward ports from the guest to the host machine. Signed-off-by: Atanas Bunchev <atanas.bunchev@konsulko.com> --- documentation/dev-manual/qemu.rst | 10 ++++++++++ 1 file changed, 10 insertions(+)