From 0ffe75afa44995d4b648687281974e990029977e Mon Sep 17 00:00:00 2001 From: Pavel Boldyrev <627562+bpg@users.noreply.github.com> Date: Wed, 20 Dec 2023 21:28:43 -0500 Subject: [PATCH] fix(vm): update `smbios` during clone (#827) Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> --- example/resource_virtual_environment_vm.tf | 4 ++++ proxmoxtf/resource/vm.go | 2 ++ 2 files changed, 6 insertions(+) diff --git a/example/resource_virtual_environment_vm.tf b/example/resource_virtual_environment_vm.tf index 3537e8d3..3939b6cd 100644 --- a/example/resource_virtual_environment_vm.tf +++ b/example/resource_virtual_environment_vm.tf @@ -143,6 +143,10 @@ resource "proxmox_virtual_environment_vm" "example" { ] } + smbios { + serial = "my-custom-serial" + } + initialization { // if unspecified: // - autodetected if there is a cloud-init device on the template diff --git a/proxmoxtf/resource/vm.go b/proxmoxtf/resource/vm.go index 5012b821..23ff4301 100644 --- a/proxmoxtf/resource/vm.go +++ b/proxmoxtf/resource/vm.go @@ -2176,6 +2176,8 @@ func vmCreateClone(ctx context.Context, d *schema.ResourceData, m interface{}) d updateBody.StartOnBoot = &onBoot + updateBody.SMBIOS = vmGetSMBIOS(d) + updateBody.StartupOrder = vmGetStartupOrder(d) //nolint:gosimple