Geert Uytterhoeven | 1 Jun 2010 22:32

[uml-user] slirp\'s redir option not working with UML

On Mon, 19 Apr 2010, Mark Longair wrote:
> I wonder if someone could help me with a frustrating problem I'm
> having with slirp-based networking in UML?  (I've tried asking
> on the slirp-devel mailing list, but didn't get any response.)
> I'd be very grateful for any help.
>
> Although this has worked for me successfully in the past, I'm
> having trouble getting the "redir" option for slirp to work
> properly for connecting to a UML instance.  (Network access from
> the UML machine to the outside world works fine, it's just the
> incoming connections that fail.)

I'm having the same problem on 2 machines running Ubuntu (9.04 in the past and
10.04 now), while it works fine on CentOS 5 and used to work fine on my previous
machine running Debian.

> This appears to set up the redirections correctly, since I see the
> following output (with some whitespace edited for readability):
>
>    [..]
>    Setting up networking....
>    Configuring network interfaces...
>    Slirp v1.0.17 (BETA) FULL_BOLT
>    Copyright (c) 1995,1996 Danny Gasparovski and others.
>    All rights reserved.
>    This program is copyrighted, free software.
>    Please read the file COPYRIGHT that came with the Slirp
>    package for the terms and conditions of the copyright.
>    Logging statistics
>    Redirecting TCP port 8042 to 10.0.2.15:80
(Continue reading)

clownix | 1 Jun 2010 23:28

Re: [uml-user] slirp\'s redir option not working with UML

Hello,
I must tell you that you can have an UML ubuntu 10.04 in the 
cloonix environment at http://cloonix.net
And the cloonix environement has a slirp integrated inside its
own network and you can surf on internet from your UML ubuntu 
plug-and-play.

Note: due to libssl used in cloonix, most users have to 
recompile the cloonix tree and as the cloonix also supports 
KVM, the following packages are needed for good compilation:  
  yum install gtk-vnc-devel
  yum install vte-devel
or
  apt-get install libgtk-vnc-1.0-dev
  apt-get install libvte-dev

Note: The slirp in cloonix has been recoded, but comes from the 
official slirp.

Le mardi 01 juin 2010 à 22:32 +0200, Geert Uytterhoeven a écrit :
> On Mon, 19 Apr 2010, Mark Longair wrote:
> > I wonder if someone could help me with a frustrating problem I'm
> > having with slirp-based networking in UML?  (I've tried asking
> > on the slirp-devel mailing list, but didn't get any response.)
> > I'd be very grateful for any help.
> >
> > Although this has worked for me successfully in the past, I'm
> > having trouble getting the "redir" option for slirp to work
> > properly for connecting to a UML instance.  (Network access from
> > the UML machine to the outside world works fine, it's just the
(Continue reading)

Geert Uytterhoeven | 4 Jun 2010 18:06

Re: [uml-user] slirp\'s redir option not working with UML

On Tue, Jun 1, 2010 at 23:28, clownix <clownix <at> clownix.net> wrote:
> I must tell you that you can have an UML ubuntu 10.04 in the
> cloonix environment at http://cloonix.net
> And the cloonix environement has a slirp integrated inside its
> own network and you can surf on internet from your UML ubuntu
> plug-and-play.

Assumed you don't hit the problem we're seeing on the _host_?

> Note: due to libssl used in cloonix, most users have to
> recompile the cloonix tree and as the cloonix also supports
> KVM, the following packages are needed for good compilation:
>  yum install gtk-vnc-devel
>  yum install vte-devel
> or
>  apt-get install libgtk-vnc-1.0-dev
>  apt-get install libvte-dev
>
> Note: The slirp in cloonix has been recoded, but comes from the
> official slirp.

So that slirp version may have a workaround?

> Le mardi 01 juin 2010 à 22:32 +0200, Geert Uytterhoeven a écrit :
>> On Mon, 19 Apr 2010, Mark Longair wrote:
>> > I wonder if someone could help me with a frustrating problem I'm
>> > having with slirp-based networking in UML?  (I've tried asking
>> > on the slirp-devel mailing list, but didn't get any response.)
>> > I'd be very grateful for any help.
>> >
(Continue reading)

clownix | 4 Jun 2010 19:57

Re: [uml-user] slirp\'s redir option not working with UML

>> > properly for connecting to a UML instance.  (Network access from
> >> > the UML machine to the outside world works fine, it's just the
> >> > incoming connections that fail.)

I think there must be a mistake here, a TCP or UDP connection can only
be initiated from the UML machine to the outside, slirp translates this
connection to the outside world. It is not possible for slirp to know on
which UDP/TCP ports the UML machine is waiting, so it is not possible to
get incoming TCP/UDP connections with slirp. But when a connection comes
from the UML machine, slirp opens a socket to the outside, that opens
the return port for the incoming data.

Here is an example for the udp dns and slirp:
UML produces an udp dns request for what UML believes is the dns server,
but is really the slirp inside addresse, slirp catches it and replaces
the destination addresse with the real dns server adresse found in the
file /etc/resolv.conf. When the response arrives into slirp, it puts its
addresse back as source addresse and delivers it to the UML machine.  

Could you be more precise about the incoming connections that fails ?

Le vendredi 04 juin 2010 à 18:06 +0200, Geert Uytterhoeven a écrit :
> On Tue, Jun 1, 2010 at 23:28, clownix <clownix <at> clownix.net> wrote:
> > I must tell you that you can have an UML ubuntu 10.04 in the
> > cloonix environment at http://cloonix.net
> > And the cloonix environement has a slirp integrated inside its
> > own network and you can surf on internet from your UML ubuntu
> > plug-and-play.
> 
> Assumed you don't hit the problem we're seeing on the _host_?
(Continue reading)

Geert Uytterhoeven | 4 Jun 2010 21:07

Re: [uml-user] slirp\'s redir option not working with UML

On Fri, Jun 4, 2010 at 19:57, clownix <clownix <at> clownix.net> wrote:
>>> > properly for connecting to a UML instance.  (Network access from
>> >> > the UML machine to the outside world works fine, it's just the
>> >> > incoming connections that fail.)
>
> I think there must be a mistake here, a TCP or UDP connection can only
> be initiated from the UML machine to the outside, slirp translates this
> connection to the outside world. It is not possible for slirp to know on
> which UDP/TCP ports the UML machine is waiting, so it is not possible to
> get incoming TCP/UDP connections with slirp. But when a connection comes
> from the UML machine, slirp opens a socket to the outside, that opens
> the return port for the incoming data.
>
> Here is an example for the udp dns and slirp:
> UML produces an udp dns request for what UML believes is the dns server,
> but is really the slirp inside addresse, slirp catches it and replaces
> the destination addresse with the real dns server adresse found in the
> file /etc/resolv.conf. When the response arrives into slirp, it puts its
> addresse back as source addresse and delivers it to the UML machine.
>
> Could you be more precise about the incoming connections that fails ?

Slirp has a `redir' feature, to redirect ports from the host to the guest.
That's what you use to e.g. ssh to the guest from the host.

> Le vendredi 04 juin 2010 à 18:06 +0200, Geert Uytterhoeven a écrit :
>> On Tue, Jun 1, 2010 at 23:28, clownix <clownix <at> clownix.net> wrote:
>> > I must tell you that you can have an UML ubuntu 10.04 in the
>> > cloonix environment at http://cloonix.net
>> > And the cloonix environement has a slirp integrated inside its
(Continue reading)

clownix | 4 Jun 2010 21:42

Re: [uml-user] slirp\'s redir option not working with UML


Cloonix also has ssh/scp to uml, but I have patched ssh and use the
resulting software to get access to the unix socket going into my slirp
version.

This way:

cloonix_ssh---->unix socket---->slirp daemon---->unix
socket----->uml_cloonix_switch--->UML eth interface

Cloonix has the ssh comfort but without perturbation in the host at all,
you never even need the root password and you can manage a full network
of UML.

Note: I have noticed that the unix sockets used for UML are much better
than the tcp used for the basic qemu-kvm (without vde which is not basic
qemu config). But I begin to believe that KVM networking with good old
unix sockets and virtio may well be faster than UML networking.
Answer in a few months.

I did not even know about the slirp redir feature, and this way of using
it for ssh!  Thanks for the info.

> 
> Slirp has a `redir' feature, to redirect ports from the host to the guest.
> That's what you use to e.g. ssh to the guest from the host.
> 

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
(Continue reading)

Paolo Giarrusso | 12 Jun 2010 14:47
Picon
Favicon

Re: [uml-user] Problems with UML , kernel 2-4.24

On Wed, May 19, 2010 at 17:29, Nikola Simidzievski
<nikola.simidzievski <at> gmail.com> wrote:
> Hello,
>
> I have several problems with UML with kernel 2-4.24. I need this particular
> kernel to run on my Ubuntu (2-6.33) but a can't figure it out what might be
> the problem. I try to build it "by the book" (patching it with uml-2-4.24-1)
> and configuring it but I can't build it. I keeps putting up errors with
> incompatibility headers or variables.I tried to change some of them but as
> I'm getting deeper in the code the errors get worser. Can I get this running
> on my machine at all ,or am I hopelessly trying?

> I need this particular
> kernel because of the netbus and hostap patches for it.

OK, if you really want that kernel, and if you do not want to just run
it under KVM (which requires support from the host processor), or QEMU
(hopelessly slow), it's a matter of how many patches you need. Uml has
never been _that_ easily portable. But at the time, I packaged myself
some bugfixes to UML, to run on slightly newer kernels, and while the
website is down, I will send them to you in a private mail. If you
don't know who I am, just look up 'Blaisorblade' on the Internet: I
was UML co-maintainer.

Since 2.4 kernels are relatively similar, you might want to try
patchsets 2.4.28-bs2 or 2.4.32-bs3. They apply _more or less_ to any
2.4 kernel (more or less). I suggest you that first you try to get,
say, a 2.4.28 kernel running (which might work with my patchset or
might require a bit more work), and then backport to 2.4.24 the needed
fixes (which should be easy enough).
(Continue reading)

Drew Vogel | 15 Jun 2010 22:17
Picon
Gravatar

[uml-user] Configuring an iSCSI initiator inside a UML guest

Is it possible to configure an iSCSI initiator inside a UML guest?

I have a UML guest running debian/stable (the host is also running debian/stable). I need to configure an iSCSI initiator (client) inside the guest. I've installed the open-iscsi debian package. Now I need to recompile my UML kernel to enable iSCSI initiator support. I've successfully recompiled my UML kernel to include ACL support, so I am familiar with that process. However when I run the command `ARCH=um make menuconfig`, the normal Device Drivers menu is inaccessible, which prevents me from enabling any of the SCSI modules. If I manually add CONFIG_SCSI, CONFIG_ISCSI_TCP, and CONFIG_BLK_SD to my .config, then run `ARCH=um make menuconfig`, the symbols I added manually are removed. This leads me to believe that iSCSI is simply not available inside UML. On the other hand, I found slides online[1][2] that indicate that it is possible to use iSCSI from a UML guest.

I suppose that I can configure the iSCSI initiator on my UML host and then let the UML guest access it via a ubd# argument. In instincts make me think that extra level of indirection will slow down storage access considerably.

[1] http://www.cs.uccs.edu/~gsc/pub/master/msanduku/doc1/thesis_presentation.ppt
[2] (same slides, convertted to Google Docs) http://docs.google.com/present/edit?id=0AR__Pz8-7AURZGc5ejdjdGJfNWc0bXpxbmhk&hl=en

Thanks,
Drew

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
Drew Vogel | 25 Jun 2010 00:16
Picon
Gravatar

[uml-user] Running different kernel versions between host and guest

Is there any issue with running a guest kernel that is a different version than the host? e.g. I have a host running 2.6.26 that is hosting a 2.6.18 guest. The guest seems to be running properly. The logs are free of errors and the data files don't appear corrupt. However when I run `ps axf` on the host, some of the guest's threads have a corrupt cmdline.

Thanks,
Drew Vogel

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user
NightStrike | 25 Jun 2010 04:44
Picon

Re: [uml-user] Running different kernel versions between host and guest

On Thu, Jun 24, 2010 at 6:16 PM, Drew Vogel <drewpvogel <at> gmail.com> wrote:
> Is there any issue with running a guest kernel that is a different version
> than the host? e.g. I have a host running 2.6.26 that is hosting a 2.6.18
> guest. The guest seems to be running properly. The logs are free of errors
> and the data files don't appear corrupt. However when I run `ps axf` on the
> host, some of the guest's threads have a corrupt cmdline.

I do this, too.  I have something like 2.6.18 as host and 2.6.34 (or
whatever is really new) as guest.  I solved a ton of problems by
compiling everything into the guest kernel and not using any modules.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo

Gmane