Virtual Systems
* What is a virtual system?
A virtual system is where the entire filesystem of one system
is mounted under a directory on another in such a way that processes
may be run on the host system exactly as if they were actually
running on the remote system. This has uses, for instance to compile
using a different system or to off load CPU intensive jobs to other
machines. Using virtual systems with Linux means you can off load
many tasks from your existing SCO/ISC/SVR4/Wyse/etc. systems with
minimal effort.
* Installing the programs.
Create directories /OS and /OS/bin, copy the vsys script to /OS/bin,
compile bin.c to /OS/bin/bin and make it setuid root.
* Creating a virtual system.
Firstly you must ensure the relevant filesystems of the remote
system are exported to you. You require access to the root filesystem
but do not require write access to it as /tmp /usr/tmp will be on
the local machine (this is necesary because SYSV unlinks temporary
files immediately after creation and this is incompatible with NFS).
Consider carefully which filesystems require write access, which
contain needed setuid programs etc.
Create the virtual system using:
# /OS/bin/vsys -c system
where system is the hostname of the remote system. This creates
the virtual system under /OS, mounts filesystems and links
/OS/bin/bin to /OS/bin/system. You can now run commands under
the virtual environment and run virtual login sessions in the
virtual environment. For instance to compile a program using the
remote development system you could use:
# /OS/bin/system cc myprog.c
or to create a virtual login session and work on the remote
filesystem as if you were actually logged in to the remote machine
you could use:
# /OS/bin/system -sh
* Aliases for virtual systems
Aliases provide useful alternatives to the actual system name used
to create a virtual system. Simply use:
# /OS/bin/vsys -a alias system
to establish an alias for a system. You can then access the virtual
environment of system using /OS/bin/alias as well as /OS/bin/system.
* Destroying a virtual system
A virtual system can be removed using:
# /OS/bin/vsys -d system
This unmounts the filesystems and removes the directory structure
from /OS. This takes some care to avoid recursively deleting the
remote filesystems but may not be perfect... Read the script and
convince yourself - IT COULD POSSIBLY WIPE OUT THE REMOTE SYSTEM!