Creating your own virtual machine images
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 Triton Portal
To create a custom image in the Triton Portal follow these instructions:
-
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-18.04
ubuntu-certified-17.04
ubuntu-certified-16.04
ubuntu-certified-14.04
ubuntu-certified-12.04
centos-7
centos-6
(image version 2.6.0 or later)debian-8
debian-7
fedora-25
freebsd-11
freebsd-10
openbsd-6
ws2016std
ws2012std-r2
ws2012std
- Customize your prototype instance the way you want it.
- In the portal, go to the Instance Details page for the prototype instance.
- In the Create Image section, give your new image a name and an optional description.
- 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:
- A Triton Compute Service account
triton
CLI installed on a local machine such as a desktop or laptop. Make sure that you are using at least version 7.1.0 of the CloudAPI CLI tools.
The general procedure for creating a custom image is:
- Provision an instance from an image that you want to use as a base. This is the prototype instance.
- Customize your instance the way you want it.
- Using Triton CLI, create an image from the stopped prototype instance. Use the
sdc-createimagefrommachine
command-line tool or the Triton 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:
- 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.
- The prototype instance is rebooted.
- A script runs on the prototype instance to clear root and host SSH keys, as well as common log files from the prototype instance.
- An image is created from the prototype instance's root volume.
- 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
- Currently, you can cannot create Custom Windows Images.
- Custom images are not intended to contain pre-populated databases, application data, keys or passwords. These items are best handled via a configuration management tool.
- Custom images are not a backup solution. Custom images do not backup the
/data
volume (/mnt
on Ubuntu Certified images) in HVM instances. - The more changes to disk you make in setting up your prototype instance, the larger the image will be, even if you clean up files. Keep the disk churn in your prototype instance to a minimum. Smaller images typically provision instances faster.
- Images are private to the user account that created them. You can add an access control list to let additional users create instances from your image.