hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.17k stars 4.43k forks source link

Vagrant hangs waiting on input for mv: overwrite '/etc/sysconfig/network-scripts/ifcfg-enp0s8'? #7654

Closed hello-josh closed 7 years ago

hello-josh commented 8 years ago

Vagrant hangs on configuring network interfaces on the initial vagrant up with the following error in the debug log:

DEBUG ssh: stdout: [root@sdp-devel vagrant]# bccbb768c119429488cfd109aacea6b5-pty
DEBUG ssh: stdout: mv: overwrite ‘/etc/sysconfig/network-scripts/ifcfg-enp0s8’?

If I vagrant ssh to the machine in another terminal, I can see the file /etc/sysconfig/network-scripts/ifcfg-enp0s8 exists with the following content:

[root@sdp-devel vagrant]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s8
#VAGRANT-BEGIN
# The contents below are automatically generated by Vagrant. Do not modify.
NM_CONTROLLED=no
BOOTPROTO=none
ONBOOT=yes
IPADDR=10.255.100.11
NETMASK=255.255.255.0
DEVICE=enp0s8
PEERDNS=no
#VAGRANT-END

Vagrant version

Vagrant 1.8.5

Host operating system

OS X 10.11.6

Guest operating system

CentOS 7

Vagrantfile

# Vagrant
virtualbox_base_box = 'xxxxxxx'
virtualbox_base_url = 'http://yyyyyyyy/devstack-2.1.0.box'

# Set default provider to virtualbox
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox'

forward_ssh_agent  = true

# Machines
vm_cpus      = 1
vm_ram       = 512

# Network
# Overall subnet used is 10.255.1/24
subnet                 = '10.255.100.0'
netmask                = '255.255.255.0'

# Using V2 of the vagrant config language
Vagrant.configure('2') do |config|
  config.ssh.pty = true
  config.ssh.forward_agent = forward_ssh_agent

  subnet_base = subnet.split('.')[0..-2].join('.')

  config.vm.provider "virtualbox" do |v, override|
    override.vm.box = virtualbox_base_box
    override.vm.box_url = virtualbox_base_url
  end
  config.vm.define "josh-testing" do |devel|
    ip_address = "#{subnet_base}.11"
    devel.vm.network 'private_network',
      ip: ip_address,
      netmask: netmask
    devel.vm.provider "virtualbox" do |v|
      v.memory = vm_ram
      v.cpus = vm_cpus
    end

  end
end

Steps to reproduce

vagrant up --no-provision --debug
hello-josh commented 8 years ago

Vagrant 1.8.4 does not have this problem.

chrisroberts commented 7 years ago

Fixed by: #7751

chrisroberts commented 7 years ago

Fixed via: #7751

ghost commented 4 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.