Azure RHEL 7.7 Packer deprovisioning issues

Hi guys,

I am having the following issues when during the packer deprovisioning process after hardening (via CIS scripts) my RHEL 7.7 Azure marketplace image:

2020-10-27T01:44:23.2154759Z azure-arm: 2020/10/27 01:44:23.190966 ERROR Command: [userdel -f -r packer], return code: [10], result: [userdel: user packer is currently used by process 10062
2020-10-27T01:44:23.2155636Z azure-arm: Multiple entries named ‘wheel’ in /etc/group. Please fix this with pwck or grpck.
2020-10-27T01:44:23.2156295Z azure-arm: userdel: failed to prepare the new /etc/group entry ‘wheel’
2020-10-27T01:44:23.2156958Z azure-arm: ]

I am also hardening a ‘SAP RHEL 7.7’ image and capturing it for use in Azure shared image gallery, but not have the same errors. Any ideas on how I can resolve this one?