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



Quick Demo: Basics
Download and Initialization
  1. First download the most recent sbuml-core-* file from the SourceForge download page: SBUML Core Package

  2. Extract the contents of this file with tar:
    $ tar xzvf sbuml-core-2423-2um-1sb-060904b.tar.gz

  3. Change into the sbumldemo directory:
    $ cd sbumldemo

  4. Initialize SBUML:
    $ ./sbumlinitdemo


Booting, Hibernation, & Resuming
Note: If there is any problem during any of the demos, issuing the sbuml--kill-all-xterm-linux command will kill all SBUML/UML related processes and clean out all the SBUML machine state. Usually, this command is unnecessary.
  1. Boot a new machine:
    [(sbumldemo subshell) sbumldemo]$ sbumlboot m1

  2. Toms filesystem should boot within 10 seconds or so and show the login prompt.

  3. Hibernate the machine:
    [(sbumldemo subshell) sbumldemo]$ sbumlhibernate m1

  4. Resume the machine from hibernation:
    [(sbumldemo subshell) sbumldemo]$ sbumlresume m1

  5. Press return and the resumed machine should display another login prompt.

Saving and Restoring Snapshots
  1. Login the machine with user name root and password root.

  2. Create a new file in the machine:
    # echo This is a test >new-file

  3. Save a snapshot and give it the name snap1:
    [(sbumldemo subshell) sbumldemo]$ sbumlsave m1 snap1 -f -c
  4. (-f means freeze the machine before saving, -c means continue execution after saving)

  5. Restore the snapshot to a new machine m2:
    [(sbumldemo subshell) sbumldemo]$ sbumlrestore m2 snap1 -c

  6. Check to see if the new machine contains the same state:
    # cat new-file


Removing and Halting Machines

  1. Remove m2 and all of its state:
    [(sbumldemo subshell) sbumldemo]$ sbumlremove m2

  2. Halt m1, keeping its disk state:
    # halt
    Note: init 0 will work too, as will shutdown -h, but reboot and shutdown -r will not.

  3. Reboot m1:
    [(sbumldemo subshell) sbumldemo]$ sbumlreboot m1

  4. Check to see if the rebooted machine contains the same state:
    # cat new-file


Uninstalling SBUML (optional!)
  1. Just exit the subshell and remove the whole directory subtree:
    [(sbumldemo subshell) sbumldemo]$ exit
    $ cd ..
    $ rm sbumldemo -fr



 Printable Version