SmartOS guest "prepare image" scripts

"*-prepare-image" scripts for preparing a guest VM on the SmartOS hypervisor for image creation.

Basically, to create a custom virtual image for Joyent SmartDataCenter (SDC), the Joyent Cloud (which is an number of instances of SmartDataCenter), or SmartOS the process is:

  1. Create a VM from any base image (called the "proto" VM).
  2. Login to the VM and customize as desired.
  3. Optionally snapshot the VM to which to rollback after imaging.
  4. Prepare the VM for image creation and stop the VM.
  5. Create the image from the stopped VM
  6. Optionally restore from the snapshot in step 3 or throw away (destroy) the proto VM.

The "prepare image" scripts for step 4 are found here.

Current Status

Currently supported guest OSes are:

Usage on Linux

Download and run the linux-prepare-image script, e.g. as follows:

wget https://download.joyent.com/pub/prepare-image/linux-prepare-image
bash linux-prepare-image

Usage on Windows

Note: Windows is not fully supported yet.

  1. Download https://download.joyent.com/pub/prepare-image/windows-prepare-image.bat
  2. Run windows-prepare-image.bat in cmd.exe.

Related Tools

Note: A separate option for creating SmartOS/SDC virtual images are the SmartOS imagetools which show how to create images from clean sources. This requires building SmartOS and access to a SmartOS global zone (GZ), i.e. it is a heavier process intended more for SmartOS administrators and cloud operators -- and is not an available option in the Joyent Cloud.