VMware Cloud Community
vmsiul
Enthusiast
Enthusiast

vRA8.8 | Cloud Zone associate to specific ESXi hosts

Hello, 

I have a use case where my cloud zone (on prem vcenter) is connected to a VMware Cluster and the VMW cluster has 10 hosts and 5 are connected to vDS-A and the other 5 are connected to vDS-A. This design can not be changed.  

My network profile is configured with vDS-A so we when the deployment takes place then the network profile places the host in the VMW cluster (any host) if it goes to the host with vDS-A which matches the network profile then everything works but if it goes to any of the other hosts configured with vDS-B then the deployment breaks. 

I've been trying to figure out a way to resolve this but so far nothing seems to work. I am looking for some ideas. Also I wanted to know if someone is aware of a way have a Cloud Zone assign to specific ESXi hosts instead of the cluster (resource group, etc). If that's possible in some way (maybe by some tagging) I could use it to get this work. 

Thank you 

Labels (1)
Reply
0 Kudos
6 Replies
Ankush11s
VMware Employee
VMware Employee

Apply the tags to Port groups in network section 
Then add both port groups in your single network profile and configure IP range for both 
Later the use the constraint tag for your network in Cloud template , this way you could control which network port group should be chosen for deployment  , Later It should pick up the correspond host 
Note: No need to apply to constraint for cloud zone

Also on your 2nd query , we can only add Individual ESXi when we DRS is not enabled for that cluster 

Also Another suggest to divide the host into separate cluster which are belonged to vDS-B If we can for longer run

Reply
0 Kudos
vmsiul
Enthusiast
Enthusiast

Thanks for your reply. 

This is DHCP and the IP range is the same I can't not use it to separate one vs the other. 

If we use constraint tag within the the cloud template then the user will have to make a selection to where the deployment will have to go to vDS-A or vDS-B? We will have to add something as well for that selection? maybe I am missing something but without the selection is there a way to tell where the request goes to, servers with vDS-A or servers with vDS-B. 

Reply
0 Kudos
Ankush11s
VMware Employee
VMware Employee

Yes you can use oneof or enum in yaml 
Here is the sample

formatVersion: 1
inputs:
  vds:
    type: string
    title: 'Choose DC bases on Network'
    oneOf: 
      - title: 'Network vDS 1'  # User friendly message can be anything
        const: 'vds1'  # Provide tag for portgroup
      - title: 'Network vDS 2'   # User friendly message can be anything
        const: 'vds2'   # Provide tag for portgroup
resources:
  Cloud_vSphere_Machine_1:
    type: Cloud.vSphere.Machine
    properties:
      image: Linux
      cpuCount: 1
      totalMemoryMB: 1024
      networks:
        - network: ${resource.Cloud_vSphere_Network_1.id}
      attachedDisks:
        - source: ${resource.Cloud_vSphere_Disk_1.id}
  Cloud_vSphere_Network_1:
    type: Cloud.vSphere.Network
    properties:
      networkType: existing
      constraints: 
        - tag: ${input.vds}
  Cloud_vSphere_Disk_1:
    type: Cloud.vSphere.Disk
    properties:
      capacityGb: 1
Reply
0 Kudos
vmsiul
Enthusiast
Enthusiast

Thanks great reply. That's the tricky part of these we can't let users decide where to place the VMs. They don't know they won't care and they will always leave the default or select something random. 

I can't use subnet because it's all the same, the vDS name/label is the same but the "network domain" seen by vRA is different and that can't be changed. 

I've checked at affinity rules and other VMW options but nothing does the trick. 

I could use constrains but I something (not the user, not subnet, not VM name they are free to name the VMs) needs to make the choice for the placement. 

I was reading the following article which is similar to what we are discussing here.

https://www.stevenbright.com/2019/12/working-with-tags-in-vrealize-automation-8-0/

At this point all I can think of is to split the clusters and then use a network constrain in the project like show here so that the project will use a specific "network profile" with for example vDS-A (cluster1) then another Project will be vDS-B (cluster2), etc.  

vmsiul_0-1665594659218.png

Repeat this process for the “Sales” Project, except assign the Department:Sales tag to the Network constraints field. This process has now defined that the Engineering Project can only use networks assigned the Department:Engineering tag, and that the Sales Project can only use networks assigned the Department:Sales tag.

I believe that this should work but I have not tested yet (thoughts?) Perhaps you have some additional input or a better solution.

Thank you

Reply
0 Kudos
Ankush11s
VMware Employee
VMware Employee

Yes this would do the work

If we can divide the cluster from vsphere side and create 2 cloud zone , One for each cluster 
Create 2 projects and add only corresponding cloud zone to that project , It would always go there without any constraint

High level design would be 
Project A              Project B
    
CloudZone2          CloudZone 2

NetworkProfile 1.       Network Profile2
If a user request vm from Project A , It would always go to CloudZone 2 , Assuming these Project does not have more cloud zone in it.

Reply
0 Kudos
vmsiul
Enthusiast
Enthusiast

Yes, the downside with that is that we are splitting the compute but I can't think of any other way to get this done without using constrains and user inputs which will lead to users doing stuff randomly and placing requests anywhere without any sense. 

Question - can we send all the deployment to hosts with vDS-A and then let DRS handle the VMs across all the nodes? My answer is no because we can't control which nodes the request is going to go because they are all part of the same cluster and DRS can't be disabled, but hopefully I am wrong. 

 

Reply
0 Kudos