Trouble with running ubuntu/xenial64 after "vagrant package"

672 views
Skip to first unread message

Ronny Næss

unread,
Mar 8, 2017, 5:01:45 AM3/8/17
to Vagrant
Hi.

I am in need of building my own box to be deployed in an offline environment.
I want to use ubuntu/xenial64 as base.

However that is not easy.

I have tried "vagrant package" on Linux (xenial64), macOS and Windows 10, and then added the boxes on the other operating systems.
Ubuntu Xenial64 will not work and always gives an error when running "vagrant up". I get VERR_PATH_NOT_FOUND and that is because it expects to find the logfile the same place as before (where packaged). There is only one exeption for this error and that is when i try to run on a mac when the box is packaged on windows. Then I get a session quit problem.  


I have also tried with ubuntu/trusty64 as base and that works every time. However I want to use Xenial if possible.

Anyone know a solution to this, other than to use Trusty?

-Ronny
Message has been deleted

Ronny Næss

unread,
Mar 8, 2017, 5:16:36 AM3/8/17
to Vagrant
Here is an example of the error. I did "vagrant up" on Linux (xenial64) and I did "vagrant package" on macOS

vagrant up

Bringing machine 'default' up with 'virtualbox' provider...

==> default: Importing base box 'macos/xenial64'...

==> default: Matching MAC address for NAT networking...

==> default: Setting the name of the VM: macOS-build_default_1488967715622_38318

==> default: Clearing any previously set network interfaces...

==> default: Preparing network interfaces based on configuration...

    default: Adapter 1: nat

==> default: Forwarding ports...

    default: 22 (guest) => 2222 (host) (adapter 1)

==> default: Booting VM...


There was an error while executing `VBoxManage`, a CLI used by Vagrant

for controlling VirtualBox. The command and stderr is shown below.


Command: ["startvm", "c8b66234-884c-4a53-9cf8-b6ae9b30ec36", "--type", "headless"]


Stderr: VBoxManage: error: RawFile#0 failed to create the raw output file /Users/ronny/Projects/vagrant-dev/ubuntu-xenial-16.04-cloudimg-console.log (VERR_FILE_NOT_FOUND)


VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole

Alvaro Miranda Aguilera

unread,
Mar 8, 2017, 6:34:10 AM3/8/17
to vagra...@googlegroups.com
Hello.

Use a different box.

Take this a 2 step process.

On the first step you take the original box, and you package.

Step1:

mkdir step1
cd step1
vagrant init -m cbednarski/ubuntu-1604

edit Vagrantfile

and add:

config.ssh.insert_key = false

This is required so the packaged box will work the insecure known key.

vagrant up
Do the changes you need, either manually or provisioning (update the Vagrantfile to run your scripts)

vagrant halt

do the package.

Step 2:

deploy a new box from this saved box.

Let me know if you need more help on this, but what I have outlined, and using Chris box, it will work for you. the insert_key = false is important


--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/0564f9bf-9f94-48ad-a233-2848ce3e8d69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Ronny Næss

unread,
Mar 11, 2017, 6:24:19 AM3/11/17
to Vagrant
Thanks. 

cbednarski had fixed the key issue in a newer version and 2 steps was no longer needed.
I also found geerlingguy/ubuntu1604 with 300 thousand downloads. Seems like a good and working alternative to ubuntu/xenial64.

-Ronny
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages