Error when execut vagrant up after run vagrant package

178 views
Skip to first unread message

Edgar Oliveira

unread,
Nov 4, 2015, 9:58:59 AM11/4/15
to Vagrant
Hello,

I used this command for copy vagrant box and install this box after format my pc. I used command "vagrant package" for create file "package.box" and after format my pc I edit file "Vagrantfile" with code line: "config.vm.box_url ="path_directory".

Another configuration it wasn't needed change because they were already set. When I run command "vagrant up" the virtual machine turn on but at the end of the process I received this message:

"The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/sbin/ip addr flush dev eth1 2> /dev/null

Stdout from the command:



Stderr from the command:

stdin: is not a tty"

This is all output after run vagrant up:

"
edecode 02 # vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box '02'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: 02_default_1446648757531_51805
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 80 => 8081 (adapter 1)
    default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
    default: Warning: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default:
    default: Guest Additions Version: 4.1.12
    default: VirtualBox Version: 4.3
==> default: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

/sbin/ip addr flush dev eth1 2> /dev/null

Stdout from the command:



Stderr from the command:

stdin: is not a tty
"

How I should resolve this?

Alvaro Miranda Aguilera

unread,
Nov 5, 2015, 5:57:18 AM11/5/15
to vagra...@googlegroups.com
Hello Edgard

long story short, are some things that need to be done before cloning a box.

Try this

log into the box with either vagrant ssh or the Virtualbox gui (you
may need to stop and start eh VM with the gui)

become root

ifconfig -a

if you see eth0 and eth1, you may have hit a feature (i wouldn't call it bug)

If your OS is RPM based (centos, redhat, oracle, sl):

rm /etc/udev/rules.d/70-persistent-net.rule
cd /etc/sysconfig/network-scripts
rm ifcfg-eth1
vi ifcfg-eth0

remove any UUID or MACADDRES if any.

poweroff

here you can package the box

on new boot should work.

If your OS is not RPM based, say is deb/ubuntu, delete the
/etc/udev/rules.d/70-persistent-net.rule

if not there,

try to give the output of ifconfig -a and share your Vagranfile

Thanks
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/fe67069f-e4ad-4ec5-b874-869f1eb969cc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages