VNUML Tutorial
version 1.2

Author: Fermín Galán (galan@dit.upm.es)

July 29th, 2003

Contents

1. Introduction
2. Installation
   2. 1. Installing Perl Modules
3. Writting the simulation
   3. 1. Generate SSH key
4. Building simulation
   4. 1. Check the topology
5. A simple simulation cycle
6. Destroying simulation
7. Further reading
Appendix: Execution logs

[Home]

1. Introduction

This tutorial explains how to install and configure a small simulation using VNUML. The goal is to introduce VNUML philosophy setting an example testbed (shown in figure) with five interconected UMLs.

This tutorial covers VNUML language version 1.2 and vnumlparser.pl 1.2.1.

Before begining, check the following prerequisites. VNUML may not work if any of them is not acomplished!

2. Installation

The first task is to install the VNUML related software. VNUML parser is just a script, but it need several packages to work.

2. 1. Installing Perl modules

Perl modules are distributed as .tar.gz files. The standarized way to install them is the following:

  1. Uncompress file.
  2. Execute 'perl Makefile.PL'. This checks dependencies and tell you if another required module have to be installed previously.
  3. Execute 'make'.
  4. Execute 'make test'. Note that (curiously!) not getting 100% success doesn't mean always that the module is not going to work.
  5. Install the module with 'make install' (root privilegies are needed).

Where to find the required modules? First try at perl-modules. If you don't find the module that you need at that place, report it (so we can add it as soon as posible) and try searching in CPAN (the Comprehensive Perl Archive Network).

3. Writting the simulation

If you have successfully installed VNUML parser (and all related needed software) the hard step is over :). The following is to write a text file with the configuration of the simulation, in the VNUML Language Reference.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE vnuml SYSTEM "/var/vnuml/vnuml.dtd">
<vnuml>
  <global>
    <version>1.2</version>
    <simulation_name>tutorial</simulation_name>
    <ssh_key>/root/.ssh/identity.pub</ssh_key>
    <automac/>
    <ip_offset>100</ip_offset>
    <host_mapping/>
  </global>
  <net name="Net0"/>
  <net name="Net1"/>
  <net name="Net2"/>
  <net name="Net3"/>
  <vm name="uml1">
    <filesystem type="cow">/var/vnuml/root_fs_tutorial</filesystem>
    <mem>50M</mem>
    <if id="1" net="Net0">
      <ipv4>10.0.0.1</ipv4>
    </if>
    <route type="inet" gw="10.0.0.3">default</route>
  </vm>
  <vm name="uml2">
    <filesystem type="cow">/var/vnuml/root_fs_tutorial</filesystem>
    <if id="1" net="Net0">
      <ipv4>10.0.0.2</ipv4>
    </if>
    <route type="inet" gw="10.0.0.3">default</route>
  </vm>
  <vm name="uml3">
    <filesystem type="cow">/var/vnuml/root_fs_tutorial</filesystem>
    <if id="1" net="Net0">
      <ipv4>10.0.0.3</ipv4>
    </if>
    <if id="2" net="Net1">
      <ipv4>10.0.1.1</ipv4>
    </if>
    <if id="3" net="Net3">
      <ipv4>10.0.3.1</ipv4>
    </if>
    <route type="inet" gw="10.0.1.2">10.0.2.0/24</route>
    <route type="inet" gw="10.0.3.2">default</route>
    <forwarding type="ip" />
  </vm>
  <vm name="uml4">
    <filesystem type="cow">/var/vnuml/root_fs_tutorial</filesystem>
    <if id="1" net="Net1">
      <ipv4>10.0.1.2</ipv4>
    </if>
    <if id="2" net="Net2">
      <ipv4>10.0.2.1</ipv4>
    </if>
    <route type="inet" gw="10.0.1.1">default</route>
    <forwarding type="ip" />
  </vm>
  <vm name="uml5">
    <filesystem type="cow">/var/vnuml/root_fs_tutorial</filesystem>
    <if id="1" net="Net2">
      <ipv4>10.0.2.2</ipv4>
    </if>
    <route type="inet" gw="10.0.2.1">default</route>
  </vm>
  <host>
    <hostif net="Net3">
      <ipv4>10.0.3.2</ipv4>
    </hostif>
    <route type="inet" gw="10.0.3.1">10.0.0.0/16</route>
  </host>
</vnuml>

Let's call the simulation file tutorial.xml. If you don't want to copy-paste the text above you can download it.

Some notes about this file:

3. 1. Generate SSH key

VNUML parser uses SSH to access and manage the UMLs. To avoid being asked for a password whenever this happens (quite often) you have to generate a public key that is installed automatly in the UMLs by VNUML parser (<ssh_keygen> tag).

To create public key (identity.pub):


ssh-keygen -t rsa1

(You can type an empty passphrase).

Anyway, the first time (and only this) that SSH is used, you have to confirm the server key answering 'yes'.

4. Building simulation

To build the scenario topology switch -t is used:


vnumlparser.pl -t tutorial.xml -o /tmp/boot -v

This command builds the virtual network topology described in tutorial.xml and boots the virtual machines. You will see a lot of output, showing what the parser is exactly doing because -v (verbose) switch is beign used (we recommend always using -v to see if things are going right). With -o switch the boot output of the uml is redirected to /tmp directory (filenames starting with prefix /tmp/boot). Not using -o leads to a more verbose output yet.

The UMLs take a while to be booted (think that a convetional kernel can take a couple of minutes, a set o virtualized ones take quite more), maybe 10-15 minutes (it depends of your hardware). So be patient...

To check the booting of the UML you can use:


ps -aux | grep linux | cut -c 1-100

(The 'cut' filter can be omitted if brief output is not desired)

If you want to see only processes of a given virtual machine:


ps -aux | grep linux | cut -c 1-100 | grep uml_name

where uml_name is the name (attribute name of <vm> tag) of the virtual machine.

If you want to check if a given process is being in execution:


ps -aux | grep linux | cut -c 1-100 | grep process

where process is the name of the process.

4. 1. Check the topology

UML can be accessed through SSH. But note that the sshd have to be running in the UML to do so and this can take a while since booting. Check (each minute or so) this condition with:


ps -aux | grep linux | cut -c 1-100 | grep sshd

You have to see something like that, showing that the sshd is running in each virtual machine:


root     11384  0.0  2.9 42408 15280 pts/2   S    16:06   0:00 linux (uml5) [/usr/sbin/sshd]
root     11436  0.0  3.0 60840 15724 pts/2   S    16:06   0:00 linux (uml1) [/usr/sbin/sshd]
root     11741  0.2  3.0 42408 15496 pts/2   S    16:06   0:00 linux (uml3) [/usr/sbin/sshd]
root     11844  0.1  2.9 42408 15312 pts/2   S    16:06   0:00 linux (uml4) [/usr/sbin/sshd]
root     11919  0.0  2.9 42408 15352 pts/2   S    16:06   0:00 linux (uml2) [/usr/sbin/sshd]

To access to one UML you can use something like that (note that version 1 of the SSH protocol is being used with -1 switch; although SSH v2 also can be used, vnumparser.pl version 1.2.1 only configured automatic authentication for SSH v1):


ssh -1 uml1

This relies in /etc/hosts mapping done with <host_mapping> tag. If you don't have this mapping you have to access through IP (more obscure):


ssh -1 192.168.1.18

To check connectivity you can use ping or traceroute, as shown in the examples below. For example, from uml1 try (you will see a similar trace, if all is going right):


uml1:~ # traceroute -n 10.0.2.2
traceroute to 10.0.2.2 (10.0.2.2), 30 hops max, 38 byte packets
 1  10.0.0.3  1.282 ms  0.726 ms  0.678 ms
 2  10.0.1.2  1.243 ms  1.462 ms  1.010 ms
 3  10.0.2.2  1.396 ms  1.345 ms  1.303 ms
uml1:~ # traceroute -n 10.0.3.2
traceroute to 10.0.3.2 (10.0.3.2), 30 hops max, 38 byte packets
 1  10.0.0.3  1.779 ms  2.572 ms  1.359 ms
 2  10.0.3.2  1.785 ms  1.641 ms  1.744 ms

From uml5 try:


uml5:~ # traceroute -n 10.0.0.1
traceroute to 10.0.0.1 (10.0.0.1), 30 hops max, 38 byte packets
 1  10.0.2.1  0.916 ms  0.743 ms  0.681 ms
 2  10.0.1.1  1.072 ms  1.019 ms  1.009 ms
 3  10.0.0.1  1.420 ms  1.363 ms  1.352 ms
uml5:~ # traceroute -n 10.0.3.2
traceroute to 10.0.3.2 (10.0.3.2), 30 hops max, 38 byte packets
 1  10.0.2.1  1.407 ms  0.857 ms  1.243 ms
 2  10.0.1.1  1.265 ms  1.019 ms  0.980 ms
 3  10.0.3.2  1.545 ms  3.156 ms  2.033 ms

From host try:


host# traceroute -n 10.0.0.1
traceroute to 10.0.0.1 (10.0.0.1), 30 hops max, 40 byte packets
 1  10.0.3.1  0.000 ms   0.000 ms   0.000 ms
 2  10.0.0.1  0.000 ms   0.000 ms   0.000 ms
host# traceroute -n 10.0.2.2
traceroute to 10.0.2.2 (10.0.2.2), 30 hops max, 40 byte packets
 1  10.0.3.1  0.000 ms   0.000 ms   0.000 ms
 2  10.0.1.2  0.000 ms   0.000 ms   0.000 ms
 3  10.0.2.2  0.000 ms   0.000 ms   0.000 ms

5. A simple simulation cycle

Although you can execute almost anything inside the UML through SSH accesing as shown before, the VNUML parser provides a way to automate simulation cycles. A simulation cycle has a start and a stop. The things to do at start or stop time are defined in the VNUML file with <start> and <stop> tags.

To show this functionality in the tutorial we will use hello (/usr/bin/hello in the UML filesystems) in uml1, a quite stupid program whose only function is to output 'hello' word to file /tmp/hello every (about) 10 seconds (is only for test, I suppose you'll use VNUML for more uselful tasks :).

Add <start> and a <stop> statements to the tutorial.xml file in <vm> of uml1 description, as shown following.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE vnuml SYSTEM "/var/vnuml/vnuml.dtd">
<vnuml>
  <global>
    <version>1.2</version>
    <simulation_name>tutorial</simulation_name>
    <ssh_key>/root/.ssh/identity.pub</ssh_key>
    <automac/>
    <ip_offset>100</ip_offset>
    <host_mapping/>
  </global>
  <net name="Net0"/>
  <net name="Net1"/>
  <net name="Net2"/>
  <net name="Net3"/>
  <vm name="uml1">
    <filesystem type="cow">/var/vnuml/root_fs_tutorial</filesystem>
    <mem>50M</mem>
    <if id="1" net="Net0">
      <ipv4>10.0.0.1</ipv4>
    </if>
    <route type="inet" gw="10.0.0.3">default</route>
    <start type="verbatim">nohup /usr/bin/hello &lt;/dev/null &gt;/dev/null 2&gt;&amp;1 &amp;</start>
    <stop type="verbatim">killall hello</stop>
  </vm>
  <vm name="uml2">
    <filesystem type="cow">/var/vnuml/root_fs_tutorial</filesystem>
    <if id="1" net="Net0">
      <ipv4>10.0.0.2</ipv4>
    </if>
    <route type="inet" gw="10.0.0.3">default</route>
  </vm>
  <vm name="uml3">
    <filesystem type="cow">/var/vnuml/root_fs_tutorial</filesystem>
    <if id="1" net="Net0">
      <ipv4>10.0.0.3</ipv4>
    </if>
    <if id="2" net="Net1">
      <ipv4>10.0.1.1</ipv4>
    </if>
    <if id="3" net="Net3">
      <ipv4>10.0.3.1</ipv4>
    </if>
    <route type="inet" gw="10.0.1.2">10.0.2.0/24</route>
    <route type="inet" gw="10.0.3.2">default</route>
    <forwarding type="ip" />
  </vm>
  <vm name="uml4">
    <filesystem type="cow">/var/vnuml/root_fs_tutorial</filesystem>
    <if id="1" net="Net1">
      <ipv4>10.0.1.2</ipv4>
    </if>
    <if id="2" net="Net2">
      <ipv4>10.0.2.1</ipv4>
    </if>
    <route type="inet" gw="10.0.1.1">default</route>
    <forwarding type="ip" />
  </vm>
  <vm name="uml5">
    <filesystem type="cow">/var/vnuml/root_fs_tutorial</filesystem>
    <if id="1" net="Net2">
      <ipv4>10.0.2.2</ipv4>
    </if>
    <route type="inet" gw="10.0.2.1">default</route>
  </vm>
  <host>
    <hostif net="Net3">
      <ipv4>10.0.3.2</ipv4>
    </hostif>
    <route type="inet" gw="10.0.3.1">10.0.0.0/16</route>
  </host>
</vnuml>

You can download this new tutorial.xml. Note the following line:


<start type="verbatim">nohup /usr/bin/hello &lt;/dev/null &gt;/dev/null 2&gt;&amp;1 &amp;</start>

Too cryptic? It's due to <,> and & characters have to be escaped in XML files. The actual command is as follows:


nohup /usr/bin/hello </dev/null >/dev/null 2>&1 &

(Why don't simply use 'nohup /usr/bin/hello &'? There are ssh related problems that force to redirect input and output, look at VNUML User Manual for details).

Start the simulation. Note that the process is much shorter than topology building (mode -t).


vnumlparser.pl -s new_tutorial.xml -v

Access to uml1 (remember, 'ssh -1 uml1') and check the existence and growing of /tmp/hello file. The hello daemon is working.

uml1:~ # tail -f /tmp/hello
Hello! Current date: Thu Jul 10 09:53:52 EDT 2003
Hello! Current date: Thu Jul 10 09:54:02 EDT 2003
Hello! Current date: Thu Jul 10 09:54:13 EDT 2003
Hello! Current date: Thu Jul 10 09:54:24 EDT 2003
Hello! Current date: Thu Jul 10 09:54:35 EDT 2003

In a similar way the simulation can be stopped. To do so, use -p switch of VNUML parser. This will kill hello daemon.


vnumlparser.pl -p new_tutorial.xml -v

Access again to uml1 and check that hello daemon is not working now ('ps -aux | grep hello' for example) and that /tmp/hello file has stopped growing.

6. Destroying simulation

When you have finished playing around with the topology, you should destroy it in polite way, using -d switch of VNUML parser.


vnumlparser.pl -d new_tutorial.xml -v

After waiting a while (think that a convetional kernel can take a couple of minutes to halt, a set o virtualized ones take quite more), the topology is destroyed.

After destroying the topology in such way, you can recreate it with -t. Note that destroying a topology doesn't mean destroying the filesystems: any change perform on them remains after -d until next -t (for example, the data in the /tmp/hello file).

You also can destroy a topology using unpolite ways, as 'killall linux' (some process ignore SIGTERM signal and do not stop using killall, identify remaining process with 'ps -aux | grep linux' and kill -9 them) but it should be used only as a last resort measure (when -d switch fails), because 1) aditional resources (as virtual briges, TUN/TAP devices, etc.) would not be deleted and would remain in the host operating system until removed manually or host is rebooted, 2) UML filesystem may be corrupted and not boot properly next -t. See VNUML User Manual for details when -d mode fails.

7. Further reading

This tutorial doesn't show all features of VNUML parser. Concurrent simulation execution, filetree copying, VLAN integration, etc. and more capabilities are availables. To know about them and know all VNUML possibilies you should next read VNUML User Manual and VNUML Language Reference. If you need to hack vnumparser.pl to adapt it to your needs, you should read the source code (I think it's very clear! :). A VNUML Developers Manual could be resealed in the future.

Appendix: Execution logs

The following logs were taken performing this tutorial at kastrup, a SuSE 8.2 system, using verbose switch (-v) of vnumlparser.pl. May be useful as reference.

kastrup:~ # vnumlparser.pl -t tutorial.xml -o /tmp/boot.uml -v
host> touch /var/vnuml/LOCK
host> touch /var/vnuml/tutorial/lock
host> echo >> /etc/hosts
host> echo \# virtual machine names added by vnumlparser.pl 1.2.1 at Tue Sep  2 21:44:09 CEST 2003 >> /etc
/hosts
host> modprobe tun
host> tunctl -t uml1-eth0
Set 'uml1-eth0' persistent and owned by uid 0
host> tunctl -t uml1-eth1
Set 'uml1-eth1' persistent and owned by uid 0
host> ifconfig uml1-eth1 0.0.0.0 promisc up
host> tunctl -t uml2-eth0
Set 'uml2-eth0' persistent and owned by uid 0
host> tunctl -t uml2-eth1
Set 'uml2-eth1' persistent and owned by uid 0
host> ifconfig uml2-eth1 0.0.0.0 promisc up
host> tunctl -t uml3-eth0
Set 'uml3-eth0' persistent and owned by uid 0
host> tunctl -t uml3-eth1
Set 'uml3-eth1' persistent and owned by uid 0
host> ifconfig uml3-eth1 0.0.0.0 promisc up
host> tunctl -t uml3-eth2
Set 'uml3-eth2' persistent and owned by uid 0
host> ifconfig uml3-eth2 0.0.0.0 promisc up
host> tunctl -t uml3-eth3
Set 'uml3-eth3' persistent and owned by uid 0
host> ifconfig uml3-eth3 0.0.0.0 promisc up
host> tunctl -t uml4-eth0
Set 'uml4-eth0' persistent and owned by uid 0
host> tunctl -t uml4-eth1
Set 'uml4-eth1' persistent and owned by uid 0
host> ifconfig uml4-eth1 0.0.0.0 promisc up
host> tunctl -t uml4-eth2
Set 'uml4-eth2' persistent and owned by uid 0
host> ifconfig uml4-eth2 0.0.0.0 promisc up
host> tunctl -t uml5-eth0
Set 'uml5-eth0' persistent and owned by uid 0
host> tunctl -t uml5-eth1
Set 'uml5-eth1' persistent and owned by uid 0
host> ifconfig uml5-eth1 0.0.0.0 promisc up
host> brctl addbr Net0
host> brctl stp Net0 off
host> ifconfig Net0 0.0.0.0 promisc up
host> brctl addbr Net1
host> brctl stp Net1 off
host> ifconfig Net1 0.0.0.0 promisc up
host> brctl addbr Net2
host> brctl stp Net2 off
host> ifconfig Net2 0.0.0.0 promisc up
host> brctl addbr Net3
host> brctl stp Net3 off
host> ifconfig Net3 0.0.0.0 promisc up
host> ifconfig Net3  10.0.3.2 netmask 255.255.255.0
host> route -A inet add -net 10.0.0.0/16 gw 10.0.3.1
host> brctl addif Net0 uml1-eth1
host> brctl addif Net0 uml2-eth1
host> brctl addif Net0 uml3-eth1
host> brctl addif Net1 uml3-eth2
host> brctl addif Net3 uml3-eth3
host> brctl addif Net1 uml4-eth1
host> brctl addif Net2 uml4-eth2
host> brctl addif Net2 uml5-eth1
host> dd if=/dev/zero of=/var/vnuml/tutorial/uml1_opt_fs count=1 bs=1M
1+0 records in
1+0 records out
host> mke2fs -F /var/vnuml/tutorial/uml1_opt_fs
mke2fs 1.28 (31-Aug-2002)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
128 inodes, 1024 blocks
51 blocks (4.98%) reserved for the super user
First data block=1
1 block group
8192 blocks per group, 8192 fragments per group
128 inodes per group

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 33 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
host> mount /var/vnuml/tutorial/uml1_opt_fs /mnt/uml -o loop
host> cat /root/.ssh/identity.pub >> /mnt/uml/authorized_keys
uml1> #!/bin/bash
uml1> # UML boot file generated by vnumlparser.pl at Tue Sep  2 21:44:12 CEST 2003
uml1> hostname uml1
uml1> ifconfig eth0 192.168.1.18 netmask 255.255.255.252 up
uml1> echo 192.168.1.18 uml1 >> /etc/hosts
uml1> ifconfig eth1 0.0.0.0 promisc up
uml1> ifconfig eth1  10.0.0.1 netmask 255.255.255.0
uml1> route -A inet add default gw 10.0.0.3
host> ifconfig uml1-eth0 192.168.1.17 netmask 255.255.255.252 up
host> chmod a+x /mnt/uml/umlboot
host> umount /mnt/uml
host> sleep 5s
host> dd if=/dev/zero of=/var/vnuml/tutorial/uml2_opt_fs count=1 bs=1M
1+0 records in
1+0 records out
host> mke2fs -F /var/vnuml/tutorial/uml2_opt_fs
mke2fs 1.28 (31-Aug-2002)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
128 inodes, 1024 blocks
51 blocks (4.98%) reserved for the super user
First data block=1
1 block group
8192 blocks per group, 8192 fragments per group
128 inodes per group

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
host> mount /var/vnuml/tutorial/uml2_opt_fs /mnt/uml -o loop
host> cat /root/.ssh/identity.pub >> /mnt/uml/authorized_keys
uml2> #!/bin/bash
uml2> # UML boot file generated by vnumlparser.pl at Tue Sep  2 21:44:17 CEST 2003
uml2> hostname uml2
uml2> ifconfig eth0 192.168.1.22 netmask 255.255.255.252 up
uml2> echo 192.168.1.22 uml2 >> /etc/hosts
uml2> ifconfig eth1 0.0.0.0 promisc up
uml2> ifconfig eth1  10.0.0.2 netmask 255.255.255.0
uml2> route -A inet add default gw 10.0.0.3
host> ifconfig uml2-eth0 192.168.1.21 netmask 255.255.255.252 up
host> chmod a+x /mnt/uml/umlboot
host> umount /mnt/uml
host> sleep 5s
host> dd if=/dev/zero of=/var/vnuml/tutorial/uml3_opt_fs count=1 bs=1M
1+0 records in
1+0 records out
host> mke2fs -F /var/vnuml/tutorial/uml3_opt_fs
mke2fs 1.28 (31-Aug-2002)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
128 inodes, 1024 blocks
51 blocks (4.98%) reserved for the super user
First data block=1
1 block group
8192 blocks per group, 8192 fragments per group
128 inodes per group

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
host> mount /var/vnuml/tutorial/uml3_opt_fs /mnt/uml -o loop
host> cat /root/.ssh/identity.pub >> /mnt/uml/authorized_keys
uml3> #!/bin/bash
uml3> # UML boot file generated by vnumlparser.pl at Tue Sep  2 21:44:22 CEST 2003
uml3> hostname uml3
uml3> ifconfig eth0 192.168.1.26 netmask 255.255.255.252 up
uml3> echo 192.168.1.26 uml3 >> /etc/hosts
uml3> ifconfig eth1 0.0.0.0 promisc up
uml3> ifconfig eth1  10.0.0.3 netmask 255.255.255.0
uml3> ifconfig eth2 0.0.0.0 promisc up
uml3> ifconfig eth2  10.0.1.1 netmask 255.255.255.0
uml3> ifconfig eth3 0.0.0.0 promisc up
uml3> ifconfig eth3  10.0.3.1 netmask 255.255.255.0
uml3> route -A inet add -net 10.0.2.0/24 gw 10.0.1.2
uml3> route -A inet add default gw 10.0.3.2
uml3> echo 1 > /proc/sys/net/ipv4/ip_forward
uml3> echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
host> ifconfig uml3-eth0 192.168.1.25 netmask 255.255.255.252 up
host> chmod a+x /mnt/uml/umlboot
host> umount /mnt/uml
host> sleep 5s
host> dd if=/dev/zero of=/var/vnuml/tutorial/uml4_opt_fs count=1 bs=1M
1+0 records in
1+0 records out
host> mke2fs -F /var/vnuml/tutorial/uml4_opt_fs
mke2fs 1.28 (31-Aug-2002)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
128 inodes, 1024 blocks
51 blocks (4.98%) reserved for the super user
First data block=1
1 block group
8192 blocks per group, 8192 fragments per group
128 inodes per group

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
host> mount /var/vnuml/tutorial/uml4_opt_fs /mnt/uml -o loop
host> cat /root/.ssh/identity.pub >> /mnt/uml/authorized_keys
uml4> #!/bin/bash
uml4> # UML boot file generated by vnumlparser.pl at Tue Sep  2 21:44:28 CEST 2003
uml4> hostname uml4
uml4> ifconfig eth0 192.168.1.30 netmask 255.255.255.252 up
uml4> echo 192.168.1.30 uml4 >> /etc/hosts
uml4> ifconfig eth1 0.0.0.0 promisc up
uml4> ifconfig eth1  10.0.1.2 netmask 255.255.255.0
uml4> ifconfig eth2 0.0.0.0 promisc up
uml4> ifconfig eth2  10.0.2.1 netmask 255.255.255.0
uml4> route -A inet add default gw 10.0.1.1
uml4> echo 1 > /proc/sys/net/ipv4/ip_forward
uml4> echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
host> ifconfig uml4-eth0 192.168.1.29 netmask 255.255.255.252 up
host> chmod a+x /mnt/uml/umlboot
host> umount /mnt/uml
host> sleep 5s
host> dd if=/dev/zero of=/var/vnuml/tutorial/uml5_opt_fs count=1 bs=1M
1+0 records in
1+0 records out
host> mke2fs -F /var/vnuml/tutorial/uml5_opt_fs
mke2fs 1.28 (31-Aug-2002)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
128 inodes, 1024 blocks
51 blocks (4.98%) reserved for the super user
First data block=1
1 block group
8192 blocks per group, 8192 fragments per group
128 inodes per group

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
host> mount /var/vnuml/tutorial/uml5_opt_fs /mnt/uml -o loop
host> cat /root/.ssh/identity.pub >> /mnt/uml/authorized_keys
uml5> #!/bin/bash
uml5> # UML boot file generated by vnumlparser.pl at Tue Sep  2 21:44:33 CEST 2003
uml5> hostname uml5
uml5> ifconfig eth0 192.168.1.34 netmask 255.255.255.252 up
uml5> echo 192.168.1.34 uml5 >> /etc/hosts
uml5> ifconfig eth1 0.0.0.0 promisc up
uml5> ifconfig eth1  10.0.2.2 netmask 255.255.255.0
uml5> route -A inet add default gw 10.0.2.1
host> ifconfig uml5-eth0 192.168.1.33 netmask 255.255.255.252 up
host> chmod a+x /mnt/uml/umlboot
host> umount /mnt/uml
host> sleep 5s
host> linux ubd0=/var/vnuml/tutorial/uml1_cow_fs ubd1=/var/vnuml/tutorial/uml1_opt_fs mem=50M eth0=tuntap,uml1-eth0 eth1=tuntap,uml1-eth1,fe:fd:0:0:1:1 uml_dir=/var/vnuml/tutorial/ umid=uml1 con=null &> /tmp/boot.uml.uml1 &
host> linux ubd0=/var/vnuml/tutorial/uml2_cow_fs ubd1=/var/vnuml/tutorial/uml2_opt_fs eth0=tuntap,uml2-eth0 eth1=tuntap,uml2-eth1,fe:fd:0:0:2:1 uml_dir=/var/vnuml/tutorial/ umid=uml2 con=null &> /tmp/boot.uml.uml2 &
host> linux ubd0=/var/vnuml/tutorial/uml3_cow_fs ubd1=/var/vnuml/tutorial/uml3_opt_fs eth0=tuntap,uml3-eth0 eth1=tuntap,uml3-eth1,fe:fd:0:0:3:1 eth2=tuntap,uml3-eth2,fe:fd:0:0:3:2 eth3=tuntap,uml3-eth3,fe:fd:0:0:3:3 uml_dir=/var/vnuml/tutorial/ umid=uml3 con=null &> /tmp/boot.uml.uml3 &
host> linux ubd0=/var/vnuml/tutorial/uml4_cow_fs ubd1=/var/vnuml/tutorial/uml4_opt_fs eth0=tuntap,uml4-eth0 eth1=tuntap,uml4-eth1,fe:fd:0:0:4:1 eth2=tuntap,uml4-eth2,fe:fd:0:0:4:2 uml_dir=/var/vnuml/tutorial/ umid=uml4 con=null &> /tmp/boot.uml.uml4 &
host> linux ubd0=/var/vnuml/tutorial/uml5_cow_fs ubd1=/var/vnuml/tutorial/uml5_opt_fs eth0=tuntap,uml5-eth0 eth1=tuntap,uml5-eth1,fe:fd:0:0:5:1 uml_dir=/var/vnuml/tutorial/ umid=uml5 con=null &> /tmp/boot.uml.uml5 &
host> rm /var/vnuml/LOCK

(6 minutes later)

kastrup:~ # vnumlparser.pl -s new_tutorial.xml -v
host> touch /var/vnuml/LOCK
Bad syntax, perhaps a bogus '-'?
uml1> #!/bin/bash
uml1> # UML start commands file generated by vnumlparser.pl 1.2.1 at Tue Sep  2 21:51:24 CEST 2003
uml1> nohup /usr/bin/hello </dev/null >/dev/null 2>&1 &
host> chmod a+x /tmp/vnuml.uml1.start
uml2> #!/bin/bash
uml2> # UML start commands file generated by vnumlparser.pl 1.2.1 at Tue Sep  2 21:51:24 CEST 2003
host> chmod a+x /tmp/vnuml.uml2.start
uml3> #!/bin/bash
uml3> # UML start commands file generated by vnumlparser.pl 1.2.1 at Tue Sep  2 21:51:24 CEST 2003
host> chmod a+x /tmp/vnuml.uml3.start
uml4> #!/bin/bash
uml4> # UML start commands file generated by vnumlparser.pl 1.2.1 at Tue Sep  2 21:51:24 CEST 2003
host> chmod a+x /tmp/vnuml.uml4.start
uml5> #!/bin/bash
uml5> # UML start commands file generated by vnumlparser.pl 1.2.1 at Tue Sep  2 21:51:24 CEST 2003
host> chmod a+x /tmp/vnuml.uml5.start
host> ssh -x -1 -l root 192.168.1.18 rm -f /root/vnuml.uml1.start &> /dev/null
host> scp -q -oProtocol=1 /tmp/vnuml.uml1.start root@192.168.1.18:/root
host> ssh -x -1 -l root 192.168.1.22 rm -f /root/vnuml.uml2.start &> /dev/null
host> scp -q -oProtocol=1 /tmp/vnuml.uml2.start root@192.168.1.22:/root
host> ssh -x -1 -l root 192.168.1.26 rm -f /root/vnuml.uml3.start &> /dev/null
host> scp -q -oProtocol=1 /tmp/vnuml.uml3.start root@192.168.1.26:/root
host> ssh -x -1 -l root 192.168.1.30 rm -f /root/vnuml.uml4.start &> /dev/null
host> scp -q -oProtocol=1 /tmp/vnuml.uml4.start root@192.168.1.30:/root
host> ssh -x -1 -l root 192.168.1.34 rm -f /root/vnuml.uml5.start &> /dev/null
host> scp -q -oProtocol=1 /tmp/vnuml.uml5.start root@192.168.1.34:/root
host> ssh -x -1 -l root 192.168.1.18 /root/vnuml.uml1.start
host> ssh -x -1 -l root 192.168.1.22 /root/vnuml.uml2.start
host> ssh -x -1 -l root 192.168.1.26 /root/vnuml.uml3.start
host> ssh -x -1 -l root 192.168.1.30 /root/vnuml.uml4.start
host> ssh -x -1 -l root 192.168.1.34 /root/vnuml.uml5.start
host> rm /var/vnuml/LOCK


kastrup:~ # vnumlparser.pl -p new_tutorial.xml -v
host> touch /var/vnuml/LOCK
Bad syntax, perhaps a bogus '-'?
uml1> #!/bin/bash
uml1> # UML stop commands file generated by vnumlparser.pl 1.2.1 at Tue Sep  2 21:52:32 CEST 2003
uml1> killall hello
host> chmod a+x /tmp/vnuml.uml1.stop
uml2> #!/bin/bash
uml2> # UML stop commands file generated by vnumlparser.pl 1.2.1 at Tue Sep  2 21:52:32 CEST 2003
host> chmod a+x /tmp/vnuml.uml2.stop
uml3> #!/bin/bash
uml3> # UML stop commands file generated by vnumlparser.pl 1.2.1 at Tue Sep  2 21:52:32 CEST 2003
host> chmod a+x /tmp/vnuml.uml3.stop
uml4> #!/bin/bash
uml4> # UML stop commands file generated by vnumlparser.pl 1.2.1 at Tue Sep  2 21:52:32 CEST 2003
host> chmod a+x /tmp/vnuml.uml4.stop
uml5> #!/bin/bash
uml5> # UML stop commands file generated by vnumlparser.pl 1.2.1 at Tue Sep  2 21:52:32 CEST 2003
host> chmod a+x /tmp/vnuml.uml5.stop
host> ssh -x -1 -l root 192.168.1.18 rm -f /root/vnuml.uml1.stop &> /dev/null
host> scp -q -oProtocol=1 /tmp/vnuml.uml1.stop root@192.168.1.18:/root
host> ssh -x -1 -l root 192.168.1.22 rm -f /root/vnuml.uml2.stop &> /dev/null
host> scp -q -oProtocol=1 /tmp/vnuml.uml2.stop root@192.168.1.22:/root
host> ssh -x -1 -l root 192.168.1.26 rm -f /root/vnuml.uml3.stop &> /dev/null
host> scp -q -oProtocol=1 /tmp/vnuml.uml3.stop root@192.168.1.26:/root
host> ssh -x -1 -l root 192.168.1.30 rm -f /root/vnuml.uml4.stop &> /dev/null
host> scp -q -oProtocol=1 /tmp/vnuml.uml4.stop root@192.168.1.30:/root
host> ssh -x -1 -l root 192.168.1.34 rm -f /root/vnuml.uml5.stop &> /dev/null
host> scp -q -oProtocol=1 /tmp/vnuml.uml5.stop root@192.168.1.34:/root
host> ssh -x -1 -l root 192.168.1.18 /root/vnuml.uml1.stop
host> ssh -x -1 -l root 192.168.1.22 /root/vnuml.uml2.stop
host> ssh -x -1 -l root 192.168.1.26 /root/vnuml.uml3.stop
host> ssh -x -1 -l root 192.168.1.30 /root/vnuml.uml4.stop
host> ssh -x -1 -l root 192.168.1.34 /root/vnuml.uml5.stop
host> rm /var/vnuml/LOCK

kastrup:~ # vnumlparser.pl -d new_tutorial.xml -v
host> touch /var/vnuml/LOCK
Bad syntax, perhaps a bogus '-'?
host> route -A inet del -net 10.0.0.0/16 gw 10.0.3.1
host> ssh -x -1 -l root 192.168.1.18 halt
host> ssh -x -1 -l root 192.168.1.22 halt
host> ssh -x -1 -l root 192.168.1.26 halt
host> ssh -x -1 -l root 192.168.1.30 halt
host> ssh -x -1 -l root 192.168.1.34 halt
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (0 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (5 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (10 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (15 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (20 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (25 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (30 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (35 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (40 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (45 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (50 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (55 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (60 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (65 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (70 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (75 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (80 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (85 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (90 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (95 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (100 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (105 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (110 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (115 s) ----------
Bad syntax, perhaps a bogus '-'?
---------- Waiting until UML extinction (120 s) ----------
Bad syntax, perhaps a bogus '-'?
host> ifconfig uml1-eth0 down
host> tunctl -d uml1-eth0
Set 'uml1-eth0' nonpersistent
host> ifconfig uml1-eth1 down
host> tunctl -d uml1-eth1
Set 'uml1-eth1' nonpersistent
host> ifconfig uml2-eth0 down
host> tunctl -d uml2-eth0
Set 'uml2-eth0' nonpersistent
host> ifconfig uml2-eth1 down
host> tunctl -d uml2-eth1
Set 'uml2-eth1' nonpersistent
host> ifconfig uml3-eth0 down
host> tunctl -d uml3-eth0
Set 'uml3-eth0' nonpersistent
host> ifconfig uml3-eth1 down
host> tunctl -d uml3-eth1
Set 'uml3-eth1' nonpersistent
host> ifconfig uml3-eth2 down
host> tunctl -d uml3-eth2
Set 'uml3-eth2' nonpersistent
host> ifconfig uml3-eth3 down
host> tunctl -d uml3-eth3
Set 'uml3-eth3' nonpersistent
host> ifconfig uml4-eth0 down
host> tunctl -d uml4-eth0
Set 'uml4-eth0' nonpersistent
host> ifconfig uml4-eth1 down
host> tunctl -d uml4-eth1
Set 'uml4-eth1' nonpersistent
host> ifconfig uml4-eth2 down
host> tunctl -d uml4-eth2
Set 'uml4-eth2' nonpersistent
host> ifconfig uml5-eth0 down
host> tunctl -d uml5-eth0
Set 'uml5-eth0' nonpersistent
host> ifconfig uml5-eth1 down
host> tunctl -d uml5-eth1
Set 'uml5-eth1' nonpersistent
host> ifconfig Net0 down
host> brctl delbr Net0
host> ifconfig Net1 down
host> brctl delbr Net1
host> ifconfig Net2 down
host> brctl delbr Net2
host> ifconfig Net3 down
host> brctl delbr Net3
host> rm /var/vnuml/tutorial/lock
host> rm /var/vnuml/LOCK

Last update:
[Home]