Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Criar uma rede do VMware Engine
Neste documento, descrevemos como criar uma rede do VMware Engine Standard usando o portal do VMware Engine, a CLI gcloud ou a API. É possível criar várias redes do VMware Engine para isolar nuvens privadas e definir peerings de rede VPC exclusivos. As redes do VMware Engine processam conexões de e para nuvens privadas de acordo com uma política de rede definida separadamente.
Antes de começar
Google Cloud CLI e requisitos da API
Para usar a ferramenta de linha de comando gcloud ou a API para gerenciar os recursos do VMware Engine, recomendamos configurar as ferramentas conforme descrito abaixo.
Os exemplos de API neste conjunto de documentação usam a ferramenta de linha de comando cURL para
consultar a API. Um token de acesso válido é necessário como parte da solicitação
cURL. Há muitas maneiras de conseguir um token de acesso válido. As etapas a seguir
usam a ferramenta gcloud para gerar um token de acesso:
Faça login no Google Cloud:
gcloud auth login
Gerar token de acesso e exportar para TOKEN:
export TOKEN=`gcloud auth print-access-token`
Verifique se o TOKEN está definido corretamente:
echo $TOKEN
Use agora o token de autorização nas solicitações para a API. Exemplo:
Os exemplos de código Python nesta documentação usam a biblioteca do VMware Engine para se comunicar com a API. Para usar essa abordagem, a biblioteca precisa estar instalada e o Application Default Credentials precisa estar configurado.
Faça o download e instale a biblioteca Python:
pip install google-cloud-vmwareengine
Execute os comandos no shell para configurar as informações do ADC:
Clique em Selecionar um projeto e escolha a organização, a pasta ou o projeto
em que você quer criar a rede do VMware Engine.
Clique em Criar. Um formulário de criação de rede do VMware Engine será aberto.
Digite um nome de rede do VMware Engine.
Insira uma descrição para a rede, por exemplo, "My standard VEN 1", e
clique em Criar.
Opcional: confirme a criação da rede navegando até o item de menu Redes do VMware Engine. Todas as redes do VMware Engine estão listadas na tabela nesta página.
A lista a seguir descreve cada campo durante a criação da política mais detalhadamente:
Nome: identificador exclusivo permanente da rede do VMware Engine.
Descrição: informações adicionais que ficam visíveis na página de detalhes da rede do VMware Engine.
Tipo de rede: identificador de tipo de rede usado para dar suporte a casos de uso de rede
e implantações de nuvem privada legada.
Região: depende se você está usando as redes padrão
do VMware Engine ou legado do VMware Engine.
Para redes legadas, essa é a região em que a rede tem
conectividade.
Para redes padrão, este campo é sempre definido como global.
gcloud
Para criar uma rede do VMware Engine usando a CLI gcloud, faça o seguinte:
Opcional: se você quiser listar todas as redes do VMware Engine para confirmar a criação da nova rede, use o comando gcloud vmware networks list:
gcloud vmware networks list \
--location=global
API
Para criar uma rede do VMware Engine usando a API VMware Engine, faça o seguinte:
Para criar uma rede do VMware Engine, faça uma solicitação POST:
POST "https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/global/vmwareEngineNetworks?vmware_engine_network_id=NETWORKD_ID"
'{
"type": "standard",
"description": "DESCRIPTION"
}'
Substitua:
PROJECT_ID: o ID do projeto em que você quer criar a rede.
NETWORK_ID: o ID da sua rede do VMware Engine.
DESCRIPTION: uma descrição para esta rede.
Opcional: para listar todas as redes do VMware Engine e confirmar a criação da nova rede, faça uma solicitação GET.
Substitua PROJECT_ID pelo ID do projeto em que a
rede está localizada.
GET https://vmwareengine.googleapis.com/v1/projects//locations/global/vmwareEngineNetworks
Atualizar uma rede do VMware Engine
Atualize uma rede do VMware Engine usando o console Google Cloud ,
a CLI gcloud ou a API VMware Engine:
Console
No Google Cloud console, acesse a página Redes do VMware Engine.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-18 UTC."],[],[],null,["# Create a VMware Engine network\n==============================\n\nThis document describes how to create a *Standard VMware Engine\nNetwork* using the VMware Engine portal, gcloud CLI, or\nAPI. You can create multiple VMware Engine networks to isolate\nprivate clouds and define unique VPC network peerings. VMware Engine\nnetworks handle connections to and from private clouds according to a [network\npolicy](/vmware-engine/docs/preview/networking/network-policies) that you define separately.\n| **Note:** Projects created before November 2023 have *Legacy VMware Engine Networks* that are no longer available in newer projects. Google automatically created these networks for you; as such, these steps are only applicable for standard networks. For more information on legacy and standard networks, review the [Network overview](/vmware-engine/docs/networking/vmware-engine-network).\n\nBefore you begin\n----------------\n\n### Google Cloud CLI and API requirements\n\nTo use the `gcloud` command line tool or the API to manage your VMware Engine\nresources, we recommend configuring the tools as described below. \n\n### gcloud\n\n1. Set your default project ID:\n\n ```\n gcloud config set project PROJECT_ID\n ```\n2. Set a default region and zone:\n\n ```\n gcloud config set compute/region REGION\n ``` \n\n ```\n gcloud config set compute/zone ZONE\n ```\n\nFor more information on the `gcloud vmware` tool,\n[see the Cloud SDK reference docs](/sdk/gcloud/reference/vmware).\n\n### API\n\nAPI examples in this documentation set use the `cURL` command-line tool to\nquery the API. A valid access token is required as part of the `cURL`\nrequest. There are many ways to get a valid access token; the following\nsteps use the `gcloud` tool to generate a access token:\n\n1. Login to Google Cloud:\n\n ```\n gcloud auth login\n ```\n2. Generate access token and export to TOKEN:\n\n ```\n export TOKEN=`gcloud auth print-access-token`\n ```\n3. Verify that TOKEN is set properly:\n\n ```\n echo $TOKEN\n ```\n\nNow, use the authorization token in your requests to the API. For example: \n\n```\ncurl -X GET -H \"Authorization: Bearer \\\"$TOKEN\\\"\" -H \"Content-Type: application/json; charset=utf-8\" https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations\n```\n\n### Python\n\nPython code samples in this documentation use the [VMware Engine library](https://cloud.google.com/python/docs/reference/vmwareengine/latest) to communicate with the API. To be able to use this approach, the library needs to be installed and the [Application Default Credentials](https://cloud.google.com/docs/authentication/application-default-credentials) should be configured.\n\n1. Download and install the Python library:\n\n ```\n pip install google-cloud-vmwareengine\n ```\n2. Configure the ADC information by executing those command in your shell:\n\n ```\n gcloud auth application-default login\n ```\n\n Or, use a Service Account key file: \n\n ```\n export GOOGLE_APPLICATION_CREDENTIALS=\"FILE_PATH\"\n ```\n\nFor more information about the library, visit the [reference page](/python/docs/reference/vmwareengine/latest) or view [code samples on GitHub](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/vmwareengine/cloud-client).\n\nCreate a VMware Engine network\n------------------------------\n\nCreate a VMware Engine network using the Google Cloud console,\ngcloud CLI, or VMware Engine API: \n\n### Console\n\nTo create a VMware Engine network using the VMware Engine:\n\n1. In the Google Cloud console, go to the **VMware Engine networks** page.\n\n [Go to VMware Engine networks](https://console.cloud.google.com/vmwareengine/networks)\n2. Click **Select a project** and then select the organization, folder, or project\n where you want to create the VMware Engine network.\n\n3. Click **Create**. A VMware Engine network creation form opens.\n\n4. Enter a VMware Engine network name.\n\n5. Enter a description for the network, for example \"My standard VEN 1\", and\n then click **Create**.\n\n6. Optional: Confirm the creation of your network by navigating to the\n **VMware Engine networks** menu item. All VMware Engine\n networks are listed in the table on this page.\n\nThe following list describes each field during network creation in more detail:\n\n- **Name:** Permanent unique identifier of the VMware Engine network.\n- **Description:** Additional information that's visible on the details page of the VMware Engine network.\n- **Network type:** Network type identifier used to support networking use cases and standard private cloud deployments.\n- **Region:** This depends on whether you are using Standard\n VMware Engine or Legacy VMware Engine networks.\n\n - For legacy networks, this is the region where the network has connectivity.\n - For standard networks, this field is always set to global.\n\n### gcloud\n\nTo create a VMware Engine network using the gcloud CLI:\n\n1. Run [`gcloud vmware networks create` command](/sdk/gcloud/reference/vmware/networks/create):\n\n ```\n gcloud vmware networks create NETWORK_ID \\\n --type=STANDARD \\\n --description=\"DESCRIPTION\"\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eNETWORK_ID\u003c/var\u003e: the ID for your VMware Engine network.\n - \u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e: a description for this network.\n2. Optional: If you want to list all VMware Engine networks to confirm the creation of the new network, use the [`gcloud vmware networks list` command](/sdk/gcloud/reference/vmware/networks/list):\n\n ```\n gcloud vmware networks list \\\n --location=global\n ```\n\n### API\n\nTo create a VMware Engine network using the VMware Engine API, do the following:\n\n1. To create a VMware Engine network, make a `POST` request:\n\n ```\n POST \"https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/global/vmwareEngineNetworks?vmware_engine_network_id=NETWORKD_ID\"\n\n '{\n \"type\": \"standard\",\n \"description\": \"DESCRIPTION\"\n }'\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the project where you want to create the network.\n - \u003cvar translate=\"no\"\u003eNETWORK_ID\u003c/var\u003e: the ID for your VMware Engine network.\n - \u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e: a description for this network.\n2. Optional: To list all VMware Engine networks to confirm the\n creation of the new network, make a `GET` request.\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with the project ID where the\n network is located.\n\n ```\n GET https://vmwareengine.googleapis.com/v1/projects//locations/global/vmwareEngineNetworks\n ```\n\nUpdate a VMware Engine network\n------------------------------\n\nUpdate a VMware Engine network using the Google Cloud console,\ngcloud CLI, or VMware Engine API: \n\n### Console\n\n1. In the Google Cloud console, go to the **VMware Engine networks** page.\n\n [Go to VMware Engine networks](https://console.cloud.google.com/vmwareengine/networks)\n2. Click **Select a project** and then select the organization, folder, or project that\n contains the VMware Engine network you want to update.\n\n3. Click the name of the network that you want to update.\n\n4. On the network details page, edit the description and then click **Save**.\n\n5. Optional: To view the updated description, navigate to the **VMware Engine networks**\n menu item and click the network to see the details.\n\n### gcloud\n\nTo update a VMware Engine network using the gcloud CLI,\ndo the following:\n\n1. Update the description of a VMware Engine network by running\n the [`gcloud vmware networks update` command](/sdk/gcloud/reference/vmware/networks/update):\n\n ```\n gcloud vmware networks update NETWORK_ID \\\n --description='DESCRIPTION'\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eNETWORK_ID\u003c/var\u003e: the ID for your VMware Engine network.\n - \u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e: an updated description for this network.\n2. Optional: If you want to view the updated attribute, use the\n [`gcloud vmware networks describe` command](/sdk/gcloud/reference/vmware/networks/describe):\n\n ```\n gcloud vmware networks describe NETWORK_ID\n ```\n\n### API\n\nTo update a VMware Engine network using the VMware Engine API,\ndo the following:\n\n1. To update the description of a VMware Engine network, make a\n `PATCH` request:\n\n ```\n PATCH \"https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/vmwareEngineNetworks/NETWORK_ID?update_mask=description\"\n\n '{\n \"description\":\"DESCRIPTION\"\n }'\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID where the network is located.\n - \u003cvar translate=\"no\"\u003eLOCATION\u003cvar translate=\"no\"\u003e\u003c/var\u003e\u003c/var\u003e: the location of the network, either `global` for standard networks or the region for legacy networks.\n - \u003cvar translate=\"no\"\u003eNETWORK_ID\u003c/var\u003e: the ID for your VMware Engine network.\n - \u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e: an updated description for this network.\n2. Optional: If you want to view the updated attribute, make a `GET` request:\n\n ```\n GET \"https://vmwareengine.googleapis.com/v1/projects/PROJECT_ID/locations/global/vmwareEngineNetworks/NETWORK_ID\"\n ```\n\nWhat's next\n-----------\n\n- [Get sign-in credentials for management appliances](/vmware-engine/docs/vmware-platform/howto-access-vsphere-client).\n- [Manage your private cloud resources and activity](/vmware-engine/docs/private-clouds/howto-manage-private-cloud)."]]