VM2 supports the most commonly available platforms for virtual systems, which at the time of writing are Xen (http://www.xensource.com/), Linux VServers (http://linux-vserver.org/), Solaris Zones (http://www.sun.com/bigadmin/content/zones/) and Amazon EC2 (http://aws.amazon.com/ec2/).
All of these share similar properties, such as allowing the creation of virtual systems with their own filesystem, IP address and root login. However, they differ in the method of implementation, level of isolation and operating system support. EC2 is quite different in that it is a hosted service supplied by Amazon which allows customers to create virtual systems that run on Amazon's network.
On a typical VM2 installation, you would choose a single system type to use for all your virtual systems. The choice depends on your needs and preferred operating system. If you run Linux I would recommend using Xen, as it is well supported in mainstream distributions like CentOS 5 and Redhat Enterprise 5. If you use Solaris, then Zones are pretty much your only choice. VServers are less well supported, and setting up a host system typically requires the compilation of a custom kernel.
In an environment with many systems, you will typically have one VM2 master, several host systems for your selected virtualization type, and many instances that run on those hosts. However, it is possible to use a single machine as both the VM2 master and the host for Xen or Solaris Zones.
This section describes the different virtual system types in more detail. It is recommended that you choose one type and setup at least one host system for it before using VM2 :
Virtual systems running within Xen each have their own separate kernel, which co-operates with the host kernel to virtualize access to hardware. This increases the level of isolation between Xen instances and the real system, but also makes them harder to manage - there is no way to manage a Xen instance without connecting to its virtual network interface.
Each Xen instance has a dedicated file containing its filesystem, typically several GB in size. As such, there is no way for the instance to use more disk space than has been allocated. In some situtations, each instance will use a separate partition on the host system's disk or LVM logical volume, although VM2 does not configure Xen instances like this. Each also has a fixed amount of memory allocated to it.
Compared to VServers, Xen is relatively heavyweight in disk and memory use. It is also more likely to waste disk space, as free space on instance filesystems cannot be used by other instances or the host system.
Xen uses bridged networking, in which each instances effectively has a virtual ethernet interface with its own MAC address. This allows the instance to completely control its own IP address for both the primary and virtual interfaces.
A system cannot host Xen without support in its kernel, but at the time of writing, CentOS 5, Redhat Enterprise 5, Fedora Core 7 and Ubuntu 6.10 included packages for kernels with this support. Other distributions may already include Xen support, or will do in the near future.
VServers systems all share the same kernel as the host system, and use a directory on the host as their root of their filesystem. This makes them relatively lightweight, and also easier to manage - the configuration of an instance can be easily changed by simply edit files under its root directory. In addition, the host system can execute commands on any VServer with the vserver servername exec command.
However, VServers have several shortcomings. The biggest is the lack of isolation between virtual network interfaces within each instance and the host system. If the host is running some server process (like Apache) that is accepting connections to port 80 on any IP address, no VServer instance will be able to start a server on port 80! To avoid this, either the host system must run none of the servers that you intend to run on instances, or the host's servers much be each configured to only accept connections on a specific IP address.
Another problem is the lack of support for VServers in mainstream Linux distributions. A kernel patch is required for hosting, but none of the major distrubution vendors appear to supply a kernel that includes this patch. So to setup a host system, you will either need to patch and compile the kernel yourself, or find a third-party kernel that is suitable for your Linux distribution.
VServer instances cannot manage their own network interfaces - instead, the host system must activate virtual interfaces and assign them to VServers. It is possible for an an instance to have several interfaces though, such as for SSL webhosting. VM2 can fully manage interfaces on the VServers under its control.
Zones are similar in architecture to VServers, in that each shares the same host kernel and typically uses a directory in the host filesystem as the root directory. However, they run only on Solaris, and appear to be better designed and supported. Zones configuration is easy - all files in a zone's filesystem are typically stored in the directory /zones/zonename/root , and the host system can run commands in a zone with the zlogin program.
Solaris versions 10 and above include Zones support as standard, so any Solaris machine (both X86 and Sparc) can be used for hosting with no further configuration. Virtual systems running inside Zones cannot manage their own network interfaces, but VM2 includes full support for interface management via the host system. Zones do not suffer from the problem of port clashes seen with VServers, so it is quite possible for a system to both run Virtualmin and host zones that also run it.
EC2 is a special case, as it is a service provided by Amazon for which customers are charged by the hour of runtime for EC2 virtual systems. Once you have signed up for an account at Amazon's website and entered the details of that account into VM2, it can create new EC2 instances and manage those that are associated with your account.
EC2 appears to use Xen as the underlying hosting platform, so isolation between instances is good. However, you do not have as much control over the memory allocation, filesystem size or available CPU as you would for Xen instances run on your own hardware.
New EC2 virtual systems are created from machine images (called AMIs) that can be either provided by Amazon or created by customers. When you add an EC2 account to VM2, you will be granted access to an image that includes Virtualmin, as well as several other images that include base Linux distributions of various types.
EC2 instances can only have a single network interface, which is on Amazon's internal network and made accessible from the Internet via NAT. It does not appear to be possible to add additional interfaces for SSL web hosting.