From: Mark Ryan <mryan@is...> - 2003-06-28 21:54:18
I'm running several UML's on the same host that are identical except for
their IP addresses. I start them with "eth0=daemon" and run
uml_switch on the host.
Up to now, the way I've configured them is to configure network settings
on the first one, copy its cow file to a different name, boot the second
UML from that cow file, and edit the network settings, leaving the
gateway, subnet mask and everything the same but editing the IP address.
At one point, I seem to recall chatting with either Jeff Dike or Bill
Stearns and being told that it was possible to set a UML's IP address
from the command line via some kind of rc script. I never got all the
details. Does anyone know how this might be done?
Institute for Security Technology Studies
Key fingerprint = DDEB 70ED 289A A94B E918 4D61 D0D4 F89A B642 8960
On Sat, Jun 28 '03 at 17:54, Mark Ryan wrote:
> At one point, I seem to recall chatting with either Jeff Dike or Bill
> Stearns and being told that it was possible to set a UML's IP address
> from the command line via some kind of rc script. I never got all the
> details. Does anyone know how this might be done?
It should work like this:
- find a parameter that neither the uml binary nor the kernel take as a
parameter. Like UMLip.
- Add it to the start parameters of your uml binary
- this parameter is than available as an environment variable for each
end very script init starts when going from runlevel N to initdefault
- so you just have to change the script that sets up your networking to
use this variable as it's IP.
for tests, i've taken one of my umls. added UMLip=192.168.100.1 to the
parameters. Added a line into /etc/init.d/networking (this is a Trustix
Secure Linux 2.0rc1 instalation) to echo "UMLip: $UMLip" and on boot up
/"\ Goetz Bock at blacknet dot de -- secure mobile Linux everNETting
\ / (c) 2003 as GNU FDL 1.1
X [ 1. Use descriptive subjects - 2. Edit a reply for brevity - ]
/ \ [ 3. Reply to the list - 4. Read the archive *before* you post ]