VMware Cloud Community
Czernobog
Expert
Expert

vRA 8.2 - vm with cloud.vsphere.network deploying with NSX network every time

The environment I work with has vRA 8.2, vSphere 7U1 and NSX-T 3 deployed.

I have build 2 basic blueprints, based on a vsphere template. One should deploy a VM into an existing NSX-T network (overlay). The second should deploy the VM with the NIC connected to a dvs port group.

The NSX network and the network profile that is referencing it have the tag 'network_placement:nsx' assigned to it. Similarily, the vSphere port gorup and a separate network profile containing it have the tag 'network_placement:vsphere' assigned.

Both tags controllign the acces to the network resources are assigned to the project.

None of the networks is selected as "default".

The vSphere Endpoint is tagged with env:vsphere'.

Here's the blueprint for the vSphere VM:

formatVersion: 1

inputs: {}

resources:

  Cloud_vSphere_Network_1:

    type: Cloud.vSphere.Network

    properties:

      networkType: existing

      constraints:

        - tag: 'network_placement:vsphere'

  Cloud_vSphere_Machine_1:

    type: Cloud.vSphere.Machine

    properties:

      imageRef: centos8minimal-template

      cpuCount: 2

      totalMemoryMB: 2048

      networks:

        - network: '${resource.Cloud_vSphere_Network_1.id}'

      constraints:

        - tag: 'env:vsphere'

And here the VM with the NSX placement:

formatVersion: 1

inputs: {}

resources:

  Cloud_NSX_Network_1:

    type: Cloud.NSX.Network

    properties:

      networkType: existing

      constraints:

        - tag: 'network_placement:nsx'

  Cloud_vSphere_Machine_1:

    type: Cloud.vSphere.Machine

    properties:

      imageRef: centos8minimal-template

      cpuCount: 2

      totalMemoryMB: 2048

      networks:

        - network: '${resource.Cloud_NSX_Network_1.id}'

      constraints:

        - tag: 'env:vsphere'

I have removed all input properties, to keep it as simple as possible.

The NSX version is deployed without issues.

However when trying to deploy the VM that has to be connected to the dvs, a few problems arise:

  • according to the request details, the constraint in the Cloud_vSphere_Network_1 is 'network_placement:nsx' and not 'network_placement:vsphere'. I have no idea how this can happen, since 'network_placement:nsx' is not even selectable. This of course invalidates the deployment, but the allocation itself continues and the vm is eventually provisioned.
  • when selecting the provisioned Cloud_vSphere_Network_1 element from the deployment canvas view, the resource name shows the connected NSX overlay network name (and not the dvs port group, as it should have been), 'Accout' is the NSX-T Cloud account (why??), Network type is 'existing'. Under 'Custom properties' however, 'constraints' has the [{"tag":"network_placement:vsphere"}] value (as configured in the blueprint).

It seems like the constraint 'network_placement:nsx' is somehow the default and is assigned to every network resource, overwriting any other constraint. I also do not understand, how a Cloud.vSphere.Network resource can be associated with the NSX-T cloud account?

I've been using following documentation for provisioning the deployment:

Network, security, and load balancer examples in vRealize Automation cloud templates

Can anyone help me with understanding how a vSphere network gets associated with a NSX-T account?

edit: removed some typos

Tags (1)
Reply
0 Kudos
3 Replies
xian_
Expert
Expert

What tags do your network profiles have and does your project have any network constraints?

Reply
0 Kudos
Czernobog
Expert
Expert

No network constraints on the project.

Same tag on network profile and attached network.

Reply
0 Kudos
xian_
Expert
Expert

In Cloud Assembly Template Designer can you test your BP? Should give you an overview of the placement logic by the Provisioning Diagram:

xian__0-1604736158345.png

 

Reply
0 Kudos