API Doc
Search Docs...
⌘ K
OverviewDeploymentManagementOperationSecurityReferenceGlossary

Cloning or converting a virtual machine into a VM template

Prerequisite

The virtual machine is in the Shutdown state.

Procedure

  1. In the left sidebar of the AOC Cluster page, click the VM tab to navigate to the virtual machine list.

  2. Click the target virtual machine. In the details panel, click ... > Create VM template at the upper-right of the details panel. Select Clone VM as VM template or Convert VM into VM template.

  3. In the dialog box, enter the name of the VM template. A default name in the format of virtual machine name-template is preset to the field, which can be manually modified.

  4. (Optional) If you have selected Clone VM as VM template in Step 2, you can add a description to the template.

  5. (Optional) Enable VM Initialization Tool installed after confirming that cloud-init or cloudbase-init is installed in the virtual machine to be cloned or converted into the VM template and that you have modified the corresponding configuration files when you need to use this VM template to create a virtual machine that uses cloud-init or cloudbase-init for initialization.

    Note:

    • cloud-init is an open-source tool for the Linux platform that can complete a series of initialization configurations for Linux virtual machines, including configuring the default language region, host name, SSH authentication key and more. Since cloud-init does not support the Windows platform, Windows virtual machines can use cloudbase-init as an alternative. You can refer to Virtual Machine Initialization Guide (cloud-init) or Virtual Machine Initialization Guide (cloudbase-init) for detailed instructions.
    • If cloud-init or cloudbase-init is not installed in the virtual machine to be cloned or converted to the VM template, do not enable VM Initialization Tool installed. Otherwise, you will not be able to successfully configure the initialization data when you create a virtual machine with this template.
  6. Select the datastore to hold the VM template.

    • ABS datastore

      After selecting it, select at least one cluster to hold the VM template.

    • VCFS datastore

      After selecting it, select separate datastores for the VM template's configuration file data and disk data. Configuration file data and disk data can be stored on different datastores. Disk data can also be assigned to different datastores at the volume level.

      • Configuration file data: Select the datastore in the drop-down list.

      • Disk data: Select a datastore in the drop-down list or Customize by volume. If you select a datastore, all virtual volumes are stored in the same datastore. If you select Customize by volume, select at least one datastore for each virtual volume.

        If you need to store the VM template on other datastores, click + Add storage configuration at the lower left and complete datastore configuration for configuration file data and disk data.

    Information:

    • You can select both ABS datastore and VCFS datastore.
    • The storage policy of the template depends on the datastore type used by the source virtual machine's cluster:
      • If the datastore type used by the source virtual machine's cluster matches the type selected here, the storage policy of the template remains consistent with that of the source virtual machine.
      • If the source virtual machine's cluster uses a VCFS datastore and you select ABS datastore here, the storage policy of the template is automatically adjusted to 3 replicas, while the provisioning method remains consistent with that of the source virtual machine.
      • If the source virtual machine's cluster uses an ABS datastore and you select VCFS datastore here, the provisioning method of the template remains consistent with that of the source virtual machine. If the source virtual machine uses thick provisioning, the template uses Thick provisioning lazily zeroed.
  7. Click Convert or Clone.

    After the VM template is created, you can view the template in the VM template list in the content library.