Skip to end of metadata
Go to start of metadata

OpenIndiana supports several methods of virtualization:

  • 7.1 Zones:  OpenIndiana supports operating system-level virtualization with local zones (containers) allows to run processes using the same OpenIndiana kernel and system resources. Overheads are the lowest, while processes are isolated, but they are still UNIX processes. It is possible to use "branded" zones to emulate certain releases of other UNIX OSes, including Solaris 8, 9 and 10 (specify supported release-update numbers) and a Linux environment similar to kernel 2.4-based RHEL/CentOS.
  • 7.3 KVM:  (correction may be needed) Type-1 Hypervisor with QEMU-based KVM (since development release oi_151a), where each VM is a kernel-space process with smaller latencies and overheads in comparison to Type-2 virtualization. The published version in illumos-gate is currently limited to Intel CPUs with EPT extensions, although porting work is underway (as of March 2013) to add some AMD CPU support.
    Xen-based virtualization (also rooted in QEMU(question)) was at some time part of OpenSolaris project, but became outdated and was ultimately dropped due to lack of resources and invested interest.
  • 7.2 VirtualBox: Type-2 Hypervisor with VirtualBox software running in a global or local zone. Each VM is a userspace process for the physical host.

Hypervisor-based virtualization (not zones) allow to run different operating systems such as Windows and Linux, in virtual machines hosted on an OpenIndiana machine. Note that you can only have one hypervisor engine accelerated by hardware (i.e. CPU extensions) active at any one time. Operating-system level virtualization (zones, containers) require the guest operating environments to use the same kernel as the host, though possibly with a different set of user-space programs (especially in case of branded zones), and are often combined with hypervisor-managed VMs to fine-grain resource control or administrative access to the VMs or just to group them by project.

There was a bug #1723 in illumos-gate (fixed in the gate, chset 13903; not yet included in OpenIndiana as of oi_151a7) which caused hypervisor drivers (for KVM and VirtualBox) to hang during boot of the host on systems with x2apics (mostly Sandy Bridge).

The workaround is to disable apix:

A proper solution is to update your kernel with a local rebuild of the illumos-gate (or updating to a newer release of your OS, when available).

Some of the more generic available options will be covered in this chapter. Depending on your deployment goals and resources, and not in the least – on your networking topology, you may have a need for much more complicated setups than are explained here. Some such setups are detailed on other pages in this Wiki and the illumos Wiki, others can be found on blogs throughout the Internet.

 

Labels:
  1. Feb 09, 2012

    Anonymous

    Beside zones, you may use a type-2 hypervisor like virtualbox on top of OpenIndiana to virtualize not

    only applications and environments but also other operating systems.

    If you want to have this really fast and stable, you will need a barebone type-1 hypervisor as base system

    like Xen or ESXi. While i hope for XEN (with OpenIndiana as Dom-0) I do not expect that at least it in the near future.

    So the best current and most stable solution is (free) ESXi 4.1 as base system and OpenIndiana as a Storage-OS on top.

    I wrote a miniHowTo for those who wants to try:

    http://www.napp-it.org/doc/downloads/all-in-one.pdf

    Gea

    1. Apr 09, 2011

      Anonymous

      What about running fedora as a Xen dom0 and running OI as a domU inside it?

  2. Sep 06, 2011

    Anonymous

    using oi 148 ...
    Although it's simple to create a working zone exactly as shown above, it's not that easy to install packages. Apparently from error below the zone has trouble contacting a DNS. Is this a bug, or do both the global and non-global zones need to be configured to forward IP addresses etc...
    I saw this solution at http://blogs.oracle.com/jayd/entry/solaris_tip_of_the_week4 but I am not sure if that's the bets way to go about it. Oracles official zone guide is also not very useful.
    Can someone explain if something like 'pkg install nano' should work automatically, or is their some kind of lengthy and complex setup needed to make it work?

    root@myzone:~# pkg install nano
    pkg: 0/2 catalogs successfully updated:

    Unable to contact valid package repository
    Encountered the following error(s):
    Unable to contact any configured publishers.
    This is likely a network configuration problem.
    1: Framework error: code: 6 reason: Couldn't resolve host 'pkg.openindiana.org'
    URL: 'http://pkg.openindiana.org/dev'. (happened 4 times)
    2: Framework error: code: 6 reason: Couldn't resolve host 'pkg.openindiana.org'
    URL: 'http://pkg.openindiana.org/legacy'. (happened 4 times)

    Framework error: code: 6 reason: Couldn't resolve host 'pkg.openindiana.org'
    URL: 'http://pkg.openindiana.org/legacy/versions/0/'.

    1. Sep 06, 2011

      Anonymous

      I've not created zones under OpenIndiana (but I have under other variants of Solaris) and the answer should be the same. When you create the zone configuration you have to configure the zone's network port using zonecfg. Configuring the network is slightly different depending upon whether it is an exclusive or shared IP configuration. After the zone has been configured and installed, the network usually gets set up during the first boot by sysidcfg which asks a series of network related questions.

      If your zone isn't working, you need to use zonecfg to print out the zone's configuration (zonecfg -z myzone export) and verify that the network is configured there. There should be a section staring with "add net". If no such section exists, your zone won't have network access. Consult the zonecfg manual pages for information on how to configure the zone's network port.

      If the zone has a network port section in its configuration, the network may be improperly configured inside the zone. You can use "ifconfig -a" to see if the zone is configured. If not, you might try "sys-unconfig" and reboot to reconfigure the zone.

      1. Sep 06, 2011

        Anonymous

        thanx, but as i've stated, i have no problem bringing up the zone configuring the ip address ... the PROBLEM is the name service ... and that's what's hard to figure out. should a solaris zone use the default settings of the global zone? or does there need to be some special plumbing going on?
        during the startup script (after zlogin -C) i did NOT choose a name server, since i'm not running one on the global zone. is this the problem? does each zone need a specified connection to a name server? it sure would be nice if upon creation of a 'vanilla' zone, it would automatically work ... e.g. if you ping google.com or pkg.openindiana.org, it should work out of the box.

        1. Jun 10, 2012

          The local zones' operating environments have just the same networking methods as your global zones might have (including the option to have no networking or to have a private lab net unrelated to your physical network - for this reason there is no default config for a "vanilla" zone). Zones have individual networking configuration, and generally need either an individual IP address from your LAN, or use NAT through your global zone (and use the appropriate DNS servers through that NAT). I recently wrote about the latter option here: http://wiki.illumos.org/display/~jimklimov/Using+host-only+networking+to+get+from+build+zones+and+test+VMs+to+the+Internet (may be renamed and moved into the main docs sometime soon, though).

          Also, you can install (and update) packages into local zones from the global zone, using the concept of alternate roots (pkg -R $zoneroot <pkgcmd> ...); this is especially useful for those of your zones which by (your) design have no connection to the internet or physical LAN. For example:

          Finally, you could make a local mirror of the OI repositories (http://wiki.illumos.org/display/~jimklimov/Making+a+LAN+mirror+of+global+package+repositories), lofi-mount that resource into the zone without LAN access, fire up a local pkg server, and install/update from that (wink)

          HTH,
          //Jim Klimov

  3. Oct 31, 2011

    Anonymous

    Does OpenIndiana Development oi_151a X86 support BrandZ zones? I'm wanting to build a Ubuntu 10 zone for Mediatomb (which isn't supporting FLAC properly in the host OS. If not, how does one get USB support (and the 4.1.4 extension pack) working for VirtualBox? I keep getting the "The installer failed with exit code 1: VBoxExtPackHelperApp: error: The group is not a system group and it has write access to '/opt'" error.

    1. Nov 02, 2011

      Anonymous

      Solved.
      Googling for "VERR_SUPLIB_WRITE_NON_SYS_GROUP" got me to a full discussion about VB's finicky permission requirements. It seems a package install changed the defaults. A "chnod 755 /opt" fixed things.