Hello Team,
I have the question about Logic behind deploying a Linux VM in Azure. I am deploying an VM from the marketplace. VM is Cisco ISE.
When I deploy version 3.2 or 3.3 of Cisco ISE via terraform, it goes really well and completes within 1 min 50 seconds on average.
When I deploy version 3.4 of Cisco ISE via terraform, it takes ~ 20 minutes, terraform than times out.
azurerm_linux_virtual_machine.ise-azure-1: Still creating… [20m0s elapsed]
azurerm_linux_virtual_machine.ise-azure-2: Still creating… [20m0s elapsed]
azurerm_linux_virtual_machine.ise-azure-1: Still creating… [20m10s elapsed]
azurerm_linux_virtual_machine.ise-azure-2: Still creating… [20m10s elapsed]
azurerm_linux_virtual_machine.ise-azure-1: Still creating… [20m20s elapsed]
azurerm_linux_virtual_machine.ise-azure-2: Still creating… [20m20s elapsed]
╷
│ Error: waiting for creation of Linux Virtual Machine: (Name “ISE1-Azure” / Resource Group “ekorneyc-RG”): Code=“OSProvisioningTimedOut” Message=“OS Provisioning for VM ‘ISE1-Azure’ did not finish in the allotted time. The VM may still finish provisioning successfully. Please check provisioning state later. For details on how to check current provisioning state of Windows VMs, refer to States and billing status - Azure Virtual Machines | Microsoft Learn and Linux VMs, refer to Search - Microsoft Bing”
│
│ with azurerm_linux_virtual_machine.ise-azure-1,
│ on main.tf line 94, in resource “azurerm_linux_virtual_machine” “ise-azure-1”:
│ 94: resource “azurerm_linux_virtual_machine” “ise-azure-1” {
During whole ~20 minutes VM is stuck in Azure in Creating state. My assumption here was that VM needs to move to Running State, so Terraform will treat this resource as completed.
Initially I was suspecting something wrong is with the Azure or VM, but what I noticed as soon as terraform times out in ~20 minutes, resource immediately goes to running state, it seems like while the deployment script is running Azure waits for some call from terraform, which logically doesn’t make too much sense to me, but it seems this is what is happening based on observed behavior.
Question, what are the possible dependencies, why the resource takes 20 minutes to create.
Btw manual creation of resource version 3.4 takes less than 2 minutes.