Getting started

From Virtualsquare
Jump to: navigation, search

Contents

System requirements


NOTES

  1. Tools like VDE have been ported successfully to other hardware and software architectures. VDE is currently supported and distributed by Debian GNU/Linux, Gentoo, FreeBSD and Mac OS X. It is also possible to run VDE under GNU/Linux ports for other hardware architectures like ARM, MIPS, MIPSEL, SPARC, HPPA and others.
  2. Links to other libraries needed to compile and run umview reference to software homepage or descrition. They can be found already packaged in most GNU/Linux distributions.

Installing Virtual Square Tools

From precompiled Debian packets

Virtual Square libraries and tools are available as precompiled and pre-packaged binaries under Debian Debian GNU/Linux 4.0 unstable (SID). To get them installed you'll need to run the following commands with root priviledges:

For VDE:

# apt-get install vde2

For UMVIEW:

# apt-get install umview umview-mod-umfuseiso9660 umview-mod-umfuseext2 umview-mod-umlwip umview-mod-umdevtap

From source code

Source code of Virtual Square tools is available via downloadable tarballs or by checking them out from SVN access to the source tree. It may be a better choice to get source code directly from SVN since tarballs on project site are often outdated. SVN takes you to the bleeding edge of the code development, but sometimes the downloaded code can be less stable.

Older tarballs for View-OS, LWIPv6 and purelibc are still available via the Savannah website:

New releases will be made available on SourceForge:

VDE is available on the SourceForge project page:

Install development tools and files

Install common development tools:

# apt-get install gcc g++ make
# apt-get install autoconf automake libtool
# apt-get install cvs 
# apt-get install patch
# apt-get install subversion
# apt-get install linux-libc-dev libcap-dev libglib2.0-dev

Install libraries for UMView:

# apt-get install libiso9660-4 libiso9660-dev libfuse2 libfuse-dev e2fslibs

Install libraries for LwIPv6:

# apt-get install libpcap-dev

Install network configuration tools for LwIPv6:

# apt-get install iproute
# apt-get install uml-utilities

Virtual Distributed Ethernet

Downloading vde from SVN

$ svn co https://vde.svn.sourceforge.net/svnroot/vde/trunk vde

Building vde

$ cd vde/vde-2
$ autoreconf --install
$ ./configure
$ make

Installing

$ make install

View-OS

$ svn co https://view-os.svn.sourceforge.net/svnroot/view-os/trunk view-os
Light Weight IPv6

Building Lwipv6

$ cd view-os/lwipv6
$ autoreconf --install
$ ./configure
$ make
Pure Libc

Building purelibc

$ cd view-os/purelibc
$ autoreconf --install
$ ./configure
$ make
UMview

Building umview

$ view-os/xmview-os
$ autoreconf --install
$ ./configure
$ make
Kernel optimization

Like many other virtual machine monitors umview uses the ptrace provided by the hosting kernel. ptrace was originally designed as a debugging tool and for this reason it was not developed with high performance in mind. UMview comes with two kernel patch that can be optionally applied to the hosting kernel to improve ptrace performance.

$ cd view-os/kernel-patch-viewos
$ ls -l
-rw-r--r-- 1 user user   466 2010-10-29 16:35 configure.ac
-rw-r--r-- 1 user user  1109 2010-10-29 16:35 Makefile.am
-rw-r--r-- 1 user user  6968 2010-10-29 16:35 patch-linux-2.6.15-ptmulti
-rw-r--r-- 1 user user 18667 2010-10-29 16:35 patch-linux-2.6.15-ptmulti-ptvm
-rw-r--r-- 1 user user  6976 2010-10-29 16:35 patch-linux-2.6.16-ptmulti
-rw-r--r-- 1 user user 18242 2010-10-29 16:35 patch-linux-2.6.16-ptmulti-ptvm
-rw-r--r-- 1 user user  6976 2010-10-29 16:35 patch-linux-2.6.17-ptmulti
-rw-r--r-- 1 user user 18233 2010-10-29 16:35 patch-linux-2.6.17-ptmulti-ptvm
-rw-r--r-- 1 user user  6943 2010-10-29 16:35 patch-linux-2.6.18-ptmulti
-rw-r--r-- 1 user user 18011 2010-10-29 16:35 patch-linux-2.6.18-ptmulti-ptvm
-rw-r--r-- 1 user user  6919 2010-10-29 16:35 patch-linux-2.6.19-ptmulti
-rw-r--r-- 1 user user 17978 2010-10-29 16:35 patch-linux-2.6.19-ptmulti-ptvm
-rw-r--r-- 1 user user  6757 2010-10-29 16:35 patch-linux-2.6.20-ptmulti
-rw-r--r-- 1 user user 17978 2010-10-29 16:35 patch-linux-2.6.20-ptmulti-ptvm
-rw-r--r-- 1 user user  6964 2010-10-29 16:35 patch-linux-2.6.21-ptmulti
-rw-r--r-- 1 user user 17992 2010-10-29 16:35 patch-linux-2.6.21-ptmulti-ptvm
-rw-r--r-- 1 user user  6987 2010-10-29 16:35 patch-linux-2.6.22-ptmulti
-rw-r--r-- 1 user user 17958 2010-10-29 16:35 patch-linux-2.6.22-ptmulti-ptvm
-rw-r--r-- 1 user user  6964 2010-10-29 16:35 patch-linux-2.6.23-ptmulti
-rw-r--r-- 1 user user 17991 2010-10-29 16:35 patch-linux-2.6.23-ptmulti-ptvm
-rw-r--r-- 1 user user  6948 2010-10-29 16:35 patch-linux-2.6.24-ptmulti
-rw-r--r-- 1 user user 16990 2010-10-29 16:35 patch-linux-2.6.24-ptmulti-ptvm
-rw-r--r-- 1 user user 10317 2010-10-29 16:35 patch-linux-2.6.25.6-ptrace_multi
-rw-r--r-- 1 user user 20925 2010-10-29 16:35 patch-linux-2.6.25.6-ptrace_vm
-rw-r--r-- 1 user user 10621 2010-10-29 16:35 patch-linux-2.6.26-rc6-ptrace_multi
-rw-r--r-- 1 user user 21766 2010-10-29 16:35 patch-linux-2.6.26-rc6-ptrace_vm
-rw-r--r-- 1 user user 10161 2010-10-29 16:35 patch-linux-2.6.28.2-ptrace_multi
-rw-r--r-- 1 user user 15678 2010-10-29 16:35 patch-linux-2.6.28.2-ptrace_vm
-rw-r--r-- 1 user user  2661 2010-10-29 16:35 patch-linux-2.6.29-ptrace1_vm1
-rw-r--r-- 1 user user 13440 2010-10-29 16:35 patch-linux-2.6.29-ptrace2-vm2
-rw-r--r-- 1 user user 12009 2010-10-29 16:35 patch-linux-2.6.29-ptrace3_vmulti
-rw-r--r-- 1 user user  2688 2010-10-29 16:35 patch-linux-2.6.30.5-ptrace1-vm1
-rw-r--r-- 1 user user 13510 2010-10-29 16:35 patch-linux-2.6.30.5-ptrace2-vm2
-rw-r--r-- 1 user user 12675 2010-10-29 16:35 patch-linux-2.6.30.5-ptrace3-vmulti
-rw-r--r-- 1 user user  2712 2010-10-29 16:35 patch-linux-2.6.31-rc8-ptrace1-vm1
-rw-r--r-- 1 user user 13566 2010-10-29 16:35 patch-linux-2.6.31-rc8-ptrace2-vm2
-rw-r--r-- 1 user user 12636 2010-10-29 16:35 patch-linux-2.6.31-rc8-ptrace3-vmulti
-rw-r--r-- 1 user user  2688 2010-10-29 16:35 patch-linux-2.6.32.2-ptrace1-vm1
-rw-r--r-- 1 user user 13510 2010-10-29 16:35 patch-linux-2.6.32.2-ptrace2-vm2
-rw-r--r-- 1 user user 12576 2010-10-29 16:35 patch-linux-2.6.32.2-ptrace3-vmulti
-rw-r--r-- 1 user user  2639 2010-10-29 16:35 patch-linux-2.6.33-rc2-ptrace1-vm1
-rw-r--r-- 1 user user 13058 2010-10-29 16:35 patch-linux-2.6.33-rc2-ptrace2-vm2
-rw-r--r-- 1 user user 12586 2010-10-29 16:35 patch-linux-2.6.33-rc2-ptrace3-vmulti
-rw-r--r-- 1 user user  2630 2010-10-29 16:35 patch-linux-2.6.34-ptrace1-vm1
-rw-r--r-- 1 user user 12321 2010-10-29 16:35 patch-linux-2.6.34-ptrace2-vm2
-rw-r--r-- 1 user user 12519 2010-10-29 16:35 patch-linux-2.6.34-ptrace3-vmulti
-rw-r--r-- 1 user user  5236 2010-10-29 16:35 patch-linux-2.6.34-utrace-ptrace1-vm1
-rw-r--r-- 1 user user 12517 2010-10-29 16:35 patch-linux-2.6.34-utrace-ptrace2-vm2
-rw-r--r-- 1 user user 12599 2010-10-29 16:35 patch-linux-2.6.34-utrace-ptrace3-vmulti
-rw-r--r-- 1 user user  2630 2010-10-29 16:35 patch-linux-2.6.35-ptrace1-vm1
-rw-r--r-- 1 user user 12317 2010-10-29 16:35 patch-linux-2.6.35-ptrace2-vm2
-rw-r--r-- 1 user user 12502 2010-10-29 16:35 patch-linux-2.6.35-ptrace3-vmulti
-rw-r--r-- 1 user user  6244 2010-10-29 16:35 patch-linux-2.6.35-utrace-ptrace1-vm1
-rw-r--r-- 1 user user 12513 2010-10-29 16:35 patch-linux-2.6.35-utrace-ptrace2-vm2
-rw-r--r-- 1 user user 12582 2010-10-29 16:35 patch-linux-2.6.35-utrace-ptrace3-vmulti
-rw-r--r-- 1 user user 19956 2010-10-29 16:35 patch-viewos-2.6.14.diff
-rw-r--r-- 1 user user  2361 2010-10-29 16:35 README

Inside UMview sourcetree, in the kernel-patch-viewos directory there are several patches for latest Linux 2.6 kernels.

Applying the patch

First of all you need to start from a Linux kernel source tree. You can get Linux kernel source code from official site or by installing one of the kernel-source package with your favorite GNU/Linux distribution package management system (i.e. apt for debian, emerge for gentoo and so on).

Once you have installed or downloaded kernel source code go to the filesystem location where kernel sources are. If needed extract them from their tarball.

$ cd /usr/src
$ tar xjf linux-2.6.X.Y.tar.bz2
$ cd linux-2.6.X.Y

At this point you have to choose the patch you are going to apply from and patch kernel source code.

$ pwd
/usr/src/linux-2.6.X.Y

$ cat view-os/kernel-patch-viewos/patch-linux-2.6.X-Z | patch -p1

Don't forget that during the usual kernel configuration for you hardware machine, you must enable ViewOS optimizations. Using menuconfig the [*] ViewOS Support (EXPERIMENTAL) option can be found under:

Linux Configuration Interface ---> General Setup
Fuse modules

In order to be able to mount filesystems in user-space inside umview environment you'll need few dynamically loadable modules coming from FUSE. When trying to mount a filesystem with type prefix like um umview will load the appropriate mode allowing to mount the filesystem without super-user permissions.

Some modules compiled for running as umview extensions and some other modules developed from scratch for research purpose are included in the umview sourcetree.

$ cd view-os/fuse-modules
$ su -c ./install-all.sh

Errors may be encountered during installation process due to lack of ./configure script inside each module directory. It can be generated by running autoreconf --install inside each module's directory.


Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox