将 Cloud DNS 配置为将 Windows 网域的 DNS 请求转发到 Windows DNS 服务器,以使 Google Cloud Compute Engine 虚拟机能够解析 Active Directory 主机名,例如 Google Cloud NetApp Volumes 使用的 Netbios 名称。如需了解详情,请参阅使用 Cloud DNS 专用转发可用区的最佳实践。
本地 Active Directory 以及在 Compute Engine 上构建的 Active Directory 都需要此权限。
创建 SMB 卷时,NetApp Volumes 会使用安全的动态 DNS 更新来注册其主机名。当您使用 Active Directory DNS 时,此过程效果良好。如果您使用第三方 DNS 服务来托管 Windows 网域的可用区,请确保该服务已配置为支持安全的 DDNS 更新。否则,创建 Flex 服务类型卷将失败。
只有在您创建第一个需要 Active Directory 的卷后,Active Directory 政策设置才会生效。在创建该卷期间,不正确的设置可能会导致卷创建失败。
创建 Active Directory 政策
请按照以下说明使用Google Cloud 控制台或 Google Cloud CLI 创建 Active Directory 政策。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-17。"],[],[],null,["# Create an Active Directory policy\n\nThis page provides instructions for how to create an Active Directory policy.\n\nBefore you begin\n----------------\n\n- Make sure the Active Directory service is reachable, see\n [Active Directory domain controllers](/netapp/volumes/docs/configure-and-use/active-directory/about-ad#active_directory_domain_controller_topologies)\n and [Firewall rules for Active Directory access](/netapp/volumes/docs/before-you-begin/security-considerations#firewall_rules_for_volumes_access).\n\n- Configure Cloud DNS to forward DNS requests for your Windows domain to\n your Windows DNS servers to enable your Google Cloud Compute Engine\n virtual machines to resolve Active Directory hostnames, like the Netbios\n name used by Google Cloud NetApp Volumes. For more information, see\n [Best practices for using Cloud DNS private forwarding zones](/compute/docs/instances/windows/best-practices#use_cloud_dns_private_forwarding_zones).\n This is required for on-premises Active Directory as well as Active Directory\n built on Compute Engine.\n\n- When creating SMB volumes, NetApp Volumes uses secure dynamic\n DNS updates to register its hostname. This process works well when you use\n Active Directory DNS. If you are using a third-party DNS service to host the\n zone for your Windows domain, make sure it is configured to support secure\n DDNS updates. Otherwise, the creation of Flex service type volumes will fail.\n\nActive Directory policy settings don't apply until you create the first volume\nthat requires Active Directory in the specified region. During that volume\ncreation, incorrect settings can cause volume creation failures.\n\nCreate an Active Directory policy\n---------------------------------\n\nUse the following instructions to create an Active Directory policy using the\nGoogle Cloud console or Google Cloud CLI. \n\n### Console\n\nUse the following instructions to create an Active Directory policy in the\nGoogle Cloud console:\n\n1. Go to the **NetApp Volumes** page in the Google Cloud console.\n\n [Go to NetApp Volumes](https://console.cloud.google.com/netapp/volumes)\n2. Select **Active Directory policies**.\n\n3. Click **Create**.\n\n4. In the **Create Active Directory Policy** dialog, fill out the fields\n shown in the following table.\n\n Required fields are marked with an asterisk (\\*).\n\n5. Click **Create** . For Standard, Premium, and Extreme service levels: after\n creating an Active Directory policy and attaching it with a storage pool, you\n should [test the connection to the Active Directory service](/netapp/volumes/docs/configure-and-use/active-directory/test-ad-policy-connection).\n\n### gcloud\n\nCreate an Active Directory policy: \n\n```bash\n gcloud netapp active-directories create CONFIG_NAME \\\n --project=PROJECT_ID \\\n --location=LOCATION \\\n --dns=DNS_LIST \\\n --domain=DOMAIN_NAME \\\n --net-bios-prefix=NetBIOS_PREFIX \\\n --username=USERNAME \\\n --password=PASSWORD \\\n \n```\n\nReplace the following information:\n\n- \u003cvar translate=\"no\"\u003eCONFIG_NAME\u003c/var\u003e: the name of the config you want to create.\n The config name must be unique per region.\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: project ID you are creating the\n Active Directory policy in.\n\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the region of you want to create the\n config in. Google Cloud NetApp Volumes only supports one config per region.\n\n- \u003cvar translate=\"no\"\u003eDNS_LIST\u003c/var\u003e: a list separated by commas of up to three\n IPv4 addresses of Active Directory DNS servers.\n\n- \u003cvar translate=\"no\"\u003eDOMAIN_NAME\u003c/var\u003e: the fully qualified domain name of the\n Active Directory.\n\n- \u003cvar translate=\"no\"\u003eNetBIOS_PREFIX\u003c/var\u003e: NetBIOS name prefix of the server\n you want to create. A five-character random ID generates automatically, such\n as `-6f9a`, and appends to the prefix.\n\n The full UNC share path has the following format: \n\n ```bash\n \\\\\u003cNetBIOS_PREFIX\u003e-\u003c4-random-hexletters\u003e.\u003cDOMAIN_NAME\u003e\\\u003cSHARE_NAME\u003e.\n ```\n- \u003cvar translate=\"no\"\u003eUSERNAME\u003c/var\u003e: The name of a domain user\n with permission to join the domain.\n\n- \u003cvar translate=\"no\"\u003ePASSWORD\u003c/var\u003e: Password for the username.\n\nFor more information on additional optional flags, see [Google Cloud SDK documentation on Active Directory creation](/sdk/gcloud/reference/netapp/active-directories).\n\nWhat's next\n-----------\n\n[Test the Active Directory policy connection](/netapp/volumes/docs/configure-and-use/active-directory/test-ad-policy-connection)."]]