IBM Cloud Docs
Creating, editing, and deleting compute images (ibmcloud sl image)

Creating, editing, and deleting compute images (ibmcloud sl image)

Use the following commands from the IBM Cloud® Command Line Interface to manage IBM Cloud compute images.

ibmcloud sl image datacenter

Add/Remove datacenter of an image.

ibmcloud sl image datacenter IDENTIFIER [OPTIONS]

Examples:

ibmcloud sl image datacenter 12345678 --add dal05 --remove sjc03
This command Add/Remove datacenter of an image.
ibmcloud sl image datacenter IDENTIFIER [flags]

Command options:

--add
To add Datacenter
--remove
Datacenter to remove

ibmcloud sl image delete

Delete an image

ibmcloud sl image delete IDENTIFIER

ibmcloud sl image detail

Get details for an image

ibmcloud sl image detail IDENTIFIER

ibmcloud sl image edit

Edit details of an image

ibmcloud sl image edit IDENTIFIER [OPTIONS]

Examples:

ibmcloud sl image edit 12345678 --name ubuntu16 --note testing --tag staging This command edits an image with ID 12345678 and set its name to "ubuntu16", note to "testing", and tag to "staging".

ibmcloud sl image edit IDENTIFIER [flags]

Command options:

--name
Name of the image
--note
Add notes for the image
--tag
Tags for the image

ibmcloud sl image export

Export an image to an object storage

IDENTIFIER: ID of the image URI: The URI for an object storage object (.vhd/.iso file) of the format: cos://regionName/bucketName/objectPath API_KEY: The IBM Cloud API Key with access to IBM Cloud Object Storage instance.

ibmcloud sl image export IDENTIFIER URI API_KEY

ibmcloud sl image import

Import an image from an object storage

ibmcloud sl image import NAME URI API_KEY [--note NOTE] [--os-code OS_CODE] [--root-key-crn ROOT_KEY_CRN] [--wrapper-dek WRAPPER_DEK] [--cloud-init] [--byol] [--is-encrypted] NAME: The image name URI: The URI for an object storage object (.vhd/.iso file) of the format: cos://regionName/bucketName/objectPath API_KEY: The IBM Cloud API Key with access to IBM Cloud Object Storage instance.

ibmcloud sl image import NAME URI API_KEY [flags]

Command options:

--byol
Specifies if image is bring your own license
--cloud-init
Specifies if image is cloud-init
--is-encrypted
Specifies if image is encrypted
--note
The note to be applied to the imported template
--os-code
The referenceCode of the operating system software description for the imported VHD, ISO, or RAW image
--root-key-crn
CRN of the root key in your KMS instance
--wrapped-dek
Wrapped Data Encryption Key provided by IBM KeyProtect. For more info see: https://console.bluemix.net/docs/services/key-protect/wrap-keys.html#wrap-keys

ibmcloud sl image list

List all images on your account

ibmcloud sl image list [flags]

Command options:

--name
Filter on image name
--private
Display only private images
--public
Display only public images

ibmcloud sl image share

Share an image template with another account.

ibmcloud sl image share IDENTIFIER ACCOUNT ID

ibmcloud sl image share-deny

Deny sharing of an image template with another account.

ibmcloud sl image share-deny IDENTIFIER ACCOUNT ID