When a vagrant box has two private network ips /etc/network/interfaces will duplicate eth2 and bigger. sed matches greedy, so the first #VAGRANT-END matches. This will result in: /etc/network/interfaces:29: interface eth2 declared allow-auto twice /sbin/ifup: couldn't read interfaces file "/etc/network/interfaces"