R: [Netkit.users] connecting to uml hosts

Massimo Rimondini maxonthenet a tiscali.it
Sab 23 Ott 2004 17:10:03 CEST

Dear Robert,

sorry for answering you so late, but I have been somewhat busy during the
past days, and I had to collect some information before being able to
provide you with a meaningful reply.

AFAIK, making a virtual machine use a terminal different from the standard
xterm is not easy by using the standard vstart script. Therefore, I can
suggest you some solutions which I derived from the User Mode Linux page

- The first solution is to attach the virtual machine to the current Virtual
Terminal (VT). In order to do this, type 'vstart <host_name> --new --print'.
This command does not actually start a virtual machine: it just shows you
the kernel command line that would be used to do this. Copy this line (just
the line between "starting virtual machine..." and "nothing done.") and
paste it on the shell prompt. Before pressing Enter, change the parameters
'con=' and 'con0=xterm' to the following values:

con= con0=tty:`tty`

The '`'s before and after 'tty' are used to avoid having to deal with device
names. If you experience difficulties in using this procedure (e.g., you
cannot type '`' before your keyboard does not support it or whatever else),
you can separately type 'tty' at the shell prompt, copy the result (which
looks like '/dev/ttyX', X being a number) and paste it after 'con0=tty:'.
The outcome is exactly the same.
Consider that, sometimes, this procedure can screw up your terminal after
stopping the virtual machine. For example, the characters you type at the
shell prompt may not be echoed any more. If this happens, you can play with
'stty' or similar commands in order to restore things (for example, typing
'stty echo' at the shell prompt, even if you do not see anything on screen
while typing, should restore character echoing).

- The above solution consistently limits the number of virtual machines you
can start, because you usually have about 5 available virtual terminals.
Another (nicer) chance is to associate a (telnet) port to each virtual
machine, so that you can connect to the VM console and use it only when
needed. In order to do this, you have to make the 'port-helper' command
available in the path /usr/lib/uml. In order to do this, become superuser
and create the directory /usr/lib/uml by typing 'mkdir /usr/lib/uml' (if it
does not already exist). Then link the command port-helper by typing 'ln -s
/absolute/path/to/netkit/bin/port-helper /usr/lib/uml'.
You can now use telnet ports. In order to do this, prepare the kernel
command line as shown above and change the parameters 'con=' and
'con0=xterm' to the following:

con= con0=port:9000

where 9000 can be any port number you like. You can then attach yourself to
the VM terminal by using 'telnet localhost 9000'. I believe this is a
solution that better fits your needs.

- Another chance is to set up a tunnel so that the VM can communicate with
the rest of the world: this allows you to telnet to a server inside the
virtual machine itself. You can find more information about making virtual
hosts connect to external networks at the page
(http://user-mode-linux.sourceforge.net/networking.html); somewhat technical
stuff, though...

Hope this helps.

Kind regards,
Massimo Rimondini

# -----Messaggio originale-----
# Da: netkit.users-admin a dia.uniroma3.it
# [mailto:netkit.users-admin a dia.uniroma3.it]Per conto di Robert Sebunnya
# Inviato: domenica 17 ottobre 2004 12.48
# A: netkit.users a dia.uniroma3.it
# Oggetto: [Netkit.users] connecting to uml hosts
# Hello, everyone.I am wondering whether it is possible to creates virtual
# hosts while not using x -windows.How does one connect to such
# created hosts?
# Robert Sebunnya
# Netwaork Operations
# Directorate for ICT Supoort
# Makerere University
# Uganda, East Africa
# _______________________________________________
# Netkit.users mailing list
# Netkit.users a pop.dia.uniroma3.it
# http://pop.dia.uniroma3.it/mailman/listinfo/netkit.users

Maggiori informazioni sulla lista Netkit.users