[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MirageOS-devel] Mirage on Raspberry Pi 3
Joel Hughes <rudenoise@xxxxxxxxx> wrote on 03/10/2016 08:13:24 AM: > I think I'm nearly there with the RPi set-up: > > https://github.com/rudenoise/qemu-solo5-mirage-rpi3
> The mirage website kernel seems to be running, and I have a network > bridge, with a tap for the qemu connection.
> I can't get a response from 10.0.0.2, though. If anyone can spot any > problems (or has suggestions) let me know.
Just to make sure, you are trying to ping from 10.0.0.2 on the Pi itself, right? You shouldn't be able to ping from outside (on the 192.168.1 network). I don't really understand why you wouldn't be able to ping from the local host (the Pi) via 10.0.0.1 (your tap0 alias), though.
I don't think it's causing problems, but I'm pretty sure that the bridge is unnecessary in your network setup.
You got everything to run in OSX by adding an alias for tap0 to be 10.0.0.1. I was not aware of the "alias" concept. Here's my guess as to what is happening: the alias allows your host to know that, when you are sending to a 10.* network, it has an interface to use (tap0 with 10.0.0.1). Pinging 10.0.0.2 will cause the host to send packets out that interface, which happen to show up in the QEMU guest because of how TAP devices work. I don't think the bridge has anything to do with it. You can test by running tcpdump on the different interfaces and the bridge and trying to see where you can see them on OSX and I wouldn't expect you to see 10.* traffic on the bridge.
The way I had done it on Linux (being ignorant of "alias") was to create a local bridge and a new VNIC pair, then add both the tap and one end of the new VNIC pair to the bridge (virbr0). That was all the bridge was used for. I guess a different thing you could try is to use the config_net script in the Solo5 repo, which does this VNIC pair/bridge stuff rather than the one you'd created for OSX, but (if you can get it to work) your way seems much cleaner.
Dan
> On 9 March 2016 at 14:26, Joel Hughes <rudenoise@xxxxxxxxx> wrote: > OK! Got a the Mirage website running in Qemu on OSX.
> I needed to set up a alias: ifconfig tap0 10.0.0.1 alias
> Now for the Pi. > > On 9 March 2016 at 13:00, Joel Hughes <rudenoise@xxxxxxxxx> wrote: > Thanks again Dan.
> I'm getting a little closer on OSX:
> I now see "listening on http://localhost" but still not able to get > see the unikernel serving. > > https://github.com/rudenoise/solo5-mirage-OSX > > > I've also got going on the Raspberry Pi: > https://github.com/rudenoise/qemu-solo5-mirage-rpi3
> As you can see I've got the Unikernel running but haven't started > network setup, yet. > > On 8 March 2016 at 23:07, Daniel J Williams <djwillia@xxxxxxxxxx> wrote: > "MirageOS-devel" <mirageos-devel-bounces@xxxxxxxxxxxxxxxxxxxx> wrote > on 03/08/2016 05:10:44 PM: > > > From: Joel Hughes <rudenoise@xxxxxxxxx> > > I guess the www unikernal is running but my networking knowledge may > > be letting me down. > > It does look like that is the case to me too. > > > In the example bridge0's inet is 169.254.65.18 is that where I'd > > expect it to be accessible? And I see that qemu has created tap0 and > > attached it to bridge0. > > > What I'm unclear about is how I can make http requests to the > > running unikernel from the host/OSX? > > There's a lot of different ways to configure networking, which is > what makes it so confusing. I can tell you how I'm doing it in the > containers if that helps. Are you trying to set up networking on > your rPi3 or OSX? I do have access to OSX, so I can try things out > there in the next couple of days, but I'm not as familiar with the > OSX networking vs. Linux. > > The Solo5/Mirage unikernel's network stack is configured to either > use DHCP or a static IP address. The example is using the default > MirageOS static IP address, which is hardcoded somewhere to 10.0.0. > 2. So that's the address that the unikernel will think it is. > > I normally set up a local bridge (virbr0) where I tell QEMU to put > the tap device and I also add a virtual NIC pair with 10.0.0.1, so > that I can access the unikernel from the host directly (e.g., ping > 10.0.0.2, wget 10.0.0.2, etc.) > > The script that QEMU uses to know that it should add to virbr0 is here: > > https://github.com/djwillia/solo5/blob/mirage/kvm-br.bash > > The script that I use to configure the host to have its virtual NIC > pair is here: > > https://github.com/djwillia/solo5/blob/mirage/config_net.bash > > The `iptables` commands at the bottom of that script are how I > normally expose a port to the outside world (e.g., port 80). After > that, I can access the web server on the host's IP address. > > Dan
_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|