Closed antonipx closed 6 years ago
Thanks for pointing this out, but this is a very well known bug in the box. This is not a vmware-esxi provider bug.
Quote from hashicorp/vagrant#7533: The "service network restart" was introduced here: b91c167 but I can't say if something smart can be done to repair broken boxes ( file ifcfg-enp0s3, should'nt be here ... )
BTW: There is a couple of ways to avoid this problem.
1) Don't use broken boxes like generic/centos7 2) Don't set the hostname. (ie dont' use the 'config.vm.hostname' option in Vagrantfile. 3) Install Centos7 using any workaround method, rm -fr /etc/sysconfig/network-scripts/ifcfg-e*. Then repackage. Your new box should work fine. 4) Submit a bug report to the builder of generic/Centos7. 5) Submitting a bug report to Vagrant or any of the vmware providers (fusion or others) probably won't do much because this is a box bug.
Is there a recommendation for known "good" boxes?
generic/centos7 is the one that is the active one in the samples files.
you also recommend generic/ boxes right in Vagrantfile example in the readme
# Here are some of the MANY examples....
config.vm.box = 'generic/centos7'
#config.vm.box = 'generic/centos6'
#config.vm.box = 'generic/fedora27'
#config.vm.box = 'generic/freebsd11'
#config.vm.box = 'generic/ubuntu1710'
#config.vm.box = 'generic/debian9'
#config.vm.box = 'hashicorp/precise64'
#config.vm.box = 'steveant/CentOS-7.0-1406-Minimal-x64'
#config.vm.box = 'geerlingguy/centos7'
#config.vm.box = 'geerlingguy/ubuntu1604'
#config.vm.box = 'laravel/homestead'
#config.vm.box = 'puphpet/debian75-x64'
Perhaps you could recommend something better that works with your plugin seamlessly?
Thanks!!
I don't really have a recommendation for the 'best' box... Each box contributor has their own recipe. (most minimal, most dev friendly, most standard, etc...) You would have to try various to see which you like best. In general, I do like the 'generic/' boxes except centos7 has that bug.
I can change my docs, but I think the root of this problem is not my docs... It's the buggy box. I didn't even write the code to modify the hostname. It's Hashicorp/Vagrant. It's best to file an issue with the makers of generic/centos7. Maybe even file an issue with Hashicorp/Vagrant to allow 'service network restart' to fail and continue...
re-opened by mistake...
It's very well understood that this a a bug in Vagrant and or some of the Boxes. However because VMs created by your awesome provider fall victims of it by nature of being VMware flavor, it would be nice for you to provide some recommendation, or at least mention a workaround in your main readme. Thank you!
I had some long trials yesterday. As I am looking at Centos, the box that I found working is "bento/centos-7.4". Not feasible is
My trials include a multi-machine setup with each machine having a second (static) IP address and the hostname configured via vagrant.
From the feedback I've received so far (my feedback link https://goo.gl/forms/tY14mE77HJvhNvjj1 ), I found most admins are creating their own boxes. It's the only way to really know to your infra...
V2.3.0 has been released. The default enabled example, 'generic/centos7' has been replaced by 'hashicorp/precise64'. I also added more detail in 'Known Issues' about setting hostnames on boxes.
When creating a VM of box type generic/centos7 I'm getting following error message:
Investigating further
journalctl -eu network
Looking at the VM there is no ens33 interface but rather ens32 interface:
There is a relevant Vagrant issue concerning fusion provider: https://github.com/hashicorp/vagrant/issues/7533
They have a workaround where you can specify different PCI slot number, as such:
I was able to do a similar workaround in your provider
I was wondering if there was a way for a more permanent fix.