[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-31 (世界標準時間)。"],[],[],null,["This document shows how to specify vSphere objects in cluster configuration files when the vCenter configuration contains parent folders. It also documents the naming rules applied by preflight validations starting with 1.13.0.\n\nAssuming the following example vCenter configuration indicating the path from vCenter root to the specific object\n\n| Hosts and Clusters | VMs and Templates | Storage | Network |\n|----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|--------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|\n| ``` my-vcenter my-datacenter-folder my-datacenter my-cluster-folder my-cluster my-resourcepool ``` | ``` my-vcenter my-datacenter-folder my-datacenter my-vm-folder ``` | ``` my-vcenter my-datacenter-folder my-datacenter my-storage-folder my-datastore ``` | ``` my-vcenter my-datacenter-folder my-datacenter my-network-folder my-portgroup ``` |\n\nTo create an Anthos cluster in my-resource-pool and my-vm-folder using my-datastore and my-portgroup, specify the following admin cluster configuration:\n\n```\n vCenter:\n address: \"my-vcenter\"\n datacenter: \"my-datacenter-folder/my-datacenter\"\n cluster: \"my-cluster-folder/my-cluster\"\n resourcePool: \"my-resourcepool\"\n datastore: \"my-datastore\"\n folder: \"my-vm-folder\"\n network:\n vCenter:\n networkName: \"my-network-folder/my-portgroup\"\n\n \n```\n\nIf your resource pool is nested under another resource pool, specify the full\npath to your resource pool in your admin cluster configuration, as shown in the\nfollowing example:\n\n```\n vCenter:\n address: \"my-vcenter\"\n datacenter: \"my-datacenter-folder/my-datacenter\"\n cluster: \"my-cluster-folder/my-cluster\"\n resourcePool: \"my-cluster-folder/my-cluster/Resources/my-resourcepool/my-nested-resourcepool\"\n datastore: \"my-datastore\"\n folder: \"my-vm-folder\"\n network:\n vCenter:\n networkName: \"my-network-folder/my-portgroup\"\n \n```\n\nTo create an Anthos admin cluster in the default ResourcePool using my-datastore and my-portgroup, specify the following cluster configuration:\n\n```\n vCenter:\n address: \"my-vcenter\"\n datacenter: \"my-datacenter-folder/my-datacenter\"\n cluster: \"my-cluster-folder/my-cluster\"\n resourcePool: \"my-cluster-folder/my-cluster/Resources\"\n datastore: \"my-datastore\"\n folder: \"my-vm-folder\"\n network:\n vCenter:\n networkName: \"my-network-folder/my-portgroup\"\n \n```\n\nIf your vm folder is nested under another vm folder, specify the full\npath to your vm folder in your admin cluster configuration, as shown in the\nfollowing example:\n\n```\n vCenter:\n address: \"my-vcenter\"\n datacenter: \"my-datacenter-folder/my-datacenter\"\n cluster: \"my-cluster-folder/my-cluster\"\n resourcePool: \"my-resourcepool\"\n datastore: \"my-datastore\"\n folder: \"/my-datacenter-folder/my-datacenter/vm/my-vm-folder/my-nested-vm-folder\"\n network:\n vCenter:\n networkName: \"my-network-folder/my-portgroup\"\n \n```\n\nNote that you must include the first \"/\" in your vm folder full path.\n\nThis also applies to user cluster and admin workstation configuration since vCenter section is common across these configuration files.\n\nNaming Rules\n\nDo not specify the parent folder while specifying a datastore as the datastore name must be unique within a datacenter. If a folder is specified, the following error is returned:\n\n```\n Datastore name 'storage-folder/my-datastore' should not contain parent folders\n```\n\nFor all other vSphere object types the parent folder should be specified when vCenter configuration contains parent folders.\nIf the required parent folders are not specified in the cluster configuration but present in the vCenter configuration, the following error is returned:\n\n```\n Parent folder is not specified for cluster, you must specify the full path 'clusters/my-cluster' in the cluster field \n```\nStarting with Anthos Clusters on VMware 1.13.0, vSphere object names are validated according to the above rules for the following operations:\n\n\u003cbr /\u003e\n\n- gkectl create\n- gkectl check-config\n\nThere is still a chance that a vSphere object resolution is ambiguous under following example situations\n\n- A cluster is upgraded from a previous version which violates the naming rules and vCenter configuration contains a conflicting folder/object, and\n- Objects with conflicting names were not present during cluster creation but added later\n\n\u003cbr /\u003e\n\nFor example, consider the given vCenter configuration\n\n```\n \nmy-vcenter\n my-datacenter-folder\n my-datacenter\n my-cluster-folder\n my-cluster\n my-resourcepool\n \n```\n\nNext, if the following hierarchy is added later\n\n```\nmy-vcenter\n my-datacenter-folder\n my-datacenter\n my-cluster\n my-resourcepool\n \n```\n\nthe resolution of 'my-resourcepool' is ambiguous if the configuration files did not specify the my-cluster-folder during cluster creation\n\nYou may encounter the following error:\n` path 'my-resourcepool' resolves to multiple resource pools `\n\nMore generally, the vSphere library returns the following error message when the object resolution is ambiguous:\n\n```\n path xxx resolves to multiple objects \n```\n\n\u003cbr /\u003e\n\nTo fix the error, ensure that the path does not contain conflicting object names (such as one within a folder and one without).\nRemove or rename the object which does not belong to the cluster and causes the conflict. Since the vSphere fields are immutable once the cluster is created, a new cluster creation is required if the conflict cannot be resolved by modifying vCenter configuration."]]