Please note that the Vagrant issue tracker is reserved for bug reports and
enhancements. For general usage questions, please use the Vagrant mailing list:
https://groups.google.com/forum/#!forum/vagrant-up. Thank you!
1.9.0
5.0.30 r112061
Windows 10
Ubuntu 16.04
Vagrant.configure("2") do |config|
config.vm.hostname = "sam.dev.ubuntu"
config.vm.box = "puppetlabs/ubuntu-16.04-32-puppet"
config.vm.network "forwarded_port", guest: 4000, host: 4000
config.ssh.forward_agent = true
config.vm.provision "puppet" do |puppet|
# puppet.options = "--verbose --debug"
puppet.environment_path = "puppet/environments"
puppet.environment = "main"
end
end
Please note, if you are using Homestead or a different Vagrantfile format, we
may be unable to assist with your issue. Try to reproduce the issue using a
vanilla Vagrantfile first.
https://gist.github.com/samwho/456071fec14d5a3658fd6e01984af94d
The virtual machine should boot without any problem and I should land in an SSH session with it.
The "vagrant up" command times out waiting for the machine to boot. The machine does eventually boot, but it spends the full 5 minutes and 4 seconds waiting for "A start job is running for Raise network interfaces".
Interestingly, if I boot the machine from virtualbox rather than running "vagrant up", it boots fine and all of the networking stuff works. This is what leads me to believe that this is a vagrant bug.
This error occurs because the Ubuntu tries to raise all your network interfaces, but your cable isn't connected, then he waits until his timeout.
It seems that this problem occurs when you export a VM, more info on https://www.virtualbox.org/ticket/15705
You have two ways to solve this issue:
1) You can edit your Vagrantfile and add these lines in the end of Vagrant.configure
loop:
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
end
2) You can edit your .ovf file of your VM and add cable="true"
in the <Adapter .. >
tag. Everything should works fine.
I recommend first solution :)
For other people to known, I have this issue on laravel/homestead
box. Tried to update everything, but only this solution above worked.
I added just
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
line on vendor/laravel/homestead/scripts/homestead.rb
file at # Configure A Few VirtualBox Settings
section loop.
My system configuration:
Vagrant 1.9.1
VBox 5.1.10 r112026
Host OS X El Capitan 10.11.6
Guest Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-51-generic x86_64)
I'm afraid your solution didn't work. I still have the same issue after attempting solution 1. I did not attempt solution 2 because I couldn't find any .ovf files.
Your Vagrantfile should look like this:
Vagrant.configure("2") do |config|
config.vm.hostname = "sam.dev.ubuntu"
config.vm.box = "puppetlabs/ubuntu-16.04-32-puppet"
config.vm.network "forwarded_port", guest: 4000, host: 4000
config.ssh.forward_agent = true
config.vm.provision "puppet" do |puppet|
# puppet.options = "--verbose --debug"
puppet.environment_path = "puppet/environments"
puppet.environment = "main"
end
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
end
end
When you create a VM with Vagrant with VBox as provider your VM files (e.g: .ova, .ovf, .vbox, .vmdk, etc.) should be located in the default VBox folders where VMs is stored.
On Windows these files are default stored at C:\Users\xxx\VirtualBox VMs
where xxx
is you username.
I mention .ovf file, but I mean .vbox file. These files contain the definition of a VM, in other words, the same information but first one is in Open Virtualization Format and second is the VirtualBox's correspondent.
If the first one didn't work, now try to find the definition files and try second solution.
Hope it helps.
My .vbox config has many Adapter elements and they all have cable="true" on them.
<Network>
<Adapter slot="0" enabled="true" MACAddress="080027F082D6" cable="true" speed="0" type="82540EM">
<DisabledModes>
<InternalNetwork name="intnet"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<NAT>
<DNS pass-domain="true" use-proxy="true" use-host-resolver="false"/>
<Alias logging="false" proxy-only="false" use-same-ports="false"/>
<Forwarding name="ssh" proto="1" hostip="127.0.0.1" hostport="2222" guestport="22"/>
<Forwarding name="tcp4000" proto="1" hostport="4000" guestport="4000"/>
</NAT>
</Adapter>
<Adapter slot="1" enabled="false" MACAddress="0800272AB229" cable="true" speed="0" type="82540EM">
<DisabledModes>
<NAT>
<DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
<Alias logging="false" proxy-only="false" use-same-ports="false"/>
</NAT>
</DisabledModes>
</Adapter>
<Adapter slot="2" enabled="false" MACAddress="080027889B20" cable="true" speed="0" type="82540EM">
<DisabledModes>
<NAT>
<DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
<Alias logging="false" proxy-only="false" use-same-ports="false"/>
</NAT>
</DisabledModes>
</Adapter>
<Adapter slot="3" enabled="false" MACAddress="0800277910A3" cable="true" speed="0" type="82540EM">
<DisabledModes>
<NAT>
<DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
<Alias logging="false" proxy-only="false" use-same-ports="false"/>
</NAT>
</DisabledModes>
</Adapter>
<Adapter slot="4" enabled="false" MACAddress="0800277E3824" cable="true" speed="0" type="82540EM">
<DisabledModes>
<NAT>
<DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
<Alias logging="false" proxy-only="false" use-same-ports="false"/>
</NAT>
</DisabledModes>
</Adapter>
<Adapter slot="5" enabled="false" MACAddress="080027362EFC" cable="true" speed="0" type="82540EM">
<DisabledModes>
<NAT>
<DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
<Alias logging="false" proxy-only="false" use-same-ports="false"/>
</NAT>
</DisabledModes>
</Adapter>
<Adapter slot="6" enabled="false" MACAddress="080027E69114" cable="true" speed="0" type="82540EM">
<DisabledModes>
<NAT>
<DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
<Alias logging="false" proxy-only="false" use-same-ports="false"/>
</NAT>
</DisabledModes>
</Adapter>
<Adapter slot="7" enabled="false" MACAddress="0800277567BA" cable="true" speed="0" type="82540EM">
<DisabledModes>
<NAT>
<DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
<Alias logging="false" proxy-only="false" use-same-ports="false"/>
</NAT>
</DisabledModes>
</Adapter>
</Network>
Hmm.. too much strange!
Try to change --cableconnected1
to --cableconnected0
at Vagrantfile. It seems that your VM use slot 0 for tunneling with your pc.
If this didn't work try to update VirtualBox to latest version (same as mine).
I only tested these commands after updated VBox, because I was thinking that should be a VBox problem.
It seems that this problem occurs when you export a VM, more info on https://www.virtualbox.org/ticket/15705
I also added this info on first post.
Here's what I get after making your suggested change:
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'puppetlabs/ubuntu-16.04-32-puppet'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'puppetlabs/ubuntu-16.04-32-puppet' is up to date...
==> default: Setting the name of the VM: devbox_default_1482083418230_18685
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 4000 (guest) => 4000 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
A customization command failed:
["modifyvm", :id, "--cableconnected0", "on"]
The following error was experienced:
#<Vagrant::Errors::VBoxManageError: There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["modifyvm", "6663e8db-b8c8-4d6f-aebe-fe51680736e8", "--cableconnected0", "on"]
Stderr: VBoxManage.exe: error: Invalid NIC number 0
>
Please fix this customization and try again.
I'll try updating to the latest VirtualBox.
I updated to 5.1.10 r112026 and at first tried removing the modifyvm stuff in my Vagrantfile to see if it would work without it. It did not, I got the same problem about waiting to raise network interfaces at startup.
I added the following back in:
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
end
And there's no difference, still waits 5 solid minutes at startup.
I changed cableconnected1
to cableconnected0
and got the same error as in my previous reply to this issue.
In short, updating changed none of the behaviour I had previously seen.
Ok, VM command is about the number of Adapter (1, 2, 3, ...) and not about the slots. That's why you got the error when changed --cableconnected1
to --cableconnected0
. My mistake.
Sorry guy but I don't know how to help you. I did not experience any issue after make these changes.
tembra your solution worked for me with option 1. Thank you and God Bless
Same problem for me. I have Windows 7 host and Ubuntu 16.04 as guest.
I am suspecting a firewall setting, as the machine boots up normally when using the host Ethernet adapter, but the issue described there is reproduced if I try to use the host WiFi connection instead. However, as it is a corporative computer, I cannot test nor change the configuration of the firewall in any way.
The first solution @tembra posted worked for me as well. Thank you!
I can confirm that the 1st solution of @tembra worked for me. Ty 👍
@tembra solution work only when i'm using Wifi and ethernet connection.
When i'm offline, i got the issue with the job Raise Network Interfaces during 5min 6 sec.
I have Windows 8.1 and i'm using Homestead
@tembra solution 1 works for me
Add vb.customize in provider
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
My Vagrant file
Vagrant.configure("2") do |config|
config.vm.box = "boxcutter/ubuntu1604-desktop"
config.vm.network "private_network", ip: "192.168.25.10"
config.vm.network "public_network", use_dhcp_assigned_default_route: true
config.vm.boot_timeout = 300
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
# vb.gui = true
# Customize the amount of memory on the VM:
vb.memory = 6144
vb.cpus = 6
# Fix error
# This error occurs because the Ubuntu tries to raise all your network interfaces, but your cable isn't connected, then he waits until his timeout.
# Link: https://github.com/mitchellh/vagrant/issues/8056
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
end
end
On windows 7, my computer has wifi connection.
I haven't test if both ethernet & wifi is off.
@samwho
So multiples versions of vagrant and virtualbox have happened
Can you please upgrade both and retry and tell us if this is still an issue ?
The cabbkle connect was an issue in some VirtualBox versions.
VirtualBox 5.1.26 r117224 (Qt5.6.2)
Ubuntu 17.04 as VM
When network type is 'Internal Network' I am getting this message in the boot:
A start job is running for Raise network interfaces
@tembra 's second solution did not work for me.
I was able resolve this issue by enabling virtualization in the BIOS of my PC.
This thread is a bit old but it's the top link on google when searching for the error term + vagrant. I just want to add that enabling CPU virtualisation in the BIOS also fixed this error for me... I had dismissed this solution initially and spent hours trying out the some of the others and searching multiple sites.
Check your BIOS settings, make sure virtualisation is enabled!
@blairly I have enabled nested virtualisation on GCP's debian-9 VM using this guide https://cloud.google.com/compute/docs/instances/enable-nested-virtualization-vm-instances
I can vagrant up
and vagrant ssh
into guest VM hashicorp/precise64
but I get timeout error with ubuntu/xenial64
as guest.
Adding this didn't solved the problem for me
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
end
Does the BIOS setting that you're suggesting applies to GCP-VMs too?
Another thread where I commented earlier- #9608
@navndn I'm no expert on GCP VMs (or VMs at all really) but I would be surprised if they didn't have the necessary virtualisation system settings in place.
Having read the GCP guidance you linked (the "Restrictions" and "Tested KVM versions" sections) I suspect that ubuntu/xenial64 is just not supported/working properly for nested virtualisation.
For others looking here and myself when I inevitably forget how to fix this in the future (since it is the top hit on Google), I was able to get around this by following the instructions here:
Specifically I used the 'mask' option. It seems like a poor solution to me, given it disables a feature versus fixing the error, but after many hours of work and no luck, I was happy just to get it up. Also, there seem to be some issues with that particular service in Ubuntu anyways, so maybe it is best just to turn it off.
Using this I did not need the 'cableconnected1' config lines either.
My setup details if helpful:
Host: Windows 8
Provider: VirtualBox 5.2.16
Guest OS: Ubuntu 17.10
Vagrant: 2.1.2
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.
Most helpful comment
This error occurs because the Ubuntu tries to raise all your network interfaces, but your cable isn't connected, then he waits until his timeout.
It seems that this problem occurs when you export a VM, more info on https://www.virtualbox.org/ticket/15705
You have two ways to solve this issue:
1) You can edit your Vagrantfile and add these lines in the end of
Vagrant.configure
loop:2) You can edit your .ovf file of your VM and add
cable="true"
in the<Adapter .. >
tag. Everything should works fine.I recommend first solution :)
For other people to known, I have this issue on
laravel/homestead
box. Tried to update everything, but only this solution above worked.I added just
line on
vendor/laravel/homestead/scripts/homestead.rb
file at# Configure A Few VirtualBox Settings
section loop.My system configuration: