Creates a new private image container and returns a URL as the upload_to
object in the response. Use this URL to upload your own disk image to the container.
-
Ensure the disk image is raw disk image (
.img
) format. -
Compress the disk image using gzip (
.gz
) format. Compressed, the file can be up to 5 GB and decompressed it can be up to 6 GB. -
Upload the file in a separate PUT request that includes the
Content-type: application/octet-stream
header:
curl -v \
-H "Content-Type: application/octet-stream" \
--upload-file example.img.gz \
$UPLOAD_URL \
--progress-bar \
--output /dev/null
You need to upload image data within 24 hours of creation or the API cancels the upload and deletes the image container.
Only core regions that support our Object Storage service can store an uploaded image.
If you create an image from an encrypted disk, the API doesn't encrypt the image. When you rebuild a compute instance from that image, the resulting disk will be automatically encrypted.
You can create a new image and upload image data using a single process through Cloud Manager or the Linode CLI.
# Run the operation to just get the upload_to URL
linode-cli images upload \
--description "Optional details about the Image" \
--label "Example Image" \
--region us-east
# Upload the image file in a single step
linode-cli image-upload \
--description "Optional details about the Image" \
--label "Example Image" \
--region us-east \
/path/to/image-file.img.gz
<https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli>
images:read_write
<https://techdocs.akamai.com/linode-api/reference/get-started#oauth>