Skip to main content
所有云提供商
  • Amazon Web Services
  • Google Cloud
  • Microsoft Azure
  • 所有云提供商
简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。

将现有 Cloud Volumes ONTAP 部署转换为 Infrastructure Manager

贡献者 netapp-manini

从 2026 年 2 月 9 日起,Google Cloud 中的新 Cloud Volumes ONTAP 部署可以使用 Google Cloud Infrastructure Manager。Google 即将弃用 Google Cloud Deployment Manager,转而使用 Infrastructure Manager。因此,您需要手动运行过渡工具,将现有 Cloud Volumes ONTAP 部署从 Deployment Manager 转换为 Infrastructure Manager。这是一个一次性流程,之后您的系统将自动开始使用 Infrastructure Manager。

关于此任务

转换工具在 "NetApp 支持站点" 中可用,并创建以下工件:

  • Terraform 工件,保存在 `conversion_output/deployment_name`中。

  • 转换摘要,保存于 conversion_output/batch_summary_<deployment_name>_<timestamp>.json.

  • 调试日志,保存在 <gcp project number>-<region>-blueprint-config/<cvo name> 目录中。您需要这些日志来进行故障排除。 <gcp project number>-<region>-blueprint-config 存储桶存储 Terraform 日志。

注意

使用 Infrastructure Manager 的 Cloud Volumes ONTAP 系统将数据和记录存储在 Google Cloud Storage 存储桶中。您可能需要为这些存储桶支付额外费用,但不要编辑或删除存储桶或其内容:

  • gs://netapp-cvo-infrastructure-manager-<project id>:适用于 ONTAP 版本和用于新 Cloud Volumes ONTAP 部署的 SVM Terraform 模板。在其中, dm-to-im-convert 存储桶包含 Cloud Volumes ONTAP Terraform 文件。

  • <gcp project number>-<region>-blueprint-config:用于存储 Google Cloud Terraform 工件。

开始之前
  • 确保您的 Cloud Volumes ONTAP 系统为 9.16.1 或更高版本。

  • 请确保未从 Google Cloud Console 手动编辑任何 Cloud Volumes ONTAP 资源或其属性。

  • 请确保已启用 Google Cloud API。请参阅 "启用 Google Cloud API"。请确保与其他 API 一起启用 Google Cloud Quotas API。

  • 验证 NetApp Console 代理的服务帐户是否具有所需的所有权限。请参阅 "控制台代理的 Google Cloud 权限"

    对于专用模式部署,请确保以下附加先决条件:
    • 确保拥有最新的 Console 代理版本。从 NetApp 支持站点下载产品安装程序,然后在主机上手动安装代理,以便代理可以使用 Infrastructure Manager API。

    • 如果在专用模式下运行工具,请确保已与其他 API 一起启用 Cloud Build API "启用 Google Cloud API"

    • 确保已完成网络配置并为专用模式部署创建工作者池。请参阅 "适用于专用模式部署的 Infrastructure Manager 配置"

  • 转换工具使用以下域。在网络中的端口 443 上启用它们:

    端口 协议 方向 目的

    cloudresourcemanager.googleapis.com

    443

    TCP

    EGRESS

    项目验证

    deploymentmanager.googleapis.com

    443

    TCP

    EGRESS

    部署发现

    config.googleapis.com

    443

    TCP

    EGRESS

    基础架构管理器 API

    storage.googleapis.com

    443

    TCP

    EGRESS

    GCS 存储桶操作

    iam.googleapis.com

    443

    TCP

    EGRESS

    服务帐户验证

    compute.googleapis.com

    443

    TCP

    EGRESS

    Google Cloud 和 Terraform Import 和 Plan 使用的计算 API 调用

    cloudbuild.googleapis.com

    443

    TCP

    EGRESS

    仅专用模式需要构建操作

    openidconnect.googleapis.com

    443

    TCP

    EGRESS

    身份验证

    oauth2.googleapis.com

    443

    TCP

    EGRESS

    OAuth2 令牌交换

    registry.terraform.io

    443

    TCP

    EGRESS

    Terraform 提供程序注册表

    releases.hashicorp.com

    443

    TCP

    EGRESS

    Terraform 二进制文件下载

    apt.releases.hashicorp.com

    443

    TCP

    EGRESS

    HashiCorp APT 存储库

    us-central1-docker.pkg.dev

    443

    TCP

    EGRESS

    GCP Artifact Registry

    metadata.google.internal

    80

    HTTP

    内部

    VM 元数据和身份验证令牌

    pypi.org

    443

    TCP

    EGRESS

    Python 软件包索引

    files.pythonhosted.org

    443

    TCP

    EGRESS

    Python 软件包下载

    checkpoint-api.hashicorp.com

    443

    TCP

    EGRESS

    Terraform 版本检查

    download.docker.com

    443

    TCP

    EGRESS

    Docker APT 仓库

    security.ubuntu.com

    80/443

    TCP

    EGRESS

    Ubuntu 安全更新

    *.gce.archive.ubuntu.com

    80

    TCP

    EGRESS

    Ubuntu 软件包镜像

准备运行工具的环境

在运行工具之前运行这些步骤。

步骤
  1. 创建角色并将其附加到服务帐户:

    1. 创建具有以下权限的 YAML 文件:

      title: NetApp Dm TO IM Convert Solution
      description: Permissions for the service account associated with the VM where the tool will run.
      stage: GA
      includedPermissions:
      - compute.addresses.get
      - compute.disks.get
      - compute.forwardingRules.get
      - compute.healthChecks.get
      - compute.instanceGroups.get
      - compute.instances.get
      - compute.regionBackendServices.get
      - config.deployments.create
      - config.deployments.get
      - config.deployments.getLock
      - config.deployments.lock
      - config.deployments.unlock
      - config.deployments.update
      - config.deployments.delete
      - config.deployments.updateState
      - config.operations.get
      - deploymentmanager.deployments.get
      - deploymentmanager.deployments.list
      - deploymentmanager.manifests.get
      - iam.serviceAccounts.get
      - storage.buckets.create
      - storage.objects.create
      - storage.objects.delete
      - storage.objects.get
      - storage.objects.list
      包括专用模式部署的其他权限

      如果在私有模式下运行此工具,请将 `cloudbuild.workerpools.get`权限也添加到 YAML 文件。

    2. 使用 YAML 文件中定义的权限在 Google Cloud 中创建自定义角色。
      `gcloud iam roles create dmtoim_convert_tool_role --project=PROJECT_ID \
      --file=YAML_FILE_PATH`有关详细信息,请参阅 "创建和管理自定义角色"

    3. 将自定义角色附加到将用于创建 VM 的服务帐户。

    4. 将 `roles/iam.serviceAccountUser`角色添加到此服务帐户。请参阅 "服务账户概述"

  2. 使用以下配置创建虚拟机。在此虚拟机上运行工具。

    • 机器类型:Google Compute Engine 机器类型 e2-medium

    • 操作系统:根据您的要求,选择以下任一图像:

      • Ubuntu 25.10 AMD64 精简版(镜像:ubuntu-minimal-2510-amd64)

      • SUSE Linux Enterprise Server 15 SP7 x86_64

    • 网络:允许 HTTP 和 HTTPS 的防火墙

    • 磁盘大小:20GB

    • 安全:服务帐户:您创建的服务帐户

    • 安全性:访问范围 - 为每个 API 设置访问权限:

      • 云平台:已启用

      • Compute Engine:只读

      • 存储:只读(默认)

      • Google Cloud Logging(以前称为 Stackdriver Logging)API:仅写入(默认)

      • Stackdriver Monitoring(现已成为 Google Cloud Operations 的一部分)API:仅写入(默认)

      • 服务管理:只读(默认)

      • 服务控制:已启用(默认)

      • Google Cloud Trace(以前称为 Stackdriver Trace):仅写入(默认)

  3. 使用 SSH 连接到新创建的虚拟机: gcloud compute ssh dmtoim-convert-executor-vm --zone <region where VM is deployed>

  4. 使用您的 NSS 凭据从 "NetApp 支持站点"下载转换工具: wget <download link from NetApp Support site>

  5. 提取下载的 TAR 文件: unzip <downloaded file name>

Ubuntu
  1. 下载并安装以下必备软件包:

    • Docker:28.2.2 build 28.2.2-0ubuntu1 或更高版本

    • Terraform:1.14.1 或更高版本

    • Python:3.13.7、python3-pip、python3 venv

      sudo apt-get update
      sudo apt-get install python3-pip python3-venv -y
      wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
      echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com noble main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
      sudo apt update && sudo apt install terraform
      sudo apt-get install -y docker.io
      sudo systemctl start docker

      Google Cloud CLI gcloud 已预安装在虚拟机上。

SUSE Linux Enterprise Server
  1. 设置 Python: sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 2

  2. 安装 pip3 以安装软件包: python3.11 -m ensurepip --upgrade

  3. 安装 Terraform:

    wget https://releases.hashicorp.com/terraform/1.7.4/terraform_1.7.4_linux_amd64.zip
    unzip terraform_1.7.4_linux_amd64.zip
    sudo mv terraform /usr/local/bin/
    rm terraform_1.7.4_linux_amd64.zip
  4. 安装 Google Cloud SDK (gcloud)

    curl https://sdk.cloud.google.com | bash
    exec -l $SHELL

运行转换工具

这些步骤适用于运行转换工具的 Ubuntu 和 SUSE Linux Enterprise Server。

步骤
  1. 将当前用户添加到 Docker 组中,以便该工具可以在没有 `sudo`权限的情况下使用 Docker。

    sudo usermod -aG docker $USER
    newgrp docker
  2. 安装转换工具:

    cd <folder where you extracted the tool>
     ./install.sh

    这将在隔离环境中安装工具, dmconvert-venv,并验证是否已安装所有必需的软件包。

  3. 输入安装工具的环境: source dmconvert-venv/bin/activate

  4. non-sudo 用户身份运行转换工具。请确保使用与 Console 代理的服务帐户相同的服务帐户,并且服务帐户具有所有 "Google Cloud Infrastructure Manager 的必要权限"

    dmconvert \
    --project-id=<the Google Cloud project ID for the Cloud Volumes ONTAP deployment> \
    --cvo-name=<Cloud Volumes ONTAP system name> \
    --service-account=<the service account attached to the Console agent>
    在私有模式部署中运行工具

    指定 --worker-pool 参数以在私有模式部署中运行工具。有关工作池配置,请参阅 "适用于专用模式部署的 Infrastructure Manager 配置"

    dmconvert \
    --project-id=<the Google Cloud project ID for the Cloud Volumes ONTAP deployment> \
    --cvo-name=<Cloud Volumes ONTAP system name> \
    --service-account=<the service account attached to the Console agent> \
    --worker-pool=<worker pool name>
完成后

该工具显示所有 Cloud Volumes ONTAP 系统和 SVM 详细信息的列表。当它完成运行时,您可以看到所有已转换系统的状态。每个转换后的系统都以 <system-name-imdeploy> 格式显示在 Google Console 的 Infrastructure Manager 下,表明 Console 现在使用 Infrastructure Manager API 来管理该 Cloud Volumes ONTAP 系统。

注意 转换后,请勿在 Google Cloud Console 中删除 Deployment Manager 的部署对象。此部署对象包含回滚转换的系统可能需要的信息。

如果需要回滚转换,则必须使用相同的 VM。如果已转换所有系统,并且不需要回滚到 Deployment Manager,则可以删除 VM。

回滚转换

如果不想继续转换,可以按照以下步骤回滚到 Deployment Manager:

步骤
  1. 在同一个 为运行工具而创建的虚拟机 上,运行此命令:

    dmconvert \
    --project-id=<the Google Cloud project ID for the Cloud Volumes ONTAP deployment> \
    --cvo-name=<Cloud Volumes ONTAP system name> \
    --service-account=<the service account attached to the Console agent> \
    --rollback
  2. 等待回滚完成。