-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Provision Windows 10 VMs Over Secure WinRM (5986) #3132
Comments
Does this work for you with the example as is? In other words, does it work when you use a Windows Server SKU but does not work when you use a Windows client SKU? |
Yes, as I mentioned in my notes, the example works just fine using Windows Server, but fails using Windows Desktop (Windows 10, in this case). |
Does it work if you configure the Windows 10 image manually (without Terraform)? The reason that I ask is that I know there are some difference in how server and client work with WinRM so want to determine if this is an issue with the TF configuration or something else. |
@grayzu I'm not able to test this manually using my personal account, as it seems the Windows 10 VMs are only available for use if you or your company is contracted under a volume licensing agreement (which I am not). From what I know about enabling WinRM on Windows desktops (e.g., Windows 10), the process is the same as the one used in the aforementioned example (populate the unattended installation files and ultimately call |
@0xdeadbeefJERKY as @grayzu has mentioned I believe the defaults for WinRM on a Client and a Server are different; out of interest if you provision a Windows Client VM, remote in and run resource "null_resource" "test" {
provisioner "remote-exec" {
connection {
host = "IP or FQDN of the machine"
user = "someusername"
password = "ThisIsDog2029"
timeout = "3m"
type = "winrm"
https = true
port = 5986
use_ntlm = true
insecure = true
}
}
} In addition, it'd be good to confirm if ports Thanks! |
@tomasaschan
|
@akingscote you want @tombuildsstuff :) |
👋 As @grayzu has mentioned the configuration for WinRM differs between Windows Client (Windows 10) and Windows Server - but on the host/image themselves rather than within Terraform. Since this configuration is outside the scope of this forum, I'm going to close this issue for the moment - but I'm going to point you towards this example which includes an example of using sysprep to enable WinRM which I believe should assist you here. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
Community Note
Terraform (and AzureRM Provider) Version
Terraform v0.11.13
Affected Resource(s)
azurerm_virtual_machine
azurerm_key_vault
azurerm_key_vault_certificate
local-exec
provisioner (winrm)Terraform Configuration Files
Code was directly copied from the example in this repository, substituting the credentials for my active Azure subscription credentials and modifying the
storage_image_reference
as follows:Debug Output
Set both
TF_LOG
andTF_LOG_PATH
, but the content is never written to the specified file. Will update once this is resolved.Panic Output
N/A
Expected Behavior
Terraform deploys a Windows 10 (RS5 Pro) VM and "provisions" said VM by running
cd C:\Windows
and subsequently executedir
using the secure WinRM provider (over HTTPS using port 5986). This is facilitated by automatically generating a Key Vault and self-signed certificate.Actual Behavior
The VM is created, but the provisioning process hangs and ultimately times out, resulting in the following error:
Steps to Reproduce
storage_image_reference
block with Windows 10 values, for example:terraform init
terraform apply
Important Factoids
N/A
References
The text was updated successfully, but these errors were encountered: