VMware Aria

 View Only
  • 1.  Aria Operations for Logs 8.14.1

    Posted Dec 18, 2023 11:43 AM

    hello

    how to change hostname from localhost to fqdn?

    my brain is already on fire, I can't find this information in any document

    in old "log insight" hostname changes simple but in aria i can not do this. after reboot server hostname back to localhost

    i think i check all configs already

    what i missed? 



  • 2.  RE: Aria Operations for Logs 8.14.1

    Posted Dec 18, 2023 03:11 PM

    Hello,

    I understand the frustration when changes like hostname reverts back after a reboot. Based on a similar experience I had while troubleshooting a VMware Appliance, and this is the solution that I found which worked for me

    In my case, even though the hostname was set correctly in both /etc/hostname and /etc/hosts files, it reverted to the default after a reboot. This issue seemed to be related to cloud-init resetting the hostname settings.

    Here's what worked for me:

    1. Set the Hostname: First, make sure your hostname is set correctly using hostnamectl. For example:

      sudo hostnamectl set-hostname your-fqdn-here

      Replace your-fqdn-here with your desired Fully Qualified Domain Name (FQDN).

    2. Disable Cloud-Init: It turns out cloud-init might be resetting the hostname on reboot. To prevent this, create a file named /etc/cloud/cloud-init.disabled:

      sudo touch /etc/cloud/cloud-init.disabled

      This step will disable cloud-init from interfering with your hostname settings.

    3. Reboot and Verify: After these changes, reboot your system. Post-reboot, verify if the hostname persists:

      hostname hostname -s hostname -f

    This solution worked well in my case and the hostname persisted correctly after the reboot. It's worth noting that even if you haven't explicitly set up your system with cloud-init, it might still be affecting your configuration, especially if it was enabled in newer updates or used under the hood.

    I hope this helps resolve your issue!



  • 3.  RE: Aria Operations for Logs 8.14.1

    Posted Dec 18, 2023 03:28 PM

    Hello

    after reboot hostname back to localhost.localdomain

    root@localhost [ /etc/cloud ]# hostname hostname -s hostname -f
    localhost.localdomain

    file cloud-init.disabled exists 

    root@localhost [ /etc/cloud ]# ls -la /etc/cloud/
    total 24
    drwxr-xr-x 5 root root 4096 Dec 18 15:20 .
    drwxr-xr-x 58 root root 4096 Dec 18 15:22 ..
    drwxr-xr-x 2 root root 4096 Nov 19 05:55 clean.d
    -rw-r--r-- 1 root root 3025 Sep 12 21:43 cloud.cfg
    drwxr-xr-x 2 root root 4096 Nov 19 05:55 cloud.cfg.d
    -rw-r----- 1 root root 0 Dec 18 15:20 cloud-init.disabled
    drwxr-xr-x 2 root root 4096 Nov 19 05:55 templates

     



  • 4.  RE: Aria Operations for Logs 8.14.1

    Posted Dec 18, 2023 03:45 PM

    Hello,

    You can check for a specific adjustment in the cloud-init configuration. Try the following step:

    • Remove manage_etc_hosts Setting: Open the /etc/cloud/cloud.cfg file, and remove the line manage_etc_hosts: true if it's present.

    This setting, when enabled, allows Cloud-Init to edit the /etc/hosts file, which might be causing the hostname to reset.

    After making this change, reboot the VMs to see if the hostname persists. This adjustment could help in ensuring that the hostname doesn't revert to its default after a reboot.

    I found this information in the Photon OS documentation at this link: Customizing Guest OS using Cloud-Init | (vmware.github.io)

    Let me know if this solution works for you.



  • 5.  RE: Aria Operations for Logs 8.14.1

    Posted Dec 18, 2023 05:30 PM

    in my case the setting was

    manage_etc_hosts: false

    i comment this line

    after which I specified fqdn again and rebooted and nothing change 

    any ideas?



  • 6.  RE: Aria Operations for Logs 8.14.1

    Posted Dec 18, 2023 05:41 PM

    In my config file, I also found these interesting options: 

    hcfede_0-1702921250019.png

     

    After that, unfortunately, I have no other ideas



  • 7.  RE: Aria Operations for Logs 8.14.1

    Posted Dec 18, 2023 05:48 PM

    in my cfg:

    disable_vmware_customization: true

    preserve_hostname: false



  • 8.  RE: Aria Operations for Logs 8.14.1
    Best Answer

    Posted Dec 20, 2023 10:47 AM

    So, you could try editing the vApp options from vCenter in guest OS mode:

    hcfede_0-1703069175032.pnghcfede_1-1703069206671.png

     



    However, you might still need to make changes again from the operating system as in this KB: https://kb.vmware.com/s/article/87992