RHEL 8.x VM Customization fails to join domain or set hostname during vRA provisioning
search cancel

RHEL 8.x VM Customization fails to join domain or set hostname during vRA provisioning

book

Article ID: 447412

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

When provisioning Red Hat Enterprise Linux (RHEL) 8.x virtual machines through vRealize Automation (vRA) using vSphere Guest OS Customization or Cloud-init:

  • The VM fails to join the Active Directory (AD) domain.
  • The customization process may appear stuck or complete without applying the intended hostname or network settings.
  • Cloud-init logs may show that the customization data from vSphere is not being processed.
  • /var/log/cloud-init.log inside the Guest OS contains below events

    xxxx-xx-xx xx:xx:xx,316 - util.py[WARNING]: vmtoolsd failed to get guestinfo.ovfEnv: Unexpected error while running command.
    Command: ['/usr/bin/vmtoolsd', '--cmd', 'info-get guestinfo.ovfEnv']
    Exit code: 1
    Reason: -
    Stdout: 
    Stderr: No value found
    xxxx-xx-xx xx:xx:xx,329 - util.py[WARNING]: No instance datasource found! Likely bad things to come!

Environment

Aria Automation 8.x

vSphere 8.x, 9.x

Cause

The issue occurs because the cloud-init configuration on the RHEL 8.x template does not include the OVF datasource in its search list. Without the OVF datasource, cloud-init is unable to read the environment data passed by the vSphere platform during the customization phase.

Resolution

To resolve this issue, the cloud-init configuration in the base VM template must be updated to include the OVF datasource.

  1. Power on the template VM (or a linked clone of the template).
  2. Edit the Cloud-init configuration: Open /etc/cloud/cloud.cfg (or the relevant file in /etc/cloud/cloud.cfg.d/) using a text editor:

    sudo vi /etc/cloud/cloud.cfg

     
  3. Update the datasource list: Ensure the datasource_list includes OVF. It is recommended to include the following standard sources:

    datasource_list: [ NoCloud, ConfigDrive, Azure, OVF, OpenStack, Ec2 ]

     
  4. Clean the Cloud-init state: To ensure the next deployment triggers a fresh customization, run the clean command:

    sudo cloud-init clean --seed

     
  5. Finalize the template: Shut down the VM and convert it back to a template in vCenter.
  6. Test Provisioning: Deploy a new VM via vRA and verify that the hostname is correctly set and the domain join script executes successfully.

Additional Information

Prepare a Virtual Machine Template for Raw Data cloud-init Customization