[Yandex Cloud documentation](../../../index.md) > [Yandex Compute Cloud](../../index.md) > [Step-by-step guides](../index.md) > Managing an image > Importing an image from another cloud or folder

# Importing an image from a different cloud or folder

To import an image from a different cloud or folder:

  1. Make sure you have the following roles for the cloud or folder hosting your image:

     * Role for the cloud: `resource-manager.clouds.member`.
     * Role for the folder: `viewer` or `compute.images.user`.

     For more information on role assignment, see [Assigning roles](../../../iam/operations/roles/grant.md).

  1. Import a copy of this image to your folder using the [CLI](../../../cli/quickstart.md):

     If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

     The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

     1. See the description of the CLI command for creating an image:

        ```bash
        yc compute image create --help
        ```

     1. To get a list of available images in the source cloud or folder, run `yc compute image list --folder-name <source_folder_name>`. Here is an example:

        ```bash
        yc compute image list --folder-name my-source-folder
        ```

        Result:

        ```text
        +----------------------+-------------+--------+----------------------+--------+
        |          ID          |    NAME     | FAMILY |     PRODUCT IDS      | STATUS |
        +----------------------+-------------+--------+----------------------+--------+
        | fd8eq6b2fkut******** | first-image |        | f2ehc12fue73******** | READY  |
        +----------------------+-------------+--------+----------------------+--------+
        ```

     1. Select `ID` or `NAME` of the image you are importing.

     1. To import an image, run `yc compute image create --source-image-id=<source_image_ID>`. Here is an example:

        ```bash
        yc compute image create --source-image-id=fd8o0pt9qfbt********
        ```

        Result:

        ```yaml
        done (12s)
        id: fd8eq6b2fkut********
        folder_id: b1g07hj5r6i4********
        created_at: "2024-08-14T17:45:44Z"
        storage_size: "2562719744"
        min_disk_size: "21474836480"
        product_ids:
          - f2ehc12fue73********
        status: READY
        os:
          type: LINUX
        ```

   1. Check the result by running `yc compute image list --folder-name <target_folder_name>`. Here is an example:

      ```bash
      yc compute image list --folder-name my-destination-folder
      ```

      Result:

      ```text
      +----------------------+--------------------+--------+----------------------+--------+
      |          ID          |        NAME        | FAMILY |     PRODUCT IDS      | STATUS |
      +----------------------+--------------------+--------+----------------------+--------+
      | fd8eq6b2fkut******** | first-image        |        | f2ehc12fue73******** | READY  |
      | fd8ghl1n3brd******** | second-image       |        | f2e87com7i95******** | READY  |
      +----------------------+--------------------+--------+----------------------+--------+
      ```