Open morsik opened 2 months ago
Hi @morsik 👋🏼
- Create a resource
proxmox_virtual_environment_vm
with 1 disk ondatastore_id
that uses Thin-LVM.
Are you creating an empty disk, or importing some existing disk image via file_id
, similar to https://github.com/bpg/terraform-provider-proxmox/blob/76ce03f6142f5811400ba3f3724a9a35decbefc3/docs/resources/virtual_environment_vm.md?plain=1#L40
@bpg great question! I totally forgot about this important detail!
We're cloning VM Template which already contains disk image with Debian and it's correctly resized later to desired size specified in first disk. VM Template disk is on Thin LVM pool.
And no warning/error about wrong format for that disk.
Describe the bug Proxmox API complains about using
qcow2
with Thin-LVM storage after trying to create VM with 2 disks...Or rather I should say: Provider does something magical and NOT COMPLAIN when creating first boot disk with wrong
qcow2
.To Reproduce This might be kinda hard to explain, as we're using our own module that uses
dynamic
function, but as a result we're doing this:proxmox_virtual_environment_vm
with 1 disk ondatastore_id
that uses Thin-LVM.terraform apply
.qcow2
as file format for Thin-LVM. And disk is actually created as RAW. What's weirder, is that secondterraform apply
doesn't show any difference even though provider tries to useqcow2
and Proxmox has setraw
anyway.terraform destroy
(IMPORTANT! as there's no errors when running consecutive applies!).proxmox_virtual_environment_vm
definition.terraform apply
again to create everything from scratch with 2 disks (one boot, and second for data).Manually specifying
file_format = "raw"
of course works, the issue is not with wrongfile_format
interpretation, it's about incorrect behaviour with first disk.Expected behavior Provider should fail at the beginning when boot disk was trying to create with wrong setting.
Additional context
terraform version
: