SBUML -ScrapBook for User-Mode Linux-
    »  About
    »  HowTo
       »  Quick Demo: Basics
       »  Quick Demo: Web Page Snapshots
       »  Quick Demo: Punt&Catch
       »  Quick Demo: Networking
    »  Techniques
    »  Reference
    »  FAQ
    »  Miscellaneous
    »  Contact
»  Site Map

Quick Demo: Punt&Catch
Note: Before trying this demo, you should be sure to try Quick Demo: Basics first to install SBUML and make sure it works on your machine.

If you have SBUML installed on two physical host machines, you can demonstate simple Linux machine migration using the sbumlpunt and sbumlcatch commands. Both machines must be able to establish a socket at port 5050 that can be seen by the other machines. Therefore there should not be any routers using NAT between the two machines. Also, no firewalls should be blocking port 5050.

Let's say the IP address on host A is a1.a2.a3.a4, and the address on host B is b1.b2.b3.b4.

Step 1: Set up Host B

Starting with host B, issue the sbumlcatch in its own xterm:

[(sbumldemo subshell) sbumldemo]$ xterm -e sbumlcatch 30 a1.a2.a3.a4 &

This command will catch any UML machines punted to it. Then after 30 seconds, it will punt the same machine to host A.

Step 2: Set up Host A

Now start the sbumlcatch command on host A:

[(sbumldemo subshell) sbumldemo]$ xterm -e sbumlcatch 30 b1.b2.b3.b4 &

Step 3: Do the initial punt from host A

Now on host A, start a UML either by booting a new one or restoring a snapshot. If you have done the demo at Web Page Snapshots, then clicking on this LINK to restore the test snapshot on that page should do nicely, since it only has about 10MB of state.

And finally do the initial punt:

[(sbumldemo subshell) sbumldemo]$ sbumlpunt m1 b1.b2.b3.b4

Since you can use any IP address for the second parameter for sbumlcatch, it is easy to have the UML virtual machine wonder around the room to any number of machines, or even around the world for that matter.

Or on the other end of the scale, if you want to do the same demo on just one host machine, you can enter this sequence:

[(sbumldemo subshell) sbumldemo]$ xterm -e bash -c "while true ; do sbumlcatch 15 localhost ; done" &
[(sbumldemo subshell) sbumldemo]$ xterm -e bash -c "while true ; do sbumlcatch 15 localhost ; done" &
[(sbumldemo subshell) sbumldemo]$ sbumlpunt m1 localhost

(The while true part is needed because the two sbumlcatches will be competing for the same port.)

 Printable Version