[QUESTION] How to use .WithWinRM() ?
See original GitHub issueQuestion
I have a question about the WithWinRM
method for the VirtualMachine creation using the .NET Azure SDK.
I’m using this call to create a VM:
var vm = await azure.VirtualMachines.Define("testVM")
.WithRegion("East US")
.WithExistingResourceGroup("TestRg")
.WithExistingPrimaryNetworkInterface("testVM_nic")
.WithWindowsCustomImage(customImage.Id)
.WithAdminUsername("Testuser")
.WithAdminPassword("Test12345678")
.WithWinRM(new WinRMListener(ProtocolTypes.Https, certificateUrl))
.WithComputerName("testVM")
.WithSize(VirtualMachineSizeTypes.StandardDS3V2)
.CreateAsync();
After running this I get an error:
Certificate https://xxx.vault.azure.net/secrets/xxx/db1baf0c860f456ks4nckh06d86e1ec8594 specified in WinRM configuration is not defined in the VM model secrets.
How can I specify the OsProfile.Secrets
option with the fluent API?
Why is this not a Bug or a feature Request? Not sure if I’m using it correctly, even though I found nothing in the documentation about this.
Setup (please complete the following information if applicable):
- OS: Windows
- IDE : Visual Studio 2019
- Microsoft.Azure.Management.Fluent 1.26.1
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- [x ] Query Added
- [x ] Setup information Added
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Understanding and troubleshooting WinRM connection and ...
This is the first question I ask. If winrm is not listening for requests, then there is nothing to connect to. There are...
Read more >Configure and listen successfully using WinRM in powershell
To determine which group policy is configuring your WinRM you can run the following from an administrative command prompt:
Read more >How to test WinRM connectivity using PowerShell
We need to use Test- WS command for it. Test-WSMan -ComputerName Test1-Win2k12. If you get the below response, then the WinRM connection is ......
Read more >Winrm - Windows CMD
Secure communication with local and remote computers using web services. ... WinRM is the Microsoft implementation of WS-Management Protocol, a standard Simple ...
Read more >Compromising Yourself with WinRM's “AllowUnencrypted = ...
The tool is using 'Authorization: Basic', as you can see from the top. The rest of the red is the content of the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Mishu
Would you please upgrade to 1.30.0 or later? Latest is 1.33.0. Related PR https://github.com/Azure/azure-libraries-for-net/pull/926 Related doc https://docs.microsoft.com/en-us/azure/virtual-machines/windows/winrm
It would have an additional API
WithVaultSecret
to set up keyvault setting.I assume upgrading to 1.30.0+ would solve the problem (as in PR mentioned).
Reopen it if you still find issue.