diff --git a/docs/resources/virtual_environment_vm.md b/docs/resources/virtual_environment_vm.md index 4c2bdc02..34b3d7b3 100644 --- a/docs/resources/virtual_environment_vm.md +++ b/docs/resources/virtual_environment_vm.md @@ -293,7 +293,7 @@ output "ubuntu_vm_public_key" { to `ovmf`) - `datastore_id` (Optional) The identifier for the datastore to create the disk in (defaults to `local-lvm`). - - `file_format` (Optional) The file format. + - `file_format` (Optional) The file format (defaults to `raw`). - `type` (Optional) Size and type of the OVMF EFI disk. `4m` is newer and recommended, and required for Secure Boot. For backwards compatibility use `2m`. Ignored for VMs with cpu.architecture=`aarch64` (defaults diff --git a/fwprovider/tests/resource_vm_test.go b/fwprovider/tests/resource_vm_test.go index 2f25192e..2d59baee 100644 --- a/fwprovider/tests/resource_vm_test.go +++ b/fwprovider/tests/resource_vm_test.go @@ -609,6 +609,30 @@ func TestAccResourceVMDisks(t *testing.T) { RefreshState: true, }, }}, + {"efi disk", []resource.TestStep{ + { + Config: te.renderConfig(` + resource "proxmox_virtual_environment_vm" "test_efi_disk" { + node_name = "{{.NodeName}}" + started = false + name = "test-efi-disk" + + efi_disk { + datastore_id = "local-lvm" + type = "4m" + } + }`), + Check: resource.ComposeTestCheckFunc( + testResourceAttributes("proxmox_virtual_environment_vm.test_efi_disk", map[string]string{ + "efi_disk.0.datastore_id": "local-lvm", + "efi_disk.0.type": "4m", + }), + ), + }, + { + RefreshState: true, + }, + }}, {"ide disks", []resource.TestStep{ { Config: te.renderConfig(` diff --git a/proxmoxtf/resource/vm/vm.go b/proxmoxtf/resource/vm/vm.go index 18b0f1df..9496fca7 100644 --- a/proxmoxtf/resource/vm/vm.go +++ b/proxmoxtf/resource/vm/vm.go @@ -72,7 +72,7 @@ const ( dvDescription = "" dvEFIDiskDatastoreID = "local-lvm" - dvEFIDiskFileFormat = "qcow2" + dvEFIDiskFileFormat = "raw" dvEFIDiskType = "2m" dvEFIDiskPreEnrolledKeys = false dvTPMStateDatastoreID = "local-lvm"