3

The VSTS task - Azure File Copy keeps giving me an access denied error, even though I have configured WinRM over HTTPS for my Azure VM.

I am running the build agent locally (not hosted) and from my machine, I am successfully able to PsRemote into my Azure VM.

i.e. Enter-PsSession executes successfully.

I tried giving all sorts of combinations for the user from .\Administrator .\administrator nithish and .\nithish (which is the user name I chose while creating the VM)

What can be the problem here?

Detailed error

Connecting to remote server dscwitharm.eastus2.cloudapp.azure.com failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.To fix WinRM connection related issues, select the 'Enable Copy Prerequisites' option in the task. If set already, and the target Virtual Machines are backed by a Load balancer, ensure Inbound NAT rules are configured for target port (5986). Applicable only for ARM VMs. For more info please refer to https://aka.ms/azurefilecopyreadme

2 Answers2

3

Please try to use HOSTNAME\username instead of username in VSTS task. I had same problem, and it solved now.

In Your case it will be DSCWITHARM\admin_username_or_whatever_you_are_using

-1

I have similar problem.

During vsts task copy to ARM VMs does not work at all. I can conect to target host via ssl version of WinRM using powershell.

Upload on blob storage also works fine.

2016-09-16T13:22:30.9409877Z ##[error]Connecting to remote server _______________ failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.To fix WinRM connection related issues, select the 'Enable Copy Prerequisites' option in the task. If set already, and the target Virtual Machines are backed by a Load balancer, ensure Inbound NAT rules are configured for target port (5986). Applicable only for ARM VMs. For more info please refer to https://aka.ms/azurefilecopyreadme

2016-09-16T13:22:30.9878694Z Finishing task: AzureFileCopy

Community
  • 1
  • 1
  • 1
    this does not answer the question. If you have an issue, please ask your own question. – ADyson Sep 16 '16 at 13:47
  • Try enabling the checkbox in the task, that says configure pre-requisites. It will automatically configure WinRm over HTTPs for you. That is what worked for me. I didn't post that as the answer because, that doesn't get the root cause of the problem that I was having. – Nithish Inpursuit Ofhappiness Sep 17 '16 at 19:06