JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris 11 Express Distribution Constructor Guide     Oracle Solaris 11 Express 11/10
search filter icon
search icon

Document Information

1.  Introduction to the Distribution Constructor

2.  Design and Build Oracle Solaris Images

3.  x86: Design and Build a Virtual Machine

What is a Virtual Machine?

What is the Final Product?

System Requirements for Building Virtual Machines

How to Build a Virtual Machine

Get an AI Boot Image

Providing a Boot Image

Optional: Customize Build Specifications

Build the Virtual Machine

Troubleshooting During the Build

Further Information

A.  Custom Finalizer Scripts, Examples

Optional: Customize Build Specifications

You may choose to customize some of the other specifications in the Virtual Machine manifest file. You can make these changes by editing the XML fields in vmc_image.xml before you build your Virtual Machine.

The following table lists the fields in vmc_image.xml, provides the default values for each field, and describes which fields can be edited.

Note - Some of the fields in this table are also used in the other distribution constructor manifests. Many of these fields, however, are unique to the Virtual Machine manifest.

Table 3-2 Virtual Machine Manifest Fields

Manifest Field
The build area field specifies the area where the Virtual Machine will be created. You can use the default area if it is suitable for your system, or you can specify a different build area on the host system.

Note - To use checkpointing to pause and resume during the build, you must specify a ZFS dataset, or a mount point that correlates to a ZFS dataset, as your build area. If the ZFS dataset does not exist, it is created during the build. The ZFS pool that you specify, however, must already exist.

Within the <distro_constr_flags> tag, the value of true for <stop_on_error> means that, if an error occurs in the build, the distribution constructor stops running.

The value of true for <checkpoint_enable> gives you the ability to pause at any specified steps, called checkpoints, when building the Virtual Machine, and to restart the build at any specified checkpoints. For instructions, see Building an Image in Stages by Using Checkpoint Options.

The finalizer section contains a list of references to the finalizer scripts that are run when the Virtual Machine is built. These scripts are used to customize the image and are run in the order listed in this manifest.

As shown in the following script entries, each script field includes a required checkpoint field with a name for the checkpoint. The checkpoint marks the stage during the Virtual Machine build when this script is run. The checkpoint field also contains a checkpoint message. When the script runs, the message will display.

Each script also includes a field, argslist, that provides any arguments that are required for that particular script to run. You can edit these arguments as described in this table.

Note - The arguments are provided within quotes. Do not remove the quotes. The quotes are used to delineate each argument in the field.

<script name="/usr/share/distro_const/vmc/prepare_ai_image">
        message="prepare bootable ai image"/>
    <!-- Path to bootable AI image ISO -->
    <!-- What AI client manifest to use for installation.
         "default" will use the existing AI client manifest
         included on the AI media.  To use a custom
         AI client manifest, provide a path to 
         your custom manifest -->
In the prior section, you modified this prepare_ai_image script reference to point to the AI image that you have downloaded. You can, also, in this field, provide a pointer to a custom AI client manifest. By providing a custom AI client manifest, you can change the default installation specifications such as defining a particular installation target or changing the list of packages to be installed with the operating system.

Change the variable, "default", to the path for your custom AI client manifest. The path will be a file path on the system where you are running the distribution constructor, as shown in this example.


For instructions about creating a custom AI client manifest, see Creating a Custom AI Manifest in Oracle Solaris 11 Express Automated Installer Guide .

<script name="/usr/share/distro_const/vmc/create_vm">
        message="create and configure virtual machine"/>

The create_vm script builds and configures the Virtual Machine. The argslist field provides 3 arguments for the script. You can edit these arguments as follows.

  • Virtual machine disk size – The default is 16000 MB. Values between 12000 and 99.999.999 are valid.
  • Virtual machine ram size – The default is 1536 MB. Values between 1000 and 16,384 MB are valid.

  • Virtual machine type – The default is opensolaris for a 32–bit Virtual Machine. Or, use opensolaris_64 for a 64–bit Virtual Machine.

Note - The create_vm script and its arguments affect the Virtual Machine specifically while it is being created. See the post_install_vm_config script below for arguments that affect the postinstallation Virtual Machine.

<script name="/usr/share/distro_const/vmc/install_vm">
        message="Boot and Install virtual machine"/>
The install_vm script boots and installs the Virtual Machine in the build area.
<script name="/usr/share/distro_const/vmc/
        message="Post installation virtual machine 

The post_install_vm_config script performs postinstallation configuration on the Virtual Machine. The argslist field provides 3 arguments for the script. You can edit these arguments as follows.

  • Virtual Machine ram size – The default is 1024 MB. Values between 1000 and 16,394 are valid.
  • Virtual Machine number of CPUs – The default is 1 CPU. Values between 1 and 32 are valid.

  • Virtual Machine VT-x/AMD-V support – Valid options are on or off.

<script name="/usr/share/distro_const/vmc/export_esx">
        message="Export virtual machine for VMWare ESX"/>
The export_esx script converts the Virtual Machine into a set of ESX files that are ready for import. If you want your Virtual Machine files to be set up in ESX format, use this script. Otherwise, comment out this script.

For example, if you want to comment out the following field:


Enclose it as follows:


The ESX Virtual Machine will consist of a set of files in the build_area/media/esx folder.

Note - If you use both the export_esx and export_ovf scripts, identical Virtual Machines for each format are created.

<script name="/usr/share/distro_const/vmc/export_ovf">
        message="Export virtual machine in OVF format"/>
The export_ovf script converts the Virtual Machine into a set of OVF files that are ready for import. If you want your Virtual Machine files to be set up in OVF format, use this script. Otherwise, comment out this script, so it will not be run.

The OVF Virtual Machine will consist of a set of files in the build_area/media/ovf folder.