danielsollondon / azvmimagebuilder

Azure VM Image Builder
180 stars 153 forks source link

VM Provisioning Fails using RHEL 8 image created using AIB #93

Closed neleshgoel closed 3 years ago

neleshgoel commented 3 years ago

RHEL 8.3 image is created using AIB (Marketplace Image with some customisation on top , mainly CIS Hardening - RHEL8 - https://github.com/ansible-lockdown/RHEL8-CIS).

VM provisioning fails with OS Provisioning for VM did not finish in the allotted time , Below warning / error is within the Serial log.

INFO Daemon Waiting for cloud-init to copy ovf-env.xml to /var/lib/waagent/ovf-env.xml [1705 retries remaining, sleeping 1s] WARNING Daemon cloud-init does not appear to be running

As understood from the documentation, default linux deprovision command/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync.

Any suggestions / comment will be helpful.

Regards, Nelesh

danielsollondon commented 3 years ago

CIS hardening will disable UDF driver, but this is required: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-generic#general-linux-installation-notes

Also, for RHEL the images use the cloud-init rather than the Linux agent for provisioning: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/redhat-create-upload-vhd#rhel-8-using-hyper-v-manager

LMK if this helps.

neleshgoel commented 3 years ago

Thanks @danielsollondon , Indeed UDF driver was causing the issue, Enabling the driver fixes the prevailing issue..