ifcfg file disappears after packaging rhel 7.5 virtualbox vm

19 views
Skip to first unread message

Armin Hohenegger

unread,
Aug 31, 2018, 6:01:24 AM8/31/18
to Vagrant
Hi,

I have to create a custom vagrant box from a rhel 7.5 image. My virtual box vm comes up normal and is reachable over the network. To ensure this I created a ifcfg file for the the interface enp0s3 under /etc/sysconfig/network-scripts

ifcfg-enp0s3:

STARTMODE="auto"
DEVICE="enp0s3"
BOOTPROTO="dhcp"
ONBOOT="yes"

The disk created by the command "vagrant package" does not contain any ifcfg files. I am not sure at which point they get deleted. As a result the box is not reachable when started with vagrant up.

my vagrant version is 2.0.3 .

Does anyone have a idea whats could be the reason for this?


Armin Hohenegger

unread,
Aug 31, 2018, 9:19:20 AM8/31/18
to Vagrant
Got it working. Apparently  vagrant package only works, if the interface is called eth0. To test my theory i applied the kernel parameters described in https://amolkg.blogspot.com/ to change the interface name to eth0.

After that the box came up and was reachable. I don't know if this can be considered a bug.

Alvaro Miranda Aguilera

unread,
Sep 3, 2018, 8:24:15 AM9/3/18
to vagra...@googlegroups.com
Hello

Are you adding back the new .box file?

and then starting a box from that file?

Also, you are some versions behind, if you want to file a bug, make sure you are on the latest version and you can share all the commands needed to reproduce:


Thanks
alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/06b0b927-0c28-4d00-915e-99237560d251%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Alvaro

Armin Hohenegger

unread,
Sep 4, 2018, 2:34:13 AM9/4/18
to vagra...@googlegroups.com
Hi,

i did modify the vitualbox vm, to rename the interface and then packaged it. 

I am fine with the workaround for now since we do build our boxes on a suse sles 12.3 host and this is the newest packaged vagrant version there.

If I find the time I will try to recreate this scenario in a different environment with the newest vagrant version.

Thanks,

Armin

Reply all
Reply to author
Forward
0 new messages