---
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

Using 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 external organizations.

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, there are restrictions on importing custom VM ISO images. If you encounter issues with import, [submit 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** → **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 description for the catalog.
8. Optional: to select a storage policy, turn on the **Pre-provision on specific storage policy** toggle and select the 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** → **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** step:

   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** step:

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

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

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

   7.4. Click **Next**.

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

   8.1. Check the data.

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

## 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** → **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 upload the image to.
6. In the **Select media to upload** field, select the ISO file to upload.
7. Optional: in the **Name** field, change the automatically populated name.
8. Optional: in the **Description** field, enter a description for the image.
9. Click **OK**. The upload time depends on the size of the template being uploaded and the internet connection speed. The new template will appear in the list of available templates in **Content Libraries** → **Media & Other**.
10. Optional: after installing the OS from the ISO, install the [VMware Tools™](/public-cloud/manage-public-cloud/vmware-tools.mdx) integration package.

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

If the VM template import in `.ova` format fails with an error, it can be fixed in Cloud Director or using the VMware `vcd-cli` utility.

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

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

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

    Via 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; for more information, see the [vcd-cli documentation](http://vmware.github.io/vcd-cli/commands.html).

    1. Install Python version 3.6 or higher and the [vmware.github.io/vcd-cli](http://vmware.github.io/vcd-cli/install.html) utility. For Windows-based virtual machines, 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>` — virtual data center address:

         * Saint Petersburg — `vcd.selectel.ru`
         * Moscow — `vcd-msk.selectel.ru`
       * `<s-xxxx>` — organization name, which can be found 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>` — username, which can be found 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 />
