2 Replies Latest reply on Sep 20, 2020 8:18 PM by woshijinyun1

    Vra8.1 how to init VM name?

    woshijinyun1 Lurker

      Hi:

           blueprint how to init vm name? i try it but not take effect. and how to change the VM displayname in the vsphere?

           and how to generate multiple VM? i try use count, but not take effect.

       

      this is my code,

      inputs:

        hostname:

          type: string

          title: hostname

        count:

          type: integer

          default: 1

          maximum: 2

          minimum: 1

          description: VM count

      resources:

        Cloud_vSphere_Network_1:

          type: Cloud.vSphere.Network

          properties:

            networkType: existing

            constraints:

              - tag: 'policyPath:/infra/segments/vlan101-seg'

        Cloud_vSphere_Machine_1:

          type: Cloud.vSphere.Machine

          properties:

            image: centos7-init

            cpuCount: 1

            count: '${input.count}'

            totalMemoryMB: 1024

            networks:

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

            cloudConfig: |

              #cloud-config:

              hostname: ${input.hostname}

      微信图片_20200911134654.png