To create OpenStack images in Oracle Solaris, you use the Unified Archives feature. With the archiveadm command, you can create new Unified Archives (UAs) from global, non-global, and kernel zones.
The UA can be either a clone archive or a recovery archive. A clone archive is based on the currently active boot environment. This archive does not include any of the system configuration information from the OS instance such as inactive BEs. Instead, the installers force the reconfiguration or use configuration information that you provide in a system configuration (SC) profile. A recovery archive includes all boot environments and system configuration information. Thus, if you want to include all of the system's information in a UA, create a recovery archive. For more information about UAs, see the appropriate Using Unified Archives for System Recovery and Cloning in Oracle Solaris book in your Oracle Solaris version's library..
Later, when your configuration is fully operational, you can also create an image by creating a snapshot of an existing VM instance. For this case, the VM instance is already in the cloud. Thus, the command to use is nova image-create instead of archiveadm. The nova command takes a snapshot of a running VM instance to create the image.
You can also use custom images for data backups or to rescue a VM instance. A rescue image is a special type of image that is booted when a VM instance is placed into rescue mode. A rescue image enables an administrator to mount the file systems for the VM instance to correct the problem.
In Oracle Solaris, you create an OpenStack image in three phases:
Create the zone.
Create the UA of the zone.
Upload the UA to Glance.
These phases are combined in the following procedure.
Except for the command syntax to create the zone, all the rest of the steps can be used for the creation and uploading of images of both non-global zones and kernel zones.
The step for the creation of zones provides only the basic commands. For complete instructions in creating zones, refer to the zones documentation in your Oracle Solaris version's library.
After logging in, provide the information as prompted.
global# zonecfg -z zone-name create global# zoneadm -z zone-name install global# zoneadm -z zone-name boot global# zlogin -C zone-name
global# zlogin zone-name root@zone-name# sed /^PermitRootLogin/s/no$/without-password/ < /etc/ssh/sshd_config > /system/volatile/sed.$$ root@zone-name# cp /etc/ssh/sshd_config /etc/ssh/sshd_config.orig root@zone-name# cp /system/volatile/sed.$$ /etc/ssh/sshd_config root@zone-name# exit
global# archiveadm create -z zone-name /var/tmp/archive-name.uar
This document assumes Glance is on the Controller node.
controller# export OS_USERNAME=glance controller# export OS_PASSWORD=service-password controller# export OS_TENANT_NAME=service controller# export OS_AUTH_URL=$CONTROLLER_ADMIN_NODE:5000/v2.0
controller# glance image-create --container-format bare --disk-format raw \ --is-public true --name "image-name" \ --property architecture=system-arch --property hypervisor_type=solariszones \ --property vm_mode=solariszones < path-to-archive-file
where system-arch refers to the system's architecture and which can be either x86_64 or sparc64.