No problem,

I've did that for a while, but having the box in the vagrant cloud allows
the users to just do vagrant up from a Vagrantfile, without additional
commands.

I've used this script to upload the box from a ubuntu vm.

#!/bin/bash
export VAGRANT_CLOUD_TOKEN=<add token>

# Goto https://app.vagrantup.com/settings/security and generate a token.

provider=virtualbox
version=0.0.1
name=windows-10-1709-base-winrm
username=<your-username>

# GET /api/v1/box/:username/:name/version/:version/provider/:provider/upload
# Prepare the provider for upload/get an upload URL
response=$(curl \
  --header "Authorization: Bearer $VAGRANT_CLOUD_TOKEN" \

https://app.vagrantup.com/api/v1/box/$username/$name/version/$version/provider/virtualbox/upload
)

# Requires the jq command
upload_path=$(echo $response | jq .upload_path -r)

curl \
  $upload_path \
  --request PUT \
  --upload-file windows-10-1709-base-winrm.box

you can check here the original script,
https://www.vagrantup.com/docs/vagrant-cloud/api.html#upload-a-provider,
I've just modified the "jq . upload_path -r" as it is required in ubuntu.



On Thu, May 17, 2018 at 4:01 AM, Jordan Borean <jborea...@gmail.com> wrote:

> Thanks Mário
>
> I suppose beggars can't be choosers considering they are storing my boxes
> for free. I'll look into storing them on S3 and sharing the URL instead of
> uploading directly, that may be better for me in the end.
>
> Thanks
>
> Jordan
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/vagrant-up/a7c4a13c-ef89-4943-a3df-fec5d0f87dfe%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/a7c4a13c-ef89-4943-a3df-fec5d0f87dfe%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 vagrant-up+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CALGGjJZK9K5ApUz4iAZu%2BfMtU7oac3m_-yjPHArH1fYB_Lk_2g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to