Creating your own virtual machine images

Modified: 19 Apr 2018 15:48 UTC

In addition to the Triton Compute Service images, you can create your own custom images (private to you) for provisioning hardware virtual machine instances. This section describes how.

To learn how to create infrastructure images, read our documentation.

Creating a custom image in the Joyent Portal

To create a custom image in the Joyent Portal follow these instructions:

  1. Provision an Hardware virtual machine instance from one of the following images that you want to use as a base. We will call this the prototype instance.
    • ubuntu-certified-15.10
    • ubuntu-certified-15.04
    • ubuntu-certified-14.04
    • ubuntu-certified-12.04
    • centos-6 (image version 2.6.0 or later)
    • centos-7
    • debian-7
    • debian-8
    • fedora-22
    • freebsd-10
  2. Customize your prototype instance the way you want it.
  3. In the portal, go to the Instance Details page for the prototype instance.
  4. In the Create Image section, give your new image a name and an optional description.
  5. Click the Create Image button.

Image creation takes a few minutes.

To see all your images, click the my images list link in the Instance Details page.

To provision an instance from your custom image, follow the normal procedure. Choose Private from the Image Type menu to see your image.

Creating a custom image with the command line tools

To create a custom image that you can use to provision your own instances, you will need the following:

The general procedure for creating a custom image is:

  1. Provision an instance from an image that you want to use as a base. This is the prototype instance.
  2. Customize your instance the way you want it.
  3. Using Triton CLI, create an image from the stopped prototype instance. Use the sdc-createimagefrommachine command-line tool or the Joyent Cloud API Create image from machine endpoint.

It will take several minutes to create an image. When sdc-createimagefrommachine creates an image, the following things happen:

  1. Your instance is stopped to checkpoint the data on the instance so that it can be rolled back to its current state after the process ends.
  2. The prototype instance is rebooted.
  3. A script runs on the prototype instance to clear root and host SSH keys, as well as common log files from the prototype instance.
  4. An image is created from the prototype instance's root volume.
  5. The prototype instance is rebooted to the state of the checkpoint in step 1.

You can check on the progress of image creation with the sdc-getimage command. While the image is being created, its status will be creating. When the image is ready, its status will be active. If the status is failed, see Troubleshooting image creation.

When your image is active, you can use sdc-createmachine to create a new instance based on the image you just created.

Considerations and Limitations