1 2 Previous Next 17 Replies Latest reply on Feb 12, 2020 5:36 PM by stevedrummond

    How can make blueprint with additional HDD

    thanhdoan Lurker

      Hi All,

      I want to make a blueprint on vra8 with vSphere infrastructure. I want User can add more HDD when they take a request.

      I tries to use count properties but not effect.

        Cloud_vSphere_Disk_1:

          type: Cloud.vSphere.Disk

          properties:

            capacityGb: '${input.SizeHDD}'

            dataStore: '${input.DataStore}'

            count: '${input.HDDDisk}'

      Thanks and Have a nice day

        Cloud_vSphere_Disk_1:
          type: Cloud.vSphere.Disk
          properties:
            capacityGb: '${input.DungLuongHDD}'
            dataStore: '${input.DataStore}'
            count: '${input.SoLuongHDD}'
        • 1. Re: How can make blueprint with additional HDD
          thegrumpyengineer Novice

          Below is my working example which adds multiple disks to the VM - note the attachedDisks line against the machine.

           

            demo-machine:

             type: Cloud.vSphere.Machine

             properties:

             name: demo-machine

             cpuCount: '${input.cpu}'

             totalMemoryMB: '${input.memory}'

             image: '${input.image}'

             customizationSpec: Linux_Custom_Spec

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

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

             tags:

             - key: Backup

             value: '${input.backupLevel}'

            Cloud_vSphere_Disk_1:

             type: Cloud.vSphere.Disk

             properties:

             capacityGb: '${input.additionalDiskSize}'

             count: '${input.additionalDiskCount}'

             name: Diskxxx

             provisioningType: thin

          • 2. Re: How can make blueprint with additional HDD
            thanhdoan Lurker

            Hi

             

            I tried your code but not work.

             

            And I have another question: Can user set "Name of Windows" when they make a request?

             

             

            Thanks.

            • 3. Re: How can make blueprint with additional HDD
              stevedrummond Hot Shot

              What do you mean "it didn't work"? What exactly is happening that makes you think the count property for disks does not work? Is the blueprint failing to deploy? Is it failing to add disks and how are you verifying this?

               

              Are you trying to provision one compute with multiple disks or multiple compute each with multiple disks?

               

              What do you mean by "Name of Windows"? If you're asking what image to build from (2012 or 2016 for example) you use Image Mappings. If you mean can you name the machine there are many posts showing how to set your resourceNames (using EBS or vRA project nameTemplates).

              • 4. Re: How can make blueprint with additional HDD
                thanhdoan Lurker

                Dear stevedrummond,

                 

                Have a nice day.

                 

                "What do you mean "it didn't work"? What exactly is happening that makes you think the count property for disks does not work? Is the blueprint failing to deploy? Is it failing to add disks and how are you verifying this?

                Are you trying to provision one compute with multiple disks or multiple compute each with multiple disks?"

                 

                ==> I tried provision one compute with mutiple disk but, testing and  deploying can not complete(Validation Request timed out. Please try again later.). I setup Request Timeout 1 day.

                 

                What do you mean by "Name of Windows"? If you're asking what image to build from (2012 or 2016 for example) you use Image Mappings. If you mean can you name the machine there are many posts showing how to set your resourceNames (using EBS or vRA project nameTemplates).

                 

                ==> I want to user can input Windows Name of Windows OS when they make a request.

                 

                Thanks.

                • 5. Re: How can make blueprint with additional HDD
                  dbis7575 Enthusiast

                  The "count" property is functional for me, but I can only add one disk to a machine using this. This means all the additional disks would have to be the same size which doesn't meet the usual requirements, I would appreciate any solution for this as well.

                   

                  As far as setting your name within windows, there are two ways to do this. You will have to set the name of the machine within the yaml file, but in order to get this updated within the OS you either need to reference a vCenter customizationspec that sets the name to the VM Name or use cloudbase-init to set the VM name in the OS.

                  • 6. Re: How can make blueprint with additional HDD
                    thanhdoan Lurker

                    HI dbis7575,

                    The "count" property is functional for me, but I can only add one disk to a machine using this. This means all the additional disks would have to be the same size which doesn't meet the usual requirements, I would appreciate any solution for this as well.

                    ===> With Count = 1. My Blueprint work normaly.

                     

                     

                    "As far as setting your name within windows, there are two ways to do this. You will have to set the name of the machine within the yaml file, but in order to get this updated within the OS you either need to reference a vCenter customizationspec that sets the name to the VM Name or use cloudbase-init to set the VM name in the OS."

                     

                    ====> Can you please give me example or intruction? I tried hostname properties with cloudbase-init but not thing happen with my VM after deploy complete.

                     

                    Thanks

                    • 7. Re: How can make blueprint with additional HDD
                      dbis7575 Enthusiast

                      On the additional HDD with the count, please make sure of the following:

                       

                      - You are running patch level 8.0.1

                      - Create the disk object and add the count property before linking it to your machine (reference doesn't always get updated properly if you link it first and then add the count property).

                       

                       

                      For cloudbase-init and setting the hostname, make sure you follow the steps in this article: Windows guest initialization with Cloudbase-Init in vCenter - VMware Cloud Management

                       

                      It takes you through preparing your template (note that you need to install a beta version of cloudbase-init which is likely not acceptable for production environments). You also should not be using a customization template if you are cloudbase-init. If you have followed these steps and still have issues you will need to look at the logs. If you are still having issues with this then you will need to look at the logs. Unless you change the location, the default location is:

                       

                      logdir=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log\

                      logfile=cloudbase-init.log

                      logfile=cloudbase-init-unattend.log

                      1 person found this helpful
                      • 8. Re: How can make blueprint with additional HDD
                        pizzle85 Hot Shot

                        I'm with dbis7575, id like to be able to create and attach multiple disks to a VM while being able to choose the size and datastore of each disk. Ideally there would be an array input that the user can use to add X number of disks with unique configurations for each, then map that object onto the Cloud_vSphere_Disk_1 resource for each count iteration.

                        • 9. Re: How can make blueprint with additional HDD
                          thanhdoan Lurker

                          Dear dbis7575,

                           

                          "You are running patch level 8.0.1. Create the disk object and add the count property before linking it to your machine (reference doesn't always get updated properly if you link it first and then add the count property)" ==> I'm running patc level 8.0.1. And I did exactly what you wrote add count property before linking it to machine but nothing happen with count=2.

                           

                          "For cloudbase-init and setting the hostname, make sure you follow the steps in this article: Windows guest initialization with Cloudbase-Init in vCenter - VMware Cloud Management"

                           

                          I following post above but not effect with me. Can you please see my Cloud-init config and log.

                          • 10. Re: How can make blueprint with additional HDD
                            dbis7575 Enthusiast

                            The way I understand that it works is that vRA will create and mount an ISO with the metadata for cloudbase-init to process, your logs show that it is not able to find this metadata.

                             

                            Unless there is something in your image that prevents the ISO from being mounted, I expect that there is an issue with the "cloudconfig" section in the yaml code to where vRA does not process is correctly.

                             

                            I have just started working with cloudbase-init as well, so I would recommend that you reach out to support.

                            • 11. Re: How can make blueprint with additional HDD
                              stevedrummond Hot Shot

                              That is not how vRAC/vRA 8 blueprints work.

                               

                              Each of those disks you are talking about is a unique disk object, so it should be represented on the blueprint as such. This way you can configure each disk individually with properties, constraints, tags, etc.

                              • 12. Re: How can make blueprint with additional HDD
                                dbis7575 Enthusiast

                                You can either add multiple disks to a blueprint each with it's own properties. You can also add a disk object with a "count" property, so you can control the number of additional disks with input parameters.... but then they all have the same properties. If you have a disk object with a count property, then you can only have one of those objects linked to your machine.

                                 

                                The idea is to have a single blueprint in which you can specify how many additional drives you want and what size of each of those drives should be. Right now you would need multuiple blueprints to accomplish this. I have been working with VMWare for a while now and they have not come up with a solution either.

                                 

                                I am now thinking I am just going to create a blueprint with "X" additional drives, for drives that are not needed I will build them as 1GB and then run an ABX action to remove the drives that are not needed after the machine has been provisioned. Not a pretty solution, but it should work until the product matures.

                                • 13. Re: How can make blueprint with additional HDD
                                  thanhdoan Lurker

                                  Thanks your response.

                                   

                                  Now I need do set Hostname of Windows OS. But all instruction did not work for me.

                                   

                                  Thanks

                                  • 14. Re: How can make blueprint with additional HDD
                                    stevedrummond Hot Shot

                                    If you have a disk object with a count property, then you can only have one of those objects linked to your machine

                                    Is this true if you set the count to 0 or 1? You can always have multiple disks on the blueprint and set the count to 0 if it's not required.

                                     

                                    The idea is to have a single blueprint in which you can specify how many additional drives you want and what size of each of those drives should be.

                                    I have the same requirement as I need to offer "generic single IaaS" for the lowest consumer. However, to be fair to the product (unusual for me) its blueprints are not designed for that. A blueprint should represent the defined topology of each application or service, not a willy nilly decide at the time by the user. It supports scale out/in of those predefined components but not a total topology change. Bespoke requests can be handled by using the IaaS API directly or programmatically creating, deploying and destroying blueprints.

                                    1 2 Previous Next