Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize data disk size of storge type "Standard HDD LRS" will cause VM reboot #26550

Open
1 task done
allen9cs opened this issue Jul 5, 2024 · 0 comments
Open
1 task done
Labels

Comments

@allen9cs
Copy link

allen9cs commented Jul 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.9.1

AzureRM Provider Version

3.111.0

Affected Resource(s)/Data Source(s)

azurerm_managed_disk

Terraform Configuration Files

resource "azurerm_managed_disk" "example" {
    name                 = "example-data-disk"
    location             = azurerm_resource_group.example.location
    resource_group_name  = azurerm_resource_group.example.name
    storage_account_type = "Standard_LRS"
    create_option        = "Empty"
    disk_size_gb         = 40   #original value is 20, changing 20 -> 40
}

resource "azurerm_virtual_machine_data_disk_attachment" "example" {
    managed_disk_id    = azurerm_managed_disk.example.id
    virtual_machine_id = azurerm_windows_virtual_machine.example.id
    lun                = "10"
    caching            = "ReadWrite"
}


resource "azurerm_windows_virtual_machine" "example" {
    name                = "example-vm"
    resource_group_name = azurerm_resource_group.example.name
    location            = azurerm_resource_group.example.location
    size                = "Standard_DS1_v2"
    admin_username      = "adminuser"
    admin_password      = "P@ssw0rd1234!"
    network_interface_ids = [
        azurerm_network_interface.example.id,
    ]

    os_disk {
        caching              = "ReadWrite"
        storage_account_type = "Standard_LRS"
    }

    source_image_reference {
        publisher = "MicrosoftWindowsServer"
        offer     = "WindowsServer"
        sku       = "2019-Datacenter"
        version   = "latest"
    }
}

Debug Output/Panic Output

the size was changed properly, but vm was trigged restart/deallocate during data disk resize.

Expected Behaviour

the VM shouldn't restart/deallocate , resize a "Standard_LRS" data disk in azure portal GUI, it doesn't requires a server restart/deallocate, can be done online.

the "Premium_LRS" data disk doens't have this issue, terrraform can resize the disk size online, not trigger a vm restart.

Actual Behaviour

vm was trigged restart/deallocate during data disk resize.

Steps to Reproduce

terraform apply

Important Factoids

No response

References

No response

@github-actions github-actions bot added the v/3.x label Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant