Did you get to fix this issue?

On Wednesday, October 30, 2013 9:52:14 AM UTC-5, Chris Trapeni wrote:
>
> BTW, it looks like my test case is incorrect.  The windows environment 
> variable %windir% is not getting translated.  If I do a "mkdir 
> c:\windows\test_dir" it completes just fine.
>
> Now, back to the reason I started looking at permissions.  The following 
> command runs fine on the VM, but not from shell provisioning  "winrm 
> quickconfig -q".  When run from vagrant, I get this error:
>
> WSManFault
>     Message = Access is denied.
>
> On Monday, October 28, 2013 1:24:34 PM UTC-4, Chris Trapeni wrote:
>>
>> I was having problems getting shell provisioning to work on my windows 
>> vm.  It appeared to be permissions related so I added some quick 
>> verification checks:
>>
>> This command creates a directory:
>>
>>     config.vm.provision "shell" do |s|
>> s.inline = "mkdir c:\\test_dir"
>>   end
>>
>> This one does not create a directory:
>>     config.vm.provision "shell" do |s|
>> s.inline = "mkdir %windir%\\test_dir"
>>   end
>>
>> I believe this is due to the shell user not running the commands as the 
>> local Administrator.  The guest VM only has one user ( vagrant/vagrant 
>> user)  and this user is in the Administrators group.  The shell command 
>> that lead me down this path was "powershell winrm quickconfig -q" and 
>> that fails with "WSManFault Message = Access is denied."  I added 
>> another shell command with a redirect and I have confirmed that the shell 
>> commands are being run as the user "vagrant".
>>
>> Any ideas what I have setup wrong?  I can't continue with provisioning if 
>> the shell commands won't be run as Administrator.
>>
>> This is what I am using:
>>
>>    - Windows 7 x64 (Host)
>>    - Windows 2008 R2 x64 (Guest)
>>    - Vagrant: 1.3.4
>>    - VirtualBox: 4.2.18
>>
>>

-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to