Quick Demo: Web Page Snapshots

Introduction
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.

Web Page Snapshots allow users to post fully configured pre-booted Linux machines on websites. Visitors to the websites can then download and restore the machines with only one mouse click. This page shows how to setup the web browser helper application for Web Page Snapshot, and then steps through a couple very simple examples. More interesting examples can be found on the Web Page Snapshots page, but these require that the rh72c base distribution be installed. The simple examples on this page can work with only the toms base distribution installed.

Also, see this paper(pdf) from VM04 for more information.

Helper Application Installation for Mozilla
These instructions are for Mozilla, however the same helper application will work for Konqueror and probably other web browsers.
  1. In Mozilla, select Preferences from the edit menu.

  2. Select Helper Applications, which is under the Navigator item.

  3. Click on the New Type... button and fill in the dialog box with the information as shown here:

    Mozilla Preference Screenshot (click on the figure to enlarge)

    The application to use should be filled out with a full path to the sbuml--mozilla-helper-application script, which is located in the scripts directory of the sbumldemo installation.
A Couple Test Snapshots

Now if you click on the following image, after an automatic download of a 6.3MB snapshot, a running Linux environment will be restore that has 9MB of virtual RAM and has been booted from a 14.5MB block device that has Tom's filesystem installed. In addition, so that there will be at least something to watch, the following shell script is already running:

while sleep 1 ; do echo This test snapshot is now running on $(date); done

If SBUML is installed, clicking here will restore this full Linux runtime state
Test1 (6.3MB delta from Toms)
: Just a script outputting the date every second.



The next snapshot requires a much smaller download because it has been delta compressed relative to the previous snapshot. To uncompress the snapshot, SBUML uses xdelta ( http://sourceforge.net/projects/xdelta/ ), which is included in many standard Linux installations. The snapshot is running Emacs, which will appear if you type ^L after the snapshot has finished downloading and restoring.

If SBUML is installed, clicking here will restore this full Linux runtime state
Emacs (90,036 byte delta from Test1/Toms)
: Chet's Emacs.



About the SBUML Mozilla Helper Application xterm

When you click on a snapshot, an xterm window opens and is used for various purposes:
  1. It shows progress searching for, downloading, delta expansion and restoring the snapshot. Yes, this feedback needs to be improved.

  2. If there are problems error messages will appear here. Note that SBUML uses the curl (http://curl.haxx.se/) for downloading, so it must be installed on the host.

  3. If during delta expansion the snapshot against which the delta compression was done also needs to be delta expanded, then a prompt will appear, to which 'y' is almost always the best answer. This will probably be removed in the next release of SBUML.

  4. After the snapshot is restored a prompt will appear in the xterm. It can be used to issue SBUML commands like sbumlsave, sbumlhibernate, etc.

  5. Finally, closing the window automatically removes the state of the machine that was created from the snapshot.


Note that the kernel binary is contained inside the snapshot and will be running directly on the host. Even though it runs entirely in user mode, which adds at least provides more security than rpms, it is a good idea to only run snapshots from trusted sources.