-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ubuntu 15.10 & 16.04 guests wont work with private networks #7155
Comments
Hi @kiorky Thank you for opening an issue. I am unable to reproduce this issue with the following vanilla Vagrantfile. The Vagranfile you supplied is doing a lot of things including monkey-patching the ruby, defining helpers, and performing conditional execution that makes it very difficult to reason about the actual Vagrantfile that is being used and the parameters. Are you able to reproduce this with a vanilla Vagrantfile? Vagrant.configure(2) do |config|
config.vm.box = "bento/ubuntu-15.04"
config.vm.network "private_network", ip: "33.33.33.10"
end There are so many variables in your Vagrantfile that it's not possible to narrow down where the problem might be:
Unfortunately there are just too many variables. Could you please reduce to a vanilla Vagrantfile and see if the issue reproduces? If it does, I am happy to try and fix it. If it doesn't, it means there is an issue in one of the items in the list above. Thanks! 😄 |
@sethvargo I think u misread the issue. Try a 16.04 box as guest.
The problem seems to be a upgrade of ifupdown package. From the changelog (http://changelogs.ubuntu.com/changelogs/pool/main/i/ifupdown/ifupdown_0.8.10ubuntu1/changelog)
As debian/cap/configure_networks.rb:L44 always tries to ifdown an interface, even if it is not defined for the system, because first start and the fact that all interfaces except eth0 are removed from /etc/network/interfaces by debian/cap/configure_networks.rb:L16-17 this now throws an error as the command returns non-zero. |
i said 15.10+ and you edited what i gave to use 15.04... come on. |
BTW; ubuntu16.04 is the next lts, which is coming soon ;) and cyring on users to adapt a bit their vagrantfile is a bit chilly where there is a bug on the first place. |
Hi @kiorky Thank you for your reply. My intent was not to be rude, so I apologize if it came off that way. Please understand that your Vagrantfile is very complex with many variables, so I was trying to help you narrow down the cause of the issue. @valkum was able to provide a much smaller reproduction case, which we can convert into a test case and fix the bug. |
yes, i reproduce it with this vagrantfile: Vagrant.configure(2) do |config|
config.vm.box = "xenial64"
config.vm.box_url = "http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-vagrant.box"
config.vm.network "private_network", ip: "192.168.33.10"
end
|
Ubuntu versions prior to 16.04 always returned a successful exit status, even if one tried to down an interface that does not exist. This behavior changed in Ubuntu 16.04 to return an error. This commit preserves the old behavior. Fixes GH-7155
#6871 is the same problem. Maybe you mark one as a duplicate. |
Waiting for the fix, I used the following workaround to test my puppet code base against Xenial:
The argument of ifconfig (eth1) may depend on the Xenial box you use; the one I built today using packer replaces eth1 by enp0s8 as soon as it can:
(and ... I don't know why). |
i confirm this to be a dup of #6871 |
0505771 worked for me, thanks! |
@ecirtap Thats another new feature with ubunut. The chaning the devise names to pci port and slot to better find a defunct network port in real life. |
@valkum and @ecirtap Check Ask Ubuntu for the specific kernel boot parameters: http://askubuntu.com/a/732638/16590 |
Although this could be worked around by sending the |
Is there a fix for this in the mean time, if that PR ever gets merged and put in a tag release, as this issue is causing halts in development cycles for myself and clients. |
i can confirm i had the same issue and ended up making my own box (vagrant init gbarbieru/xenial) using this script bit.ly/vagrant-xenial . |
I have been able to get a xenial box working using the code currently on vagrant master (the gem calls itself 1.8.2-dev) + the vbox image from boxcutter - boxcutter/ubuntu1604. The official ubuntu/xenial64 image is missing libnss-myhostname so all the I would love to find contact info for the maintainers of the official ubuntu vagrant images. It looks like a relatively small change might make the current code on master work. |
Also having this problem. |
+1 I am also encountering this issue |
+1 |
@geerlingguy Sorry for the delay - timezone differences made me unavailable until now. I guess you've already opened an issue so no need for me to do ;) |
When is this going to be addressed as a bugfix release into vagrant? We have today just upgraded to I notice there is a |
Additional: I have tried to install vagrant from git too to get around this, and I must say it ain't as simp,e as This really needs addressing as the fix has been available for ages now. Someone needs to take the lead here and resolve this. |
Vagrant 1.8.1 I had to do a little bit more work (hope that helps)
I still get the error on provisioning:
and I'm not sure what's that is referring to but I can ping the machine with my private address, so for now I'm good. Thanks for the people that posted their working solution that really helped me getting to that one that worked in my environment! |
i get the same.
it does however seem to be populating interfaces file just fine. |
FYI as a workaround you can try not setting the IP. I never use Vagrant to set the IP's... instead use a provisioner and that works just fine for my particular use case but since I work for Cumulus Networks I hit the networking with a lot of other things than just and IP and Vagrant doesn't support them all so for me there is no sense in fragmenting the provisioning between vagrant and another tool. Plus then I can reuse the automation in production with little/no modification. YMMV. |
Still having this problem; Vagrant 1.8.1
|
This would be really great if it got released and bumped. Affected as well. |
looks like the update was finally released. Thanks guys! |
Unfortunately, I now have the following error:
For reference (I can't see this linked here as I scan over the issue): https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1561250 |
confirm, same error for me when I try to add |
@flowerett Have you tried with the latest Vagrant? There was a new release a few days ago, but it's broken other things too |
$ vagrant --version |
$ vagrant --version
Vagrant 1.8.4 got this error now: Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:
mount -t vboxsf -o uid=`id -u ubuntu`,gid=`getent group ubuntu | cut -d: -f3` code_searchapp /code/searchapp
mount -t vboxsf -o uid=`id -u ubuntu`,gid=`id -g ubuntu` code_searchapp /code/searchapp
The error output from the last command was:
sudo: unable to resolve host ubuntu-xenial
mesg: ttyname failed: Inappropriate ioctl for device
mount: unknown filesystem type 'vboxsf' |
Possibly related to #7433. If you need a quick fix, then the only latest Ubuntu image that will work with Vagrant is Based on historic waiting times, this probably won't get fixed for quite a while. If you need it urgently then don't wait for a fix, roll your own. |
upped to vagrant 1.8.4, and also affected by the same issue as @flowerett and, 26 days later completely agree with @designermonkey |
Agreed. As a windows user, the past year of upgrading has caused problems every time. In the process of going from 1.8.3 to 1.8.4 now to fix the maximum nic issue. |
Thought 1.8.4 would fix this as it fixes a lot of similar issues, but running into the same problem:
I can SSH into the virtual machine, but cannot provision it. |
affected as well. |
Hi all, As I said to @foxx on Twitter, the boxes published by canonical under the In general, users have had more success with the boxes under the The bento boxes are open source and they are built using best practices and Packer. Unlike the "ubuntu" boxes, the bento boxes also support more providers such as VMware, Virtualbox, and Parallels. It's my least favorite thing to do, but I'm going to lock this issue. I'm doing this because I don't want this issue to become a black hole of "me too" and potentially mask real bugs. If you do continue to encounter errors, please open a new issue and follow the issue template that appears. This will assist us in providing a timely response and fix. |
Vagrant version
Vagrant 1.8.1
Host operating system
ubuntu 15.04 (any ubuntu)
Guest operating system
ubuntu 16.04 (15.10+ exhibit the problem)
Vagrantfile
Debug output
Vagrant fails first with
If we create /etc/network/interfaces.d/eth1.cfg like this
And powerdown/vagrant up the vm, the provisionning will work
The text was updated successfully, but these errors were encountered: