Managing Image Instances
Under Administrator > Virtualization > Images > Image Instance, the list shows the image instances of the selected cluster with their status, and each row offers Update Display Name, Update Default Specification, Re-import and Delete. Click a name to open its details: the import source, the import DataVolume, the claim, the phase, the progress and the reason of a failure. Image instances of a namespace are managed the same way from the namespace; see Image Instances in a Namespace.
TOC
StatusRe-importDefault specificationUpdate the default specificationUpdate the display nameDeleteStatus
During a re-import, Re-importing (with progress) or Re-import error is shown next to the status.
An import error or failure is shown with a reason and CDI's original message:
Only image instances that are Available — and, for those backed by a claim, whose claim is bound and whose import succeeded — are offered when creating a virtual machine.
Re-import
Re-import imports the image again from the same address with the same import settings (CA certificate, request headers, checksum, pull method, credential), for example after the image on the server was updated. A disk or volume snapshot is cloned again.
- Click ⋮ > Re-import on the image instance.
- Confirm. The dialog shows the address that will be imported.
The new import runs in a new DataVolume beside the current one. An Available image instance keeps its current image until the new import succeeds; it then switches to the new volume, and the previous DataVolume is deleted once no clone still reads from it. If the new import fails, the image instance stays on its current image and shows Re-import error.
Re-import is refused when the CA certificate ConfigMap of the image instance has been deleted (CA ConfigMap … is missing); delete the image instance and add it again with its CA certificate.
Default specification
An image instance can declare the instance type and preference virtual machines created from it should use. They are stored as four labels on its DataSource:
An image instance added from an image source takes these labels from the image source (see Adding Image Sources); an image imported from a registry may also carry them in the image itself. When you create a virtual machine from the image instance, they are preselected in the Model area.
Update the default specification
- Click ⋮ > Update Default Specification on the image instance.
- Select a Default Instancetype and a Default Preference of the cluster, or clear a field to remove it. Preferences named after the operating system of the image instance are marked Suggested and listed first.
- Click Update.
CDI copies these labels onto the DataSource from the objects behind it — the claim and the import DataVolume, a volume snapshot, or a DataImportCron — and, when the DataVolume carries none of them, from the volume it was cloned from. So the console writes your choice on those objects as well. A cleared field loses its name label but keeps its kind label: virtual machines and the console read a default only from the name label, and the remaining kind label stops CDI from copying the value of the cloned volume back. A re-import keeps your choice, cleared fields included; only a default that a registry image declares in the image itself is set again for a cleared field by the re-import — clear it again afterwards.
The same with kubectl — label the claim and the import DataVolume first, then the DataSource:
To clear the default preference, remove its name label and keep its kind label on the same objects:
Changing the default specification affects virtual machines created afterwards; existing virtual machines keep what they were created with.
Update the display name
Click ⋮ > Update Display Name. The display name is stored in the cpaas.io/display-name annotation of the DataSource.
Delete
- Click ⋮ > Delete on the image instance.
- The dialog lists the readers of the image instance: virtual machines whose system disk would no longer be re-creatable from it, virtual machine pools that could no longer create members, and clones still reading from it, which will not complete. Disks already created from the image instance are not affected.
- Enter the name of the image instance and confirm.
What is deleted depends on how the image instance was created:
With kubectl, delete the DataSource of an image instance added in the console; the rest follows: