Skip to main content
Version: 3.1

Import OS images or migrate VMs from other hypervisors sing the CLI

Use the CLI to upload and import OS images into CubeCOS before deploying virtual machines. Image uploads follow a staged process.

info

Pre-built cloud images are available on our website. Go to Downloads

Upload image over SCP or winscp​

Transfer your image file to the CubeCOS storage path using SCP (or WinSCP on Windows):

Replace the following variables:

  • <image-name>: The name of the image
  • <format>: Any of the following supported virtual disk formats.
    • qcow2
    • raw
    • vmdk
    • vhd
    • ova
    • img
    • kernel
  • <your-cluster-vip>: Replace with your cluster VIP. For single node deployments, use the management IP of the node.
The local terminal
scp <image-name>.<format> root@<your-cluster-vip>:/mnt/cephfs/glance/.

Connect to the CLI​

SSH into the appliance as the admin user:

The local terminal
$ ssh admin@<your-cluster-vip>
Password:
Welcome to the Cube Appliance
Enter "help" for a list of available commands
controller>

Import the image​

Choose the import mode based on what you're importing:

  1. As an image: For cloud OS images and templates used to provision new virtual machines.
  2. As a volume: For VM disks exported from another platform (such as VMware or Hyper-V), imported directly into a project as a bootable volume.
  1. Run the image import command:

    Admin CLI terminal
    controller> iaas image import
  2. Select the image source location.

    Choose local to import from the local filesystem or usb to import form a USB device.

    USB storage devices are blocked by default

    To enable USB access, log in as admin and set the tuning option cubesys.probeusb to true via CLI > tuning > configure.

    Admin CLI terminal
    1: usb
    2: local
    Enter index: 2
  3. Select the image file to import.

    Replace the following variables:

    • <image-name>: The name of the image
    • <format>: Any of the following supported virtual disk formats: qcow2, raw, vmdk, vhd, ova, img, and kernel.
    Admin CLI terminal
    1: <image-template-name>.<format>
    # ubuntu2204.qcow2 is an example image to be imported
    Enter index: 1
  4. Enter a name for the image:

    Replace the following variable:

    • <imported-image-name>: Set the image name that will be displayed after the image is imported to CubeCOS.
    Admin CLI terminal
    Specify image name: <imported-image-name>
  5. Select the domain:

    Admin CLI terminal
    1: default
    Enter index: 1
  6. Select the tenant:

    There might be many tenants (projects) within your CubeCOS cluster. Select the tenant (project) as the destination for your image.

    Admin CLI terminal
    1: admin
    Enter index: 1
  7. To import template images or cloud images, select from Bigstack for native CubeCOS images:

    Admin CLI terminal
    Image source:
    1: from Bigstack
    2: from another hypervisor
    Enter index: 1
  8. Select the visibility of the imported template image.

    1. public image: This will be available to all projects in the cluster.
    2. private image: This will only be available to the destination project.
    Admin CLI terminal
    Visibility:
    1: public
    2: private
    Enter index: 1
  9. Select the storage destination:

    The default Ceph SDS is labelled as CubeStorage or any additional integrated external storage.

    Admin CLI terminal
    1: CubeStorage
    Enter index: 1
  10. Select the guest operating system.

    Selecting the correct OS is important

    Choosing the wrong type can significantly impact performance:

    Admin CLI terminal
    Select OS (big impacts to performance if it's windows):
    1: CentOS
    2: Fedora
    3: Ubuntu
    4: Debian
    5: Windows
    6: Rocky
    7: FreeBSD
    8: CoreOS
    9: Arch
    10: Others
    Enter index: 10
  11. Wait for the import to complete:

    Admin CLI terminal
    Importing...
    [14:23:44] Converting image to RAW format ...
    (100.00/100%)
    [14:23:50] Importing image migrate-vol21 ...
    [=============================>] 100%
    # output truncated
    | visibility | public |
    +---------------------+----------------------------------------------------------------------------------+
    [14:26:08] Finished creating image migrate-vol21
    Importing migrate-vol21 complete. It is safe to remove the local image file.