This document describes the solution to the problem that occurs when CentOS 7 custom image is created and on deployment, it gets stuck on the "starting" state when the standard documented procedure is used.
For your reference:
CentOS 7 has multiple issues with the networking on Vmware that affects the Image deployment procedure in Cloud Center.
The detected issues were:
Firewall services seem to interfere with the correct communication
IPv6 IP is reported to vCenter instead of IPv4
Machine does not get the IPv4 from DHCP on start up
Multiple solutions are needed to make it work:
Run this command; systemctl disable firewalld and disable the firewall from the template.
Disable IPv6 from the image and edit the /etc/sysctl.conf file and add this line: net.ipv6.conf.all.disable_ipv6 = 1.
If you see that even after these steps the VM does not get an IP, then follow these steps:
Try to add a script to force the dhcp retrieval:
Navigate to /etc/init.d.
Create a file with this, the name as “net-autostart“,
# Solution for "No Internet Connection from VMware"
### BEGIN INIT INFO
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
Save the file.
Change the file permission as executable:
chmod 755 net-autostart
Add this script for auto-start and use chkconfig command,