I'm curious if anyone has already come up with a way to rename a vm some time after the deployment has completed? In our environment it seems to happen relatively often that a vm owner wants to change the hostname and the corresponding vm name, In vRA 7.x I came up with some workflows that renamed the catalog items and the IaaS objects that worked like a charm. I'm hoping via the api this is possible with vRA 8? If anyone already has an example to share that would be awesome. Thanks!
That's a pretty rare ask for us, but it's requested occassionally. However the only part of the rename that we handle is renaming the VM in vcenter to match the new name and then updating the deployment name in vRA to match the new name (since we put the vm name in the deployment name).
Any actual OS changes, DNS updates, etc. are handled by the OS team prior to our day-2 being called.
But I'm not sure if I fully understand your use case, because the name of a vm doesn't have anything to do with the name of catalog items for us. And the IaaS inventory should reflect the new name automatically once it's changed, so I could we way off with what you're asking here.
Sounds like it may be simpler in vRA 8. My reference to "catalog item" was to vRA 7 cafe objects. There was the IaaS inventory and the "Catalog Items" which are objects associated with the deployment linked to the IaaS inventory. I think when the vm name changed the IaaS object would refresh but the catalog item would still show the old/original name. So we had to run an api call to get it to all match up. It is sounding like I won't need to worry about with vRA 8. We do also include the vm name in our deployment name so I'll just have to adjust that. I'll give it a shot and report back here if I hit any snags from our perspective.
So it looks like the new resource name does sync. The one thing I'm seeing that bugs me but can probably be ignored is the resource name of the disk. The original vm name was "jppupdostst04" which I renamed in vCenter to "jppupdostst04-rename". One custom property "name" still shows as jppupdostst04 and I see the disk resource as jppupdostst04-boot-disk. I hate it when everything doesn't match up as expected. As I am still learning vRA 8 I am wondering if via the api that resource (and others) can be renamed?
not super helpful, but i would say it could be possible. we have found some things can be renamed and other things cannot, but I don't recall which ones....and more recent versions of the api may allow more things to be renamed too. In our case, we really wanted to be able to rename "Linux_VM_1" from your screenshot as an example, but I don't think it's possible. But we could rename the nics...something like that.