Re: packer, vagrant, vmware_workstation, centos and networks not working
Resolution for the public:
bentos does a good job cleaning this up. The solution in my case was as part of the cleanup steps on top of the more commonly done cleaning of udev and network-scripts folder, do an "rm -rf /var/lib/NetworkManager".
On Tuesday, 13 June 2017 17:10:19 UTC-5, Ian Koenig wrote:
Hi Vagrant World, (x-posted to Packer list too)
I'm building a simple centos 7.3.1611 image in packer for use by VMware Workstation/Fusion in a vagrant environment. Is there any best practices I can follow to get this to work more consistently?
What's happening is the first vagrant up I do, the network configuration fails on me. If I vagrant halt and vagrant up it works. In the first vagrant up I get the error of
==> service: Setting hostname...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
# Update sysconfig
sed -i 's/\(HOSTNAME=\).*/\1service/' /etc/sysconfig/network
# Update DNS
sed -i 's/\(DHCP_HOSTNAME=\).*/\1"service"/' /etc/sysconfig/network-scripts/ifcfg-*
[... stuff deleted ...]
Yet when I use the atlas version of centos/7, it works just fine. My packer script is fairly simple with a basic kickstart file, one script to setup the vagrant.sh. My vagrantfile is very simple.
Why does the centos/7 image work and my packer based centos ISO image not work?