This topic contains 3 replies, has 2 voices, and was last updated by Mike Levin 3 years, 9 months ago.
April 24, 2014 at 6:13 PM #15642158480
I am really enjoying poking around in Levinux and plan to use it for my shortstack dev environment to finally fully learn Python.
I’m curious about some of the architecture as I poke around to get a feel for things and wonder if you already have a document or wouldn’t mind posting something that lays out how QEMU and tiny core are configured to work with each other from a networking standpoint. If you don’t mind.
I have noticed that the Recipe.sh file makes calls with tftp to 10.0.2.2 and that got me wondering just how you pull off all that redirection.
tftp -g -l /home/tc/htdocs/index.html -r /Ingredients/index.html 10.0.2.2
If also made me wonder if that hard coded 10.0.2.2 could sometimes run afoul of special setups that individuals might have.
All this is to say, I think we all could learn a ton from how your are pulling this off and a diagram and/or write up (in your ample spare time, of course) would probably be very enlightening in that regard.
Thanks for a great project. I am really looking forward to exploring it further.
JimApril 28, 2014 at 10:39 AM #15642158495
Here’s the document that I learned about QEMU networking from: https://people.gnome.org/~markmc/qemu-networking.html
Here’s another document: http://wiki.qemu.org/Documentation/Networking
Bottom line is that QEMU sets up its own entire network with its own entire system of internal IP numbers on a private virtual local area network (VLAN). This can be overridden and configured in many different ways, but the default (which Levinux uses) locks down a lot of security issues so that almost no one can tell you’re running a virtual machine and very little can run afoul. I poke holes for inbound services on ports 8080 (for a webserver) and 2222 (for secure shell login) and a few others you can review by looking at the script that actually launches QEMU.
The things you see with tftp inside Recipe.sh takes advantage of the fact that QEMU has a built-in trivial FTP server (tftp) mostly so that QEMU can boot without a hard drive from the network, but I use this feature to transmit files from the host into the guest system. It’s a very powerful technique for managing server-building recipes on the host side where you’re familiar with all the tools, but which then get moved over to the host for execution where it can actually build up the server from code executing inside the guest.
Neat tricks. Can hardly believe others aren’t connecting these same dots for more creative use of QEMU.May 2, 2014 at 11:56 AM #15642158501
Those links and your quick explanation were exactly what I was looking for. I’m looking forward to poking around some more.
I could see how a teach could use this information to create custom Levinux builds for different classroom excercises. It seems pretty flexible.
JimMay 5, 2014 at 9:52 AM #15642158510
Thanks. The default networking setup of QEMU is at first baffling, and then a source of comfort and then a constant obstacle to overcome when trying to do net-accessible server stuff. I think I’m really positioning Levinux as a jumping-off point – the shallow end of the Unix/Linux pool where you can get your feet wet. Once you actually understand why QEMU networking works and is safe, you know enough to move onto bigger and better things.