Virtual machine hostname within guest OS being randomly picked and differs from the one specified during guest OS customization.
For example: If we specify the VM name as "Win11VM1" during guest OS customization. But after VM deployment, the VM hostname reflects different (eg. DESKTOP-XXXX) than that of the one specified as VM name.
VMware vCenter Server 7.x
VMware vCenter Server 8.x
VMware ESXi 7.x
VMware ESXi 8.x
The installed applications within guest OS might be preventing to apply the guest OS customization settings and not allowing to change the hostname.