在 2017年11月22日星期三 UTC+8下午11:49:24,Nadav Har'El写道:
> On Wed, Nov 22, 2017 at 5:24 PM, Waldek Kozaczuk <jwkoz...@gmail.com> wrote:
> 
> You probably need to expose the port 1121 by adding forward option like so:
> 
> 
> scripts/run.py -e "memcached -u root" --forward "tcp:1121::1121"
> 
> 
> Right. By default, run.py runs the image you just built 
> (build/latest/usr.img) with qemu using its "emulated networking".
> This emulated networking means that the guest can send out packets, and qemu 
> uses NAT to send them out itself
> and receive replies. BUT, this NAT also means that by default, you cannot 
> connect to this guest from the outside.
> The command line which Waldek wrote asks qemu to also open a listening port 
> 1121 **on the host**, and whatever
> it receives it should forward to port 1121 **in the guest**. When you do 
> that, you can connect to the *host's* port
> 1121, and magically, the guest handles these connections.
> 
> 
> Another alternative is ask run.py to use a *bridge* device (sort of like a 
> physical hub appliance), which means that all
>  packets going out of the guest will be sent to this bridge - and all packets 
> sent to this bridge will be received by the guest.
> Setting up a bridge device is more involved, but the resulting network 
> performance can be significantly better than
> what you can get with qemu's emulated networking (i.e., no NAT required), so 
> most serious installations will use it.
> You give run.py the "-n" option to use a bridge (and -b to specify the bridge 
> device name). There's also the "-v"
> option to use vhost-net, which is faster than the default virtio-net.
> 
> 
> Finally, you can run the image in your favorite hypervisor or cloud, and set 
> up the networking there the way you're
> familiar with. "run.py" is just an example, easy to use tool (once you get 
> familiar with), you're not forced to use it
> to run OSv.
> 
>  
> Nadav.

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to