VMware Cloud Community
sc2317
Enthusiast
Enthusiast
Jump to solution

Can we change the description and name of the VM after deployment in vRA

Hi,

Can someone please confirm if we can change the description and name of the VM after it is already deployed.

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
GeiAll
Enthusiast
Enthusiast
Jump to solution

Hi.

As far as I  know you cannot distinguish the access in the "reconfigure". Either you have access to all, or nothing.

However you can make your own workflow in vRO that you can publish as action in vRA. (Comming up in the same menu as reconfigure). Here you can limit to only description.  (And you can also extend it to change the description on the VM in vCenter, Active Directory and so on as well).

As you mention you can also change the description runtime (using Eventbroker). 

View solution in original post

Reply
0 Kudos
11 Replies
npadmani
Virtuoso
Virtuoso
Jump to solution

Change the VM description is covered in "Reconfigure" action, I think Smiley Happy

and

Rename the VM itself, I don't think you can do that in vRA UI unless something changed in vRA 7.4 or higher which I am yet to explore. But the way I have done it in past is, rename VM in end point (vCenter Inventory) and wait for a data collection (inventory) Or trigger it manually. It will reflect in vRA Items.

Narendra Padmani VCIX6-DCV | VCIX7-CMA | VCI | TOGAF 9 Certified
Reply
0 Kudos
sc2317
Enthusiast
Enthusiast
Jump to solution

Thanks. Assuming that it works renaming VM at the vCenter and then running the data collection on vRA will reflect . However, what if we destroy the machine later after few months then will it automatically delete that computer object from AD also, or do we need to perform this manually ?

Note - After renaming the machine at VMware, I'll change the machine name inside OS also, so old name will be deleted from AD and object with new name will be created.

Reply
0 Kudos
npadmani
Virtuoso
Virtuoso
Jump to solution

Thanks. Assuming that it works renaming VM at the vCenter and then running the data collection on vRA will reflect

It works, I have done it. Smiley Happy

However, what if we destroy the machine later after few months then will it automatically delete that computer object from AD also, or do we need to perform this manually ?

it won't delete it from AD on it's own when you destroy machine - there are ways to achieve this using custom properties, please go through https://docs.vmware.com/en/vRealize-Automation/7.5/vrealize-automation-75-custom-properties.pdf you are likely to find something useful on page 72,73 for the matter.

Note - After renaming the machine at VMware, I'll change the machine name inside OS also, so old name will be deleted from AD and object with new name will be created.

renaming a vm name has no impact on machine hostname within the guest or corresponding computer object in AD.

Narendra Padmani VCIX6-DCV | VCIX7-CMA | VCI | TOGAF 9 Certified
Reply
0 Kudos
sc2317
Enthusiast
Enthusiast
Jump to solution

Thanks. We do have setting to delete the machines after they are destroyed and believe it would work. However, could you please suggest if there is way to modify the description of the machine on vRA version 7.2 ? Is it possible programmatically to modify the description ?

Reply
0 Kudos
GeiAll
Enthusiast
Enthusiast
Jump to solution

Hi s2317.
 
 
Yes, you can change the description. It's located on the VirtualMachine Object as "Notes".
 
 
You need to access vCACEntityManager in vRO to do this.
 
 
something like this:
 
// Find VM
var entitySetName = "VirtualMachine";
    var host = Server.findAllForType("vCAC:vCACHost")[0];
    var locs = [];  
    var model = "ManagementModelEntities.svc";  
    var property = new Properties();  
    property.put("Name","Computername");
    var computeResources = vCACEntityManager.readModelEntitiesByCustomFilter(host.id, model, entitySetName, property, null);  
 
and then write it back with correct values
    var updatedEntity = vCACEntityManager.updateModelEntityBySerializedKey(host.id , model , entitySetName , entityKeyId , Props, Links,null);
 
 
vgk99
Contributor
Contributor
Jump to solution

It is a simple task to do.

For rename of VM 1. Login to vCenter and change the name of VM 2. Go to vRA portal and run data collection for the compute resource where this renamed VM is hosted.

For description change 1. Login to vRA portal (tenant), go to items tab and select the VM on virtual machines and request 'Reconfigure' 2. Put the description and submit the request.

Done!!

Reply
0 Kudos
sc2317
Enthusiast
Enthusiast
Jump to solution

I do not see reconfigure option, may be because we are running vRA 7.2. Please suggest.

Reply
0 Kudos
sc2317
Enthusiast
Enthusiast
Jump to solution

Is it possible on vRA version 7.2 ? What I observed is that no matter what description user is adding while requesting machine, blueprint description overwrite the description added by requester.

Again, I am new to vRO so may take some time to understand your suggestion. Could you please help me with the steps to execute the settings that you mentioned.

Reply
0 Kudos
GeiAll
Enthusiast
Enthusiast
Jump to solution

Hi sc2317.

About the missing "reconfigure" action.

I'm guessing you don't have published it to the users.

If you go to: 
Administration(tab)->Entitlements->(select your entitilement)

Under "Entited Actions" you can add  "Reconfigure" (machine).

Futher, if your description is overwritten it might be because its set multiple times.
There is a set order of where precedence overwrites others.  In short it's like this:

1 Property group
2 Blueprint
3 Business group
4 Compute resource
5 Reservations
6 Endpoint
7 Runtime

EG: if you have set it on the IaaS Blueprint, it will overwrite the value in a property group.


A good read for this is:

https://docs.vmware.com/en/vRealize-Automation/7.3/vrealize-automation-73-custom-properties.pdf

Reply
0 Kudos
sc2317
Enthusiast
Enthusiast
Jump to solution

Hi GeiAll,

Thanks, I have checked it and saw that yes reconfigure is not added under entitled actions. If I add that then I can see that on Items tab, however is there a way I can restrict users to just only update the description field and users should not be able to change CPUs,RAM,Disks and Network of the provisioned machine ?

Also as you mentioned, does it mean Property group has least precedence and runtime can overwrite all others ? Users in our Infra, do add description while requesting machine and what I have noticed is that description in Blueprint overwrites what they have provided in the description. 

Reply
0 Kudos
GeiAll
Enthusiast
Enthusiast
Jump to solution

Hi.

As far as I  know you cannot distinguish the access in the "reconfigure". Either you have access to all, or nothing.

However you can make your own workflow in vRO that you can publish as action in vRA. (Comming up in the same menu as reconfigure). Here you can limit to only description.  (And you can also extend it to change the description on the VM in vCenter, Active Directory and so on as well).

As you mention you can also change the description runtime (using Eventbroker). 

Reply
0 Kudos