3 Replies Latest reply on Feb 7, 2020 1:31 PM by okeedokee

    vRA8 disk and nic count

    dbis7575 Enthusiast

      I am trying to create a vRA8 blueprint in which I can select either (1 or 2) NIC's and have the option to add additional drives to a blueprint.  Requests will be consumed through the API, not through Service Broker.

       

      I was hoping the "count" property for the disks or network cards could help, but I get errors during deployment if I try to use them.

       

      Is there another way to add a NIC or drive through an ABX action prior to allocation? Any recommendations are greatly appreciated.

        • 1. Re: vRA8 disk and nic count
          thegrumpyengineer Novice

          The count property does work within a blueprint. I have a couple of custom inputs where the user inputs the number and size of additional disks and it builds.

           

          The key bits of the blueprint are as follows:

           

          inputs:

            additionalDiskCount:

              type: integer

              title: Additional Disk Count

            additionalDiskSize:

              type: integer

              title: Additional Disk Size (GB))

          resources:

            demo-machine:

              type: Cloud.vSphere.Machine

              properties:

                name: demo-machine

                customizationSpec: Linux_Custom_Spec

                count: '${input.instances}'

                resourceGroupName: '${"VRM/" + to_upper(env.projectName)}'

                attachedDisks: '${map_to_object(resource.Cloud_vSphere_Disk_1[*].id, "source")}'

                networks:

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

                tags:

                  - key: Backup

                    value: '${input.backupLevel}'

            Cloud_vSphere_Disk_1:

              type: Cloud.vSphere.Disk

              properties:

                capacityGb: '${input.additionalDiskSize}'

                count: '${input.additionalDiskCount}'

                name: Disk_XXX

                provisioningType: thin

           

          Hope it helps!

          1 person found this helpful
          • 2. Re: vRA8 disk and nic count
            dbis7575 Enthusiast

            This gets me a little bit further, but I want to get to the option where we have additional drives of different sizes and either 1 or 2 network interfaces on different networks.

             

            A couple of things I notices:

            1. I copied the syntax from your example and it did not work. If I first create a disk or network object and add the count parameter before linking it to the machine it works even tough the syntax is the same.

            2. If I create multiple disk or network objects that have a count property, I am only able to link one of them through the canvas and have not been able to get any yaml code working to get around this.

            • 3. Re: vRA8 disk and nic count
              okeedokee Enthusiast

                Cloud_vSphere_Disk_1:

                  type: Cloud.vSphere.Disk

                  properties:

                    capacityGb: '${input.additionalDiskSize}'

                    count: '${input.additionalDiskCount}'

                    name: Disk_XXX

                    provisioningType: thin

              How do you get this to iterdate through the number of disks specified?

               

              Disk_XXX