Image Storage

What is Image Storage?

An image storage is a storage server that stores VM image templates, including ISO image files.

  • An image storage must be attached to a zone before the resources in the zone can access it. Note that you can share images across multiple zones by using the image storage.
    Figure 1. Image Storage


  • To better manage image storage and zones, the UI specifies that one image storage can only correspond to one zone. In the UI, when you add an image storage, the image storage will be attached to the current zone by default. When you delete a zone, the image storage attached to the zone will also be deleted.

Image Storage Type

The Cloud supports the following types of image storage:
  1. ImageStore
    • Stores image files by means of image slices and supports incremental storage.
    • Allows you to create snapshots and images when VM instances are running or stopped.
    • Allows you to clone VM instances without data volumes when these VM instances are running, paused, or stopped.
    • Allows you to clone VM instances with data volumes when these VM instances are running, paused, or stopped, and with storage types of LocalStorage, NFS, SharedMountPoint (SMP), Ceph, or SharedBlock.
    • Supports image synchronization across ImageStore image storage on the same management node.
    • Allows you to obtain the existing image files under the URL path in the image storage.
  2. Ceph
    • Stores image files by means of Ceph distributed block storage.
    • Allows you to create snapshots and images when VM instances are running or stopped.
    • Allows you to clone VM instances without data volumes when these VM instances are running, paused, or stopped.
    • Allows you to clone VM instances with data volumes when these VM instances are running, paused, or stopped, and with the storage type of Ceph.
    • Allows you to export images on the UI or image storage.
      • You can export images, copy exported image URLs, and download exported images on the UI.
      • You can also export images on an image storage.

        For example, assume that the image path you use is ceph://bak-t-c9923f9821bf45498fdf9cdfa1749943/61ece0adc7244b0cbd12dafbc5494f0c.

        Then, run the following command on the image storage:
        rbd export -p bak-t-c9923f9821bf45498fdf9cdfa1749943 --image 61ece0adc7244b0cbd12dafbc5494f0c --path /root/export-test.image
        
        # bak-t-c9923f9821bf45498fdf9cdfa1749943 is the name of the pool where the image resides.
        # 61ece0adc7244b0cbd12dafbc5494f0c is the name of the image.
        # /root/export-test.image is the name of the exported file.
  3. AliyunEBS
    • Stores image by means of object storage.
    • Allows you to create snapshots and images when VM instances are running or stopped.
    • Allows you to clone VM instances without data volumes when these VM instances are running, paused, or stopped.
    • Does not allow you to clone VM instances with data volumes.
    • Allows you to export images on image storage. For more information, contact the official technical support.

Image Storage | Primary Storage

The following table lists the relationship between primary storage (PS) and image storage (BS).
PS/BS ImageStore Ceph
LocalStorage ×
NFS ×
SMP ×
Ceph
SharedBlock ×
Vhost ×
CBD ×
  • When primary storage are LocalStorage, NFS, or SMP, the default type for image storage is ImageStore.
  • When primary storage are NFS or SMP, you can manually mount the corresponding shared directories to the local directories of the corresponding image storage. In this regard, both primary storage and image storage can use the network shared storage.
  • When primary storage is Ceph, you can use the primary storage in the same Ceph cluster as image storage. You can also use the ImageStore primary storage as image storage.
  • When primary storage is SharedBlock, the default type for image storage is ImageStore.
  • When primary storage is AliyunNAS, the default type for image storage is ImageStore.
  • When primary storage is AliyunEBS, the default type for image storage is AliyunEBS.

Add an Image Storage

On the main menu of ZStack Cube Ultimate, choose Resource Center > Hardware > Storage Facility > Image Storage. On the Image Storage page, click Add Image Storage. Then, the Add Image Storage page is displayed.

The following lists the image storage that you can add:
  • Add an ImageStore image storage.
  • Add a Ceph image storage.
  • Add an AliyunEBS image storage.

Add an ImageStore Image Storage

Set the following parameters:
  • Zone: By default, the current zone is displayed.
  • Name: Enter a name for the image storage.
  • Description: Optional. Enter a description for the image storage.
  • Type: Select ImageStore.
  • Image Storage IP: Enter an IP address for the ImageStore image storage.
  • Mount Path: Enter the mount path of the storage to be mounted on the ImageStore image storage. For example, /cloud_bs
    Note:
    • We recommend that you mount a large-capacity storage for the directory, and enter the absolute path of the directory.
    • The following system directories cannot be used. Otherwise, the hosts might fail to work properly.
      • /
      • /dev/
      • /proc/
      • /sys/
      • /usr/bin
      • /bin
  • Retrieve Existing Image: Optional. Choose whether to obtain existing images for the ImageStore image storage.
    Note:
    • You can obtain existing images from the mount path of the image storage.
    • Only ImageStore image storage allows you to Retrieve Existing Image.
  • SSH Port: Set an SSH port for the image storage.
    Note: The port must be an integer. Default: 22.
  • User Name: Use either the default user name (root) or enter a user name for the image storage.
  • Password: Enter the password for the user name.
  • Data Network: Optional. If you planned a dedicated network for data communication between the compute node and the image storage, enter its CIDR.
    Note:
    • If not set, the Cloud uses the management network by default.
    • If you planned a dedicated network for data communication between the compute node and the image storage, add it directly to the Cloud.
  • Image Sync Network: Optional. Enter the CIDR of the image synchronization network.
    Note:
    • If not set, a management network will be used by default for image synchronization.
    • You can synchronize images between ImageStore image storage within the same management node.
    • If you deployed a dedicated network for image synchronization, add it directly to the Cloud.
    • Using a dedicated image synchronization network can avoid network congestion and improve transmission efficiencies.
    • If you set an image synchronization network for both a source ImageStore and a destination ImageStore image storage, only the image synchronization network of the destination ImageStore image storage works.
Figure 1. Add ImageStore Image Storage


Add a Ceph Image Storage

Set the following parameters:
  • Zone: By default, the current zone is displayed.
  • Name: Enter a name for the image storage.
  • Description: Optional. Enter a description for the image storage.
  • Type: Select Ceph.
  • Mon Node: Configure the Ceph monitor for the Ceph image storage, including the management IP address, SSH port, user name, and password of the Ceph monitor.
    • Management IP: Enter the IP address of the Ceph monitor.
    • SSH Port: Enter the SSH port of the Ceph monitor. Default: 22.
    • User Name: Enter the user name of the Ceph monitor.
    • Password: Enter the password of the Ceph monitor.
    Note:
    • You can set the interval that the management node reconnects the mon node of the Ceph image storage if the mon IP fails to be detected. Method:

      Go to Settings > Platform Setting > Global Setting > Advanced > Resource Center > Hardware > Image Storage, locate Interval of Auto-Reconnection to Monitoring Node of Image Storage, and change its values as needed. Default: 30 seconds.

    • You can specify whether to enable automatic reconnection to the mon node of the Ceph image storage if the mon IP fails to be detected. Method:

      Go to Settings > Platform Setting > Global Setting > Advanced > Resource Center > Hardware > Image Storage, locate Auto-Reconnection to Monitoring Node of Image Storage, and specify whether to enable it as needed. By default, the auto reconnection is enabled.

    You can click Add Mon Node to add more Ceph monitors.

  • Image Storage Pool: Optional. Enter an image storage pool UUID.
    Note:
    • You can specify a storage pool for the Ceph image storage to store images. If not specified, the Cloud creates one automatically.
    • To specify a storage pool, make sure that a storage pool is already available in the Ceph cluster. Then you can specify the UUID of a storage pool.
  • Data Network: Optional. Enter the CIDR of a data network.
    Note:
    • If not set, the Cloud uses the management network by default.
    • If you planned a dedicated network for data communication between the compute node and the image storage, add it directly to the Cloud.
Figure 2. Add Ceph Image Storage


Add an AliyunEBS Image Storage

Set the following parameters:
  • Zone: By default, the current zone is displayed.
  • Name: Enter a name for the image storage.
  • Description: Optional. Enter a description for the image storage.
  • Type: Select AliyunEBS.
  • Mount Path: Enter an Ocean API endpoint.
    Note:
    • AliyunEBS image storage sends requests to an Ocean server through this mount path.
    • Format: http://Ocean_Server_Domain:Port/ocean/api.
  • Bucket: Enter an OSS bucket you added to ZStack Cube Ultimate.
    Note: You can specify whether to roll back objects in OSS buckets if an error occurs when you upload custom images to Alibaba Cloud EBS image storage. Method:

    Go to Resource Center > Hybrid Cloud Management > Set > Hybrid Cloud Settings, locate Rollback Imported Image, and change its value as needed. Default: True.

  • Data Network: Optional. If you planned a dedicated network for data communication between the compute node and the image storage, enter its CIDR.
    Note: If not set, the Cloud uses the management network by default.
Figure 3. Add AliyunEBS Image Storage


Manage an Image Storage

On the main menu of ZStack Cube Ultimate, choose Resource Center > Hardware > Storage Facility > Image Storage. Then, the Image Storage page is displayed.

The following table lists the actions that you can perform on an image storage.

Action Description
Add Image Storage Add an image storage to the Cloud.
Edit Image Storage Edit the name and description of the image storage.
Enable Image Storage Enable the disabled image storage.
Disable Image Storage Disable the image storage.
Note: After an image storage is disabled, you cannot add images to this image storage. However, you can still use existing images to create VM instances.
Reconnect Image Storage Reconnect the image storage. This action will update the storage information about the image storage.
Note:
  • You cannot perform any operations on resources of the image storage during the reconnection.
  • If any host can connect properly to the image storage, the status of the image storage will be Connected.
Clean up Data Clear both the invalid data that have been completely deleted and the temporary data that were expired on the image storage to release storage spaces.
Note:
  • For example, assume that you have deleted an image file (either an ordinary image or a vRouter image) totally, and have deleted the VM instances created from this image file. If you clean up data, storage spaces of the image storage will be released. After you clean up the data successfully, the UI will display the released space size and the available space.
  • Only data stored on ImageStore image storage can be cleaned up.
  • Avoid operations such as writing data during data cleanup.
Update Password Update the password of the image storage. You need to reconnect the image storage after the updates.
Delete Image Storage Delete the image storage.
Note:
  • Deleting an image storage only deletes the image storage and image records on the ZStack Cube Ultimate but not the actual data.
  • If the image storage is also used as a local backup server, deleting the image storage also deletes the CDP tasks and CDP data on the corresponding local backup server. Proceed with caution.