# Understanding the CubeCOS Image Service

> Learn how to upload, manage, and control access to images using centralized storage, versioning, and visibility settings.

## Image import overview {#image-import-overview}

The CubeCOS Import feature provides a simple, seamless virtual machine (VM) migration solution. It ensures that both official cloud images and legacy workloads can be integrated into the Bigstack CubeCOS platform.

To improve user adoption and lower the barrier to entry from other virtualization platforms, CubeCOS offers two optimized migration paths based on your deployment scenario:

- **Cloud Image**: Use this path to quickly deploy standardized cluster services, such as Load Balancers or pre-configured front-end images. This method utilizes QCOW2 images, the standard format used in OpenStack environments, to ensure high performance and compatibility during the import process.
- **Virtual Disk Image**: Designed for migrations, this path allows you to move existing workloads from external platforms—including VMware (VMDK) and Microsoft Hyper-V (VHDX) into the CubeCOS ecosystem.

As the CubeCOS platform is integrated with the Skyline (OpenStack) architecture, it is natively compatible with Cloud Images (such as QCOW2). For virtual disk images (such as VMDK or VHDX), CubeCOS has introduced a new conversion toolkit. During the import process, the toolkit automatically converts the format and makes any necessary compatibility adjustments, transforming the virtual disks into a format recognisable by the CubeCOS platform.

## Compare different image types {#compare-different-image-types}

The following section provides a technical deep dive into the two core image types supported by CubeCOS. Understanding these differences is essential for administrators to determine the optimal migration strategy, ensuring that guest operating systems are provisioned with the correct drivers, storage backends, and performance optimizations required for a stable KVM environment.

### Cloud Image {#cloud-image}

The QCOW2 (QEMU Copy-On-Write version 2) format is the cornerstone of the Skyline (OpenStack) workflow.

- **Design Goal**: Serves as the standard virtual disk format for QEMU and KVM (Linux Kernel-based Virtual Machine) environments and is the preferred native format for OpenStack (Nova/Glance).
- **Scalability**: Optimized for spawning **multiple instances** quickly from a single source.
- **Copy-On-Write (COW)**: This core feature ensures that underlying data blocks are only copied when data is written, effectively saving storage space.
- **Thin Provisioning**: Focuses on COW mechanisms to provide high-efficiency thin provisioning, keeping file sizes small while supporting encryption.
- **Snapshot Mechanism**: Snapshots are built directly into the QCOW2 file format itself, allowing multiple snapshot history records to be stored within a single file.
- **Openness**: It is a fully open-source and open-standard format maintained by the QEMU community.

### Virtual Disk Image {#virtual-disk-image}

This category represents images imported via the **From another hypervisor** workflows.

#### VMDK {#vmdk}

VMDK is the proprietary standard for the VMware ecosystem.

- **Legacy Ecosystems**: Specifically designed for VMware (vSphere/ESXi) environments
- **Snapshot Mechanism**: Typically managed using a base VMDK file paired with multiple Delta files (difference files).
- **Copy-on-Write (COW)**: Supported, though the implementation and nomenclature differ from KVM standards.
- **Openness**: While much of the format specification is public, it remains primarily driven and maintained by VMware.

#### VHDX {#vhdx}

VHDX is the successor to the VHD format, designed by Microsoft for modern virtualization needs.

- **Microsoft Ecosystems**: Designed for Microsoft’s Hyper-V virtualization platform, including Windows Server and Windows 10/11.
- **Features**:
  - Large Capacity: Supports virtual disks up to 64 TB, significantly exceeding the 2 TB limit of the original VHD format.
  - Data Protection: Features a built-in logging mechanism to prevent disk corruption during sudden power failures.
  - Performance Optimization: Improves alignment and block sizes to enhance I/O performance.
- Snapshot Mechanism: Managed through a base VHDX file and corresponding differential VHDX files.
- Openness: The format specification is published, but the core ecosystem and tools remain centered around Microsoft products.

## Import Images {#import-images}

### Visibility Types {#visibility-types}

When you import an image, **Visibility** determines how the resource is shared across the Bigstack CubeCOS multi-tenant architecture.

- Public: Allow users in all projects to view the image and use it to create virtual machines.
- Private: Limit image visibility and usage to members of the owning project to ensure resource isolation between tenants.

### Visibility Logic Matrix {#visibility-logic-matrix}

Depending on the user role and import path, resource ownership is assigned as follows:

| Import Path                            | Role          | Project                          | Visibility | Result                                                                                                                   |
| -------------------------------------- | ------------- | -------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------ |
| From Bigstack                          | Administrator | Admin                            | public     | The image will be put in **Admin** project. All users in any project can use the image.                                  |
|                                        | Administrator | Any project that selected        | private    | The image will be put in specific projects. Only the users belongs to the projects can use the image.                    |
|                                        | User          | Project that the user belongs to | public     | The image will be put in the project that the user belongs to. All users in any project can use the image.               |
|                                        | User          | Project that the user belongs to | private    | The image will be put in the project that the user belongs to. Only the users belongs to the projects can use the image. |
| From another hypervisor (only private) | Administrator | Any project that selected        | private    | The image will be put in specific projects. Only the users belongs to the projects can use the image.                    |
|                                        | User          | Project that the user belongs to | private    | The image will be put in the project that the user belongs to. Only the users belongs to the projects can use the image. |
