Incorrect mapping of ipv6 loopback entry 1 to FQDN is added during Linux guest OS customization
searchcancel
Incorrect mapping of ipv6 loopback entry 1 to FQDN is added during Linux guest OS customization
book
Article ID: 318559
calendar_today
Updated On: 02-23-2024
Products
VMware vCenter Server
Issue/Introduction
This article introduces how to avoid adding an ipv6 loopback entry mapping to FQDN in the /etc/hosts during guest OS customization.
Symptoms: When customizing a Linux guest OS, the mapping of ipv6 loopback entry ::1 to FQDN will be added in the /etc/hosts directory.
If this mapping does not exist in the file before customization, it will be added as seen below:
::1 <FQDN> <hostname>
Environment
VMware vCenter Server 6.7.x VMware vCenter Server 7.0.x
Cause
If there is no IPv6 loopback entry mapping to FQDN in the /etc/hosts before the customization, it will be added after customization unexpectedly.
Resolution
The issue has been fixed in vCenter Server 7.0 Update 2c and later releases. Affected versions:
vCenter Server 7.0 Update 1.
vCenter Server 7.0 Update 1c.
vCenter Server 7.0 Update 2a.
vCenter Server 7.0 Update 2b.
Workaround: To work around this issue, follow either one of the workarounds:
Workaround #1
Add below customization script in the customization spec:
#!/bin/bash if [ x$1 == x"precustomization" ]; then echo "pre-script: do nothing" fi if [ x$1 == x"postcustomization" ]; then echo "post-script, modify /etc/hosts" sed -i '/^::1/{/localhost\.localdomain/!d}' /etc/hosts fi