Reputation: 14327
I am trying to setup SQL Server DACPAC project deploying to SQL Server on a VM through Visual Studio Team Services Continuous Integration scripts.
Here is my build definition
For server name I entered public IP of the VM, for Admin Login I entered Admin Account user name on that VM,
Then I got the following error in build
[error]Microsoft.PowerShell.Commands.WriteErrorException: Deployment on one or more machines failed. System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to remote server xx.xxx.xx.xx failed with the following error message : WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled and allows access from this computer. By default, the WinRM firewall exception for public profiles limits access to remote computers within the same local subnet. For more information, see the about_Remote_Troubleshooting Help topic.
Then I tried the following powershell commands on SQL VM
Enable-PSRemoting -Force
winrm quickconfig -transport:http
Second command hang up with the following message
Configure LocalAccountTokenFilterPolicy to grant administrative rights remotely to local users.
Upvotes: 0
Views: 613
Reputation: 19223
Firstly, you should ensure winrm service is listening.
netstat -ant|findstr 5985
By default, the port is listening on 5985. If the service is not listening, please execute
winrm quickconfig
Secondly, you should open port on VM Windows Firewall and Azure NSG(Inbound rules).
For test, you should ensure you could winrm your SQL VM on your local PC.
Upvotes: 1