Historically, the use of display name in case of instances and other resources (such as offering, templates etc) was to allow the operator/admin to the resources by name and end user to see by display name in upper UI/CMP layers such as CPBM etc. There was even API/response keys such as displayvm where the idea was a root admin (operator account) can deploy resources without getting them listed in such upper UI/CMP layers.
I think it's completely redundant now in the current UI implementation neither is actually followed or used (I think), or even needed. Upper layers and CMP/billing portals can decide however they want to use these params. Regards. ________________________________ From: Pearl d'Silva <pearl.dsi...@shapeblue.com> Sent: Wednesday, August 9, 2023 18:06 To: users@cloudstack.apache.org <users@cloudstack.apache.org> Subject: Re: set display_name as hostname to instances Display name is solely for UI purposes. In order to set the host name of a VM to a desired value, you'll need to pass the name parameter(same as that of the displayname). If the name parameter is not passed, the hostname would default to VM-<UUID_of_VM>. Regards, Pearl ________________________________ From: cristian.c@istream.today <cristian.c@istream.today> Sent: August 4, 2023 11:35 AM To: users@cloudstack.apache.org <users@cloudstack.apache.org> Subject: RE: set display_name as hostname to instances The metadata does not show the display name for local-hostname, for both parameters I see the name value of the VM, the deploy was made via API and I provided only the display_name, where the display name is "displayname01". As you see here, public and local have the same value, from vm name. {"vm_ip_address":"51.89.84.82","vm_metadata":[["userdata","user-data",null], ["metadata","service-offering","S-2"],["metadata","availability-zone","DE-00 1"],["metadata","local-ipv4","51.89.xx.xx"],["metadata","local-hostname","VM -c8c113e0-3277-425e-882b-44937413fd4a"],["metadata","public-ipv4","51.89.xx. xx"],["metadata","public-hostname","VM-c8c113e0-3277-425e-882b-44937413fd4a" ],["metadata","instance-id","c8c113e0-3277-425e-882b-44937413fd4a"],["metada ta","vm-id","c8c113e0-3277-425e-882b-44937413fd4a"] Thank you, Cristian -----Original Message----- From: Pearl d'Silva <pearl.dsi...@shapeblue.com> Sent: Friday, August 4, 2023 6:02 PM To: users@cloudstack.apache.org Subject: Re: set display_name as hostname to instances If you are using the UI to create the VM, set the name of the VM - this field sets the hostname and the display name. So you should see this value in the local-hostname file in the VR metadata folder. If you are using the API, explicitly set the name field. Let us know if you see the desired name in the metadata after setting the name parameter. Thanks, ________________________________ From: cristian.c@istream.today <cristian.c@istream.today> Sent: August 4, 2023 10:22 AM To: users@cloudstack.apache.org <users@cloudstack.apache.org> Subject: RE: set display_name as hostname to instances Hi Pearl, I will test this when I upgrade to 4.18.x I'm waiting for 4.18.1. Thank you, Cristian -----Original Message----- From: Pearl d'Silva <pearl.dsi...@shapeblue.com> Sent: Friday, August 4, 2023 4:24 PM To: users@cloudstack.apache.org Subject: Re: set display_name as hostname to instances Hi Cristian, In addition, in 4.18 a new feature - managed User data was introduced. This can be used to register userdata with custom parameters - here, the hostname. And when deploying the VM, the custom parameters could be set to the desired values. You could refer to https://www.shapeblue.com/cloudstack-managed-user-data/ for more information. Thanks, Pearl ________________________________ From: Rohit Yadav <rohit.ya...@shapeblue.com> Sent: August 4, 2023 9:12 AM To: users@cloudstack.apache.org <users@cloudstack.apache.org> Subject: Re: set display_name as hostname to instances Hi Cristian, I'm not sure, but could you try user data (cloud-init data) when you deploy a VM. In there, you'll have flexibility to set the hostname of the VM to whatever you'd like. Regards. ________________________________ From: cristian.c@istream.today <cristian.c@istream.today> Sent: Thursday, August 3, 2023 20:28 To: users@cloudstack.apache.org <users@cloudstack.apache.org> Subject: set display_name as hostname to instances Hello, Is there a method to set as hostnames to the instances the display name? I did not see the display name in the metadata. I am asking this because the display name allows any format, such as fqdn.tld, and it does not matter if it's a duplicate or not. Thank you, Cristian