From 1de92947666d45fdcae881e3a6bd651bfea493a4 Mon Sep 17 00:00:00 2001 From: Abdelfadeel Farag Date: Tue, 7 Feb 2023 01:19:44 +0100 Subject: [PATCH] fix(vm): ignore ssd disk flag with virtio interface (#231) --- proxmoxtf/resource_virtual_environment_vm.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/proxmoxtf/resource_virtual_environment_vm.go b/proxmoxtf/resource_virtual_environment_vm.go index bcec0b00..cf726527 100644 --- a/proxmoxtf/resource_virtual_environment_vm.go +++ b/proxmoxtf/resource_virtual_environment_vm.go @@ -2488,9 +2488,12 @@ func resourceVirtualEnvironmentVMGetDiskDeviceObjects( diskDevice.Size = &sizeString diskDevice.SizeInt = &size diskDevice.IOThread = &ioThread - diskDevice.SSD = &ssd diskDevice.Discard = &discard + if !strings.HasPrefix(diskInterface, "virtio") { + diskDevice.SSD = &ssd + } + if len(speedBlock) > 0 { speedLimitRead := speedBlock[mkResourceVirtualEnvironmentVMDiskSpeedRead].(int) speedLimitReadBurstable := speedBlock[mkResourceVirtualEnvironmentVMDiskSpeedReadBurstable].(int)