---
title: "Import a virtual machine to the public cloud"
sidebar_label: "Import a virtual machine"
sidebar_position: 5
description: "How to import a virtual machine: create a catalog, upload a virtual machine template or OS image, and how to resolve import errors"
---

import Formbricks from '@theme/MDXComponents/Formbricks'
import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
import {TabItemLabel} from '@selectel/docux/components'

# Import a virtual machine to the public cloud

Through the VMware Cloud Director® panel, you can upload OS images (ISO) and virtual machine templates (`.ova`, `.ovf`) to content libraries. OS images and VM templates are stored in catalogs. You can share catalog data with other users or organizations within Cloud Director or publish it for access by organizations from the outside.

You can upload files to an existing catalog or create a new one.

In virtual data centers in the [cluster](/public-cloud/about/about-public-cloud.mdx#clusters) SILVER-1, there are restrictions on importing custom VM ISO images. If you encounter issues with importing, [create a ticket](https://my.selectel.ru/tickets/create) and provide a link to the ISO image.

1. Optional: [create a catalog](#create-catalog).
2. [Upload a virtual machine template to the catalog](#upload-vm-template).
3. [Upload an OS image](#upload-os-image).

## 1. Optional: create a catalog \{#create-catalog}

1. From the [control panel](https://my.selectel.ru/vmware/), open the Cloud Director panel: in the top menu, click **Products** → **Cloud powered by VMware** → section **Cloud Director**.
2. Open the virtual data center page.
3. Open the **Content Hub** tab.
4. Go to the **Catalogs** section.
5. Click **New**.
6. In the **Name** field, enter the catalog name.
7. Optional: in the **Description** field, enter a catalog description.
8. Optional: to select a storage policy, turn on the **Pre-provision on specific storage policy** switch and select a policy.
9. Click **OK**. The new catalog will appear in the list of available catalogs.

## 2. Upload a virtual machine template \{#upload-vm-template}

1. From the [control panel](https://my.selectel.ru/vmware/), open the Cloud Director panel: in the top menu, click **Products** → **Cloud powered by VMware** → section **Cloud Director**.

2. Open the virtual data center page.

3. Open the **Content Hub** tab.

4. Go to the **Content** section.

5. Click **ADD** → **OVA/OVF**.

6. At the **Select Source** stage:

   6.1. Upload the template:

   * in the **URL** field, enter the URL of the `.ovf` /`.ova` file;
   * or in the **Browse** field, upload the file from your computer.

   6.2. Click **Next**.

7. At the **Select vApp Template Name** stage:

   7.1. In the **Name** field, enter the template name.

   7.2. Optional: in the **Description** field, enter a template description.

   7.3. In the **Catalog** field, select the catalog to which you want to upload the template.

   7.4. Click **Next**.

8. At the **Ready to Complete** stage:

   8.1. Check the data.

   8.2. Click **Finish**. The upload time depends on the size of the template and your internet connection speed. The new template will appear in the **Content Libraries** → **vApp Templates**.

## 3. Upload an OS image \{#upload-os-image}

1. From the [control panel](https://my.selectel.ru/vmware/), open the Cloud Director panel: in the top menu, click **Products** → **Cloud powered by VMware** → section **Cloud Director**.
2. Open the virtual data center page.
3. Go to the **Content** section.
4. Click **ADD** → **Media**.
5. In the **Catalog** field, select the catalog to which you want to upload the image.
6. In the **Select media to upload** field, select the ISO file to upload.
7. Optional: in the **Name** field, change the name that was filled in automatically.
8. Optional: in the **Description** field, enter an image description.
9. Click **OK**. The upload time depends on the size of the template and your internet connection speed. The new template will appear in the list of available templates in the **Content Libraries** → **Media & Other**.
10. Optional: after installing the OS from the ISO, install the integration package [VMware Tools™](/public-cloud/manage-public-cloud/vmware-tools.mdx).

## Error when importing a template \{#error-when-importing-template}

If an import task for a VM template in `.ova` format fails, it can be fixed in Cloud Director or by using the VMware `vcd-cli`.

<Tabs queryString="tool">
  <TabItem value="cloud-director" default>
    <TabItemLabel>
      Cloud Director
    </TabItemLabel>

    1. Unpack the OVA file with an archiver (e.g., tar, 7zip). The extracted folder will contain the VM template files in `.ovf`, `.mf` and `.vmdk`.
    2. [Upload the template](#upload-vm-template). When performing step 6 in the **Select Source** section, upload all files extracted upon unpacking the `.ova`.
  </TabItem>

  <TabItem value="vcd-cli">
    <TabItemLabel>
      vcd-cli
    </TabItemLabel>

    Through vcd-cli, importing a VM template is only possible in `.ova` format. Files in other formats will not be recognized and will be placed in the **Media & Other** section; more details are in the [vcd-cli documentation](http://vmware.github.io/vcd-cli/commands.html).

    1. Install Python 3.6 or higher and the [vmware.github.io/vcd-cli](http://vmware.github.io/vcd-cli/install.html) utility. For virtual machines with Windows OS, you may need to install Microsoft C++ Build Tools, which can be downloaded from the [Microsoft website](https://visualstudio.microsoft.com/ru/visual-cpp-build-tools/).

    2. Connect to the organization:

       ```bash
       vcd login <vcd> <s-xxxx> <username>
       ```

       Specify:

       * `<vcd>` — the virtual data center address:

         * Saint Petersburg — `vcd.selectel.ru`
         * Moscow — `vcd-msk.selectel.ru`
       * `<s-xxxx>` — the organization name; you can view this in the Cloud Director address bar or in the [control panel](https://my.selectel.ru/) under **Cloud powered by VMware** in the list of organizations;
       * `<username>` — the username; you can view this in the [control panel](https://my.selectel.ru/vmware/users/) under **Users**.

    3. Enter your password.

    4. Upload the `.ova` image to the desired catalog:

       ```bash
       vcd catalog upload <catalog_name> <path>
       ```

       Specify:

       * `<catalog_name>` — catalog name;
       * `<path>` — path to the image.

    5. View the list of catalogs in the organization:

       ```bash
       vcd catalog list
       ```
  </TabItem>
</Tabs>

<Formbricks />
