Contents

Introduction

Background Information

Problem

Solution

Introduction

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.

Background Information

For your reference:

Problem

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

Solution

Multiple solutions are needed to make it work:

1. Run this command; systemctl disable firewalld and disable the firewall from the template.

2. Disable IPv6 from the image and edit the /etc/sysctl.conf file and add this line: net.ipv6.conf.all.disable_ipv6 = 1.

3. 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:

1. Navigate to /etc/init.d.

2. Create a file with this, the name as “net-autostart“,

#!/bin/bash

# Solution for "No Internet Connection from VMware"

#

### BEGIN INIT INFO

# Default-Start: 2 3 4 5

# Default-Stop: 0 1 6

### END INIT INFO

dhclient -v

3. Save the file.

4. Change the file permission as executable:

chmod 755 net-autostart

5. Add this script for auto-start and use chkconfig command,

chkconfig --add net-autostart