Figured it out. There was an error in my Vagrantfile. It was being run, but 
the section of config I used to configure my ssh settings was not getting 
reached.

Thanks,

||Rich

On Wednesday, February 3, 2016 at 8:32:01 AM UTC-5, Richard Wellum wrote:
>
> Hi,
>
> I did use vagrant package to create the box.
>
> And the vagrant file got packaged correctly (./include/Vagrantfile and 
> ./Vagrantfile (which points to the former)) as the above files show.
>
> But when I use the box, the embedded vagrant file is not getting run - 
> that's my issue.
>
> If I do a 'vagrant init <name>' it creates a ./Vagrantfile that does not 
> point to my embedded Vagrant file in the box.
>
> So my question is how do I run my box, but use the .Vagrantfile included 
> in the box that points to ./include/Vagrantfile (essentially ignoring or 
> not doing 'vagrant init')?
>
> I know it must be possible because why else have the --vagrantfile option.
>
> Thanks,
>
> ||Rich
>
> On Wednesday, February 3, 2016 at 5:41:49 AM UTC-5, Alvaro Miranda 
> Aguilera wrote:
>>
>> Hello,
>>
>> Can you try using vagrant package?
>>
>> z2-3:~ kikitux$ vagrant package -h
>>
>> Usage: vagrant package [options] [name]
>>
>>
>> Options:
>>
>>
>>         --base NAME                  Name of a VM in virtualbox to 
>> package as a base box
>>
>>         --output NAME                Name of the file to output
>>
>>         --include FILE...            Additional files to package with the 
>> box
>>
>>         --vagrantfile FILE           Vagrantfile to package with the box
>>
>>     -h, --help                       Print this help
>>
>> z2-3:~ kikitux$ 
>>
>>
>> Thanks
>>
>> Alvaro.
>>
>> On Wed, Feb 3, 2016 at 8:09 AM, Richard Wellum <[email protected]> 
>> wrote:
>>
>>> I used vagrant package to create the following:
>>>
>>> *$ tar xfv *.box*
>>>
>>> *x ./box-disk1.vmdk*
>>>
>>> *x ./box.ovf*
>>>
>>> *x ./include/*
>>>
>>> *x ./include/_Vagrantfile*
>>>
>>> *x ./Vagrantfile*
>>>
>>>
>>> The ./Vagrantfile correctly loads the included Vagrantfile:
>>>
>>>
>>> c*at Vagrantfile *
>>>
>>> *Vagrant::Config.run do |config|*
>>>
>>> *  # This Vagrantfile is auto-generated by `vagrant package` to contain*
>>>
>>> *  # the MAC address of the box. Custom configuration should be placed 
>>> in*
>>>
>>> *  # the actual `Vagrantfile` in this box.*
>>>
>>> *  config.vm.base_mac = "080027111C84"*
>>>
>>> *end*
>>>
>>>
>>> *# Load include vagrant file if it exists after the auto-generated*
>>>
>>> *# so it can override any of the settings*
>>>
>>> *include_vagrantfile = File.expand_path("../include/_Vagrantfile", 
>>> __FILE__)*
>>>
>>> *load include_vagrantfile if File.exist?(include_vagrantfile)*
>>>
>>>
>>> How do I install this box so that it runs ./Vagrantfile and then finds 
>>> the embedded Vagrant file. I've tried:
>>>
>>>
>>>  vagrant init .mybox.box
>>>
>>>  vagrant up
>>>
>>>
>>> And:
>>>
>>>  cd to box location
>>>
>>>  vagrant init boxname
>>>
>>>  vagrant box add --name boxname mybox.box
>>>
>>>  vagrant up
>>>
>>>
>>> And:
>>>
>>>  vagrant box add --name boxname mybox.box
>>>  vagrant init boxname
>>>
>>>  vagrant up
>>>
>>>
>>> The embedded Vagrantfile is never ran. I think of these all, the first 
>>> should work as it doesn't create a default Vagrant init file.
>>>
>>>
>>> vagrant version 1.8.1
>>>
>>>
>>> Thanks!
>>>
>>> -- 
>>> 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 [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/vagrant-up/84fe5ffc-61c8-43fb-9523-3849d658f002%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/vagrant-up/84fe5ffc-61c8-43fb-9523-3849d658f002%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/430847d7-dda0-428a-b6c0-0dfd9fe5934e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to