Upgrading VirtualBox Guest Additions from 4.3.x to 5.0.x packaged causes Authentication Failure

68 views
Skip to first unread message

Corey Mudd

unread,
Oct 14, 2015, 8:36:43 PM10/14/15
to Vagrant
Hi,

I am stuck with trying to upgrade VirtualBox guest additions 4.3 to VirtualBox guest additions 5.0.  I created a package with VirtualBox 4.3 using Ubuntu 12 with GNOME GUI and can create using Vagrant 1.7.4 just fine.  When I upgrade VirtualBox 4.3 to VirtualBox 5.0 and use the same package on Vagrant 1.7.4, again, it comes up fine with a warning to install VirtualBox guest additions 5.0.  Now, when I install VirtualBox guest additions 5.0, restart vm, then package it up again (vagrant package --output newVM.box), and then:

vagrant destroy
vagrant box remove goodbox
vagrant box add goodbox newVM.box
vagrant up

I get the following error:

Warning: Authentication failure. Retrying...


And this will just keep repeating until it times out, never running the provisions.  I am at a lost as to why a previous package working with VirtualBox guest additions 4.3 works against VirtualBox 5.0 but won't come up when VirtualBox guest additions match.  Please let me know if you would like more information.  I have tried this on both Windows 7 and OSX El Capitan and they produce the same exact errors.


Thanks,

Corey Mudd

Alvaro Miranda Aguilera

unread,
Oct 15, 2015, 4:29:54 AM10/15/15
to vagra...@googlegroups.com
Hello,

2 things to check.

1. You need to use config.ssh.insert_key = false on the base you are
doing. Otherwise Vagrant will insert a new ssh key. With this you keep
the insecure one.
2. remove if present /etc/udev/rules.d/70-persistent-net.rules

With that should work.

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/fe7f766f-af4b-4e21-b154-0fb0a9a48254%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Corey Mudd

unread,
Oct 15, 2015, 8:26:07 PM10/15/15
to Vagrant
Thank you for the response but unfortunately still same problem.  I already had config.ssh.insert_key=false in my VagrantFile for original and the upgraded one.  And I removed /etc/udev/rules.d/70-persistent-net.rules before I created a new package but still same Authentication failure.  Anything else I can try?

Thanks,
Corey

Alvaro Miranda Aguilera

unread,
Oct 16, 2015, 5:46:14 AM10/16/15
to vagra...@googlegroups.com
Ensure  config.ssh.insert_key = false  is on the Vagrant file

Do vagrant destroy and vagrant up

Run this before shutdown the VM / before packing

sed -i -e 's/Defaults\\s*requiretty$/#Defaults\trequiretty/' /etc/sudoers
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.ori
sed -i -e '/#UseDNS yes/a UseDNS no' /etc/ssh/sshd_config
for nic in /etc/sysconfig/network-scripts/ifcfg-*; do
sed -i /HWADDR/d $nic 2>&1
sed -i /UUID/d $nic 2>&1
done
[ -f /etc/udev/rules.d/70-persistent-net.rules ] && rm /etc/udev/rules.d/70-persistent-net.rules

Let’s see how it goes.

What Box are you using in Vagrant?


Corey Mudd

unread,
Oct 16, 2015, 12:37:54 PM10/16/15
to Vagrant
/etc/sysconfig does not exist.  Remember this is Ubuntu so I think you are looking for /etc/network/interfaces?  But not sure if you want me to add the same text as you have for ifcfg-* file.  Let me know if you want me to add the same lines or it needs to be different.

And I am using a custom Vagrant box following these steps http://aruizca.com/steps-to-create-a-vagrant-base-box-with-ubuntu-14-04-desktop-gui-and-virtualbox/ but using Ubuntu 12.02 just because the GUI worked.  This was using VirtualBox 4.x and Vagrant 1.7.2 (I think).

Alvaro Miranda Aguilera

unread,
Oct 16, 2015, 7:17:53 PM10/16/15
to vagra...@googlegroups.com
Hello,

I think the best you build your own box with packer.

Happy to help if you want.

Please do this tutorial:
https://atlas.hashicorp.com/tutorial/packer-vagrant/1

You will be using Ubuntu 12.04 from here
https://github.com/hashicorp/atlas-packer-vagrant-tutorial

When done, you can modify to include graphical desktop

If you want a 14.04 you can use this:
https://github.com/cbednarski/ubuntu-1404-packer

Same, then modify and add desktop

in the log run will be easier to manage and maintain.

Alvaro
> https://groups.google.com/d/msgid/vagrant-up/bd856aab-8d60-411d-84f2-806abe80bd17%40googlegroups.com.

Corey Mudd

unread,
Oct 21, 2015, 2:37:00 PM10/21/15
to Vagrant
Doing the tutorial does work and I was able to get Ubuntu 14.04 going as well so extra bonus.  Thanks for the help!
Reply all
Reply to author
Forward
0 new messages