PowerCLI – Create routed vCloud Director Org Network

While answering a VMware Community Thread  I was finally motivated to do get some work done on my vCloud Director PowerShell Module. The new feature should be able to create a routed vCloud Director Org network and connect it to a Edge Gateway in one step. The requirement from the community thread was the ability to connect a Org Network to an existing Edge Gateway, but creating and connecting the network in one step makes more sense in my opinion.

Create routed vCloud Director Org Network - Terminal

The result of this command is a new Org Network, which is connected to an existing Edge Gateway. Per default the network is created as a “Shared” network, that means that all OrgVDCs within this organization can connect to the network. The New-MyOrgNetwork function has an optional parameter  -Shared:$False which changes this behavior.

Create routed vCloud Director Org Network - Result

Tested versions:

  • VMware vCloud Director 8.20 / 9.1
  • VMware PowerCLI 6.5.1 / 6.5.4
  • PowerShell 5.0 / 5.1

Why is this function neccessary?

Unfortunately, the New-OrgNetwork Cmdlet, which should be able to do the job seems to have two problems:

  • Network can not be connected ta an Edge Gatway
  • The Cmdlet only works with older vCloud Director versions:

You can run this Cmdlet only against vCloud Director 1.5.x environments.

Similar to how I already did it for the Edge Gateway creation my own function must be created to fit my requirements.

Create routed vCloud Director Org Network per script

That is the excerpt of the new feature from my vCloud Director PowerShell Module:

Functions like these, with a lot of parameters are usually a bit awkward to execute. This method is a little bit more comfortable:

Modify vCloud Director Org Netzwerk

In another community diskussion, the topic was how to modify these networks with VMware PowerCLI. I can clearly recommend the use of the UpdateServerData() method to modify existing networks:

Published on PowerShell Gallery

Within this update of the vCloud Director PowerShell Module I have published it on PowerShell Gallery.

Create routed vCloud Director Org Network - Find-Module


Share with:

Leave a Reply