VMware Cloud Community
woshijinyun1
Enthusiast
Enthusiast
Jump to solution

Vra8.1 how to init VM name?

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

Reply
0 Kudos
1 Solution

Accepted Solutions
lnairn
VMware Employee
VMware Employee
Jump to solution

Hi woshijinyun1,

Regarding VM naming, did you see this? How to customize the names of deployed resources using vRealize Automation Cloud Assembly

Here also you will find a lot of info https://vmguru.com/2020/03/create-custom-names-with-vrealize-automation-8/

AFAIK, cloudconfig will not set the VMname in vSphere, cloudconfig will change the name within the VM OS. Did you review the logs within the guest OS deployed?

Regards,

Leandro.

View solution in original post

Reply
0 Kudos
5 Replies
lnairn
VMware Employee
VMware Employee
Jump to solution

Hi woshijinyun1,

Regarding VM naming, did you see this? How to customize the names of deployed resources using vRealize Automation Cloud Assembly

Here also you will find a lot of info https://vmguru.com/2020/03/create-custom-names-with-vrealize-automation-8/

AFAIK, cloudconfig will not set the VMname in vSphere, cloudconfig will change the name within the VM OS. Did you review the logs within the guest OS deployed?

Regards,

Leandro.

Reply
0 Kudos
woshijinyun1
Enthusiast
Enthusiast
Jump to solution

thanks

Reply
0 Kudos
Christiankkcc
Enthusiast
Enthusiast
Jump to solution

Hi @Inairn,

So there's no possibility to customize the server name "visually" in vSphere that was deployed from vRA?

Thank you

Reply
0 Kudos
xian_
Expert
Expert
Jump to solution

You need to rename in Compute Allocation phase with an EBS.

This can be done with ABX, there is a sample workflow you can reuse when creating a new action:

xian__0-1617279370880.png

Make sure to set the EBS to "blocking".

The same can be done with vRO if you prefer legacy workflows:

xian__1-1617279483991.png     xian__2-1617279506139.png

 

Christiankkcc
Enthusiast
Enthusiast
Jump to solution

Thank you @xian_ 

I'm new to the entire vRealize suite, so I don't completely understand you're talking about.

But thanks for putting me on the right track. I'll need to do more research on this.

Reply
0 Kudos