Skip to content

[BUG] VM created with provider has wrong disk format type in state #96

@TheUnixRoot

Description

@TheUnixRoot

Describe the bug
I created a vm in Proxmox 6.3 with disk type "raw", it works but now in state it is shown as type "qcow2", so it is marked as need to be recreated

To Reproduce
With Proxmox 6.3-2 and provider 0.4.4

Steps to reproduce the behavior:

  1. Deploy a virtual machine with raw disk type:
resource "proxmox_virtual_environment_vm" "vm" {
  ...
  disk {
    datastore_id = "shared"
    interface    = "virtio0"
    file_format  = "raw"
    size         = var.pm_rootdisk_size
  }
  ...
}
  1. Do a plan afterwards
  2. It shows that the resource needs to be recreated because of this:
      ~ disk {
          ~ file_format  = "qcow2" -> "raw" # forces replacement
            # (3 unchanged attributes hidden)
        }
  1. See error

Expected behavior
It should be "raw" also in state.

Additional context
If vm could be imported, this issue can be workaround, but this is not able to be done at the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions