After several attempts, just repeating the same steps (and removing manually the VBox's files) I got it to work. Here is the sequence of events in a successful build:
==> default: Attempting graceful shutdown of VM...
==> default: Clearing any previously set forwarded ports...
==> default: Exporting VM...
==> default: Compressing package to: /home/pablo/workspace/kapua/dev-tools/src/main/vagrant/baseBox/kapua-box-tmp/trusty64-kapua-dev-0.1.box
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'trusty64/kapua-dev-box-0.1' (v0) for provider:
box: Unpacking necessary files from: file:///home/pablo/workspace/kapua/dev-tools/src/main/vagrant/baseBox/kapua-box-tmp/trusty64-kapua-dev-0.1.box
==> box: Successfully added box 'trusty64/kapua-dev-box-0.1' (v0) for 'virtualbox'!
==> default: Destroying VM and associated drives...
... done.
creating demo vagrant machine
======> start demo vagrant machine
======> destroy old machine
==> default: VM not created. Moving on...
======> delete old Vagrant file
======> kapua vagrant demo machine... starting
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'trusty64/kapua-dev-box-0.1'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: demo
==> 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: 3306 (guest) => 3306 (host) (adapter 1)
default: 1883 (guest) => 1883 (host) (adapter 1)
default: 8883 (guest) => 8883 (host) (adapter 1)
default: 5005 (guest) => 5005 (host) (adapter 1)
default: 9300 (guest) => 9300 (host) (adapter 1)
default: 9200 (guest) => 9200 (host) (adapter 1)
default: 8080 (guest) => 8080 (host) (adapter 1)
default: 8443 (guest) => 8443 (host) (adapter 1)
default: 8000 (guest) => 8000 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH username: vagrant
default: SSH auth method: private key
==> 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.3.36
default: VirtualBox Version: 5.0
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /kapua => /home/pablo/workspace/kapua
default: /vagrant => /home/pablo/workspace/kapua/dev-tools/src/main/vagrant
==> default: Running provisioner: shell...
default: Running: inline script
==> default: stdin: is not a tty
==> default: TCP server running at tcp://
10.0.2.15:3306 (others can connect)
==> default: PG server running at pg://
10.0.2.15:5435 (only local connections)
==> default: (Update count: 0, 6 ms)
==> default: (Update count: 0, 2 ms)
==> default: (Update count: 0, 2 ms)
==> default: Failed to start a browser to open the URL
http://10.0.2.15:8082: Browser detection failed and system property h2.browser not set
======> kapua vagrant demo machine... starting DONE
======> please type 'vagrant ssh' to connect to the machine.
======> Follow the instructions to deploy the kapua components into the machine