Hello

Did you check this part of the documentation?

The file uploads by the file provisioner are done as the *SSH or PowerShell
user*. This is important since these users generally do not have elevated
privileges on their own. If you want to upload files to locations that
require elevated privileges, we recommend uploading them to temporary
locations and then using the shell provisioner
<https://www.vagrantup.com/docs/provisioning/shell.html> to move them into
place.

Perhaps thats the problem?

Can you runt he vagrant up with debug mode?

vagrant destroy
vagrant up --debug

and share the verbose output in a gist ? (gist.github.com)

Thanks
alvaro


On Tue, Sep 19, 2017 at 9:31 AM, <[email protected]> wrote:

> Hi there,
>
> I'm new to vagrant and have no experience with linux. Installed vagrant on
> windows 10 and successfully got a virtual windows 2012 server up and
> running on virtualbox. My vagrantfile looks like this:
>
> *#Vagrant 1.6+ natively supports Windows guests over WinRM.*
> *Vagrant.require_version ">= 1.6"*
>
> *Vagrant.configure("2") do |config|*
>
> *config.vm.box = "testbox"*
>
> *config.vm.communicator = "winrm"*
>
> *    config.vm.provider :virtualbox do |v|*
> *        v.name <http://v.name> = "win2012_test"*
> *        v.cpus = 2*
> *        v.memory = 2048*
> *    end*
>
> *$install = <<SCRIPT*
> *choco install chocolatey -y -f*
> *choco install powershell -y -f*
> *choco install tomcat -y -f*
> *SCRIPT*
> *config.vm.provision "shell", inline: $install*
>
> *config.vm.provision "file", source: "template.war", destination:
> "C:\Program Files\Apache Software
> Foundation\tomcat\apache-tomcat-8.5.12\webapps\tmt.war"*
>
> *end*
>
> The file is in my vagrant root folder. The script finishes after a while
> but no VM created. When I remove the last line the VM is created
> succesfully again.
>
> The outcome of this project must be a VM with powershell 5 and apache
> tomcat installed. Then I need to copy several files, including a powershell
> script that needs to run on the vm.
>
>
> Any help would be appreciated.
>
> --
> 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/060592f3-fb91-4558-9aa4-acd62d53b45f%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/060592f3-fb91-4558-9aa4-acd62d53b45f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CAHqq0exckkGfbhohD%2BYb_O%3DzWfOpz9U9f8bUgqfbVb6ZiQYW6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to