You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
Do not leave "+1" or other comments that do not add relevant information or questions.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Terraform
1.8.4
Terraform Provider
2.8.1, 2.7.0, 2.6.1
VMware vSphere
8.0.1
Description
If the scsi_controller_count is updated a virtual machine receives a reboot. This only happens if scsi_controller_count > the actual scsi controllers on the virtual machine.
Some test cases we performed on an existing virtual machine with two disks, both on the first scsi controller. (unit number 0,1 and scsi_controller_count 1)
Add new disk on unit number 15, the following plan is applied
Removing previously added disk, apply and add it again produces the same plan, but doesn't reboot the machine. Main difference is, is that the actual scsi controller on the virtual machine is not removed.
Removing previously added disk, remove the scsi controller in vSphere manually, and adding the disk again, produces again the same plan as above. But now the virtual machine is rebooted again.
Adding an additional disk to an existing scsi controller no reboot is done.
Affected Resources or Data Sources
resource/vsphere_virtual_machine
Terraform Configuration
resource "vsphere_virtual_machine" "virtual_machine" {
# Make a new list of all the scsi_controller_id numbers, to retrieve the biggest number.
# Increment by 1 to have always at least one scsi controller.
scsi_controller_count = var.scsi_controller_count
disk {
label = "label0"
size = 200
unit_number = 1
}
}
Debug Output
[INFO] Starting apply for module.module.virtual_machines["..."].module.vsphere_virtual_machine.vsphere_virtual_machine.virtual_machine
[DEBUG] module.module.virtual_machines["..."].module.vsphere_virtual_machine.vsphere_virtual_machine.virtual_machine: applying the planned Update change
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] vsphere_virtual_machine (ID = 42300f4a-a93e-f22f-e1d7-48e9522eea83): Performing update: timestamp="2024-06-20T11:07:35.070+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] tagsClientIfDefined: Loading tagging client: timestamp="2024-06-20T11:07:35.070+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] Locating virtual machine with UUID "42300f4a-a93e-f22f-e1d7-48e9522eea83": timestamp="2024-06-20T11:07:35.070+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] Using SearchIndex to look up UUID "42300f4a-a93e-f22f-e1d7-48e9522eea83": timestamp="2024-06-20T11:07:35.070+0200"
[INFO] provider.terraform-provider-github_v6.2.2: [INFO] Setting write_delay_ms to 1000: timestamp="2024-06-20T11:07:35.092+0200"
[INFO] provider.terraform-provider-github_v6.2.2: [DEBUG] Setting read_delay_ms to 0: timestamp="2024-06-20T11:07:35.092+0200"
[INFO] provider.terraform-provider-github_v6.2.2: [DEBUG] Setting retry_delay_ms to 0: timestamp="2024-06-20T11:07:35.092+0200"
[INFO] provider.terraform-provider-github_v6.2.2: [DEBUG] Setting max_retries to 3: timestamp="2024-06-20T11:07:35.092+0200"
[INFO] provider.terraform-provider-github_v6.2.2: [DEBUG] Setting retriableErrors to map[500:true 502:true 503:true 504:true]: timestamp="2024-06-20T11:07:35.092+0200"
[INFO] provider.terraform-provider-github_v6.2.2: [DEBUG] Setting parallel_requests to false: timestamp="2024-06-20T11:07:35.092+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] VM "/.../vm/.../.../.............." found for UUID "42300f4a-a93e-f22f-e1d7-48e9522eea83": timestamp="2024-06-20T11:07:35.102+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] Processing tags for object "vm-215626": timestamp="2024-06-20T11:07:35.102+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] Fetching properties for VM "/.../vm/.../.../..............": timestamp="2024-06-20T11:07:35.102+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] vsphere_virtual_machine (ID = 42300f4a-a93e-f22f-e1d7-48e9522eea83): Expanding old config. Ignore reboot_required messages: timestamp="2024-06-20T11:07:35.169+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] vsphere_virtual_machine (ID = 42300f4a-a93e-f22f-e1d7-48e9522eea83): Building config spec: timestamp="2024-06-20T11:07:35.169+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] vsphere_virtual_machine (ID = 42300f4a-a93e-f22f-e1d7-48e9522eea83): Expanding of old config complete: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] vsphere_virtual_machine (ID = 42300f4a-a93e-f22f-e1d7-48e9522eea83): Building config spec: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] NormalizeBus: Normalizing first 2 controllers on SCSI bus to device type pvscsi: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] NormalizeBus: Normalizing first 0 controllers on SATA bus: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] NormalizeBus: Normalizing first 2 controllers on IDE bus: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] NormalizeBus: Current SCSI bus contents: pvscsi-1000,<nil>: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] NormalizeBus: Creating SCSI controller of type pvscsi at bus number 1: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] applyDeviceChange: Applying changes: (add: *types.ParaVirtualSCSIController at key -201): timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] applyDeviceChange: Device list before changes: ide-200,ide-201,ps2-300,pci-100,sio-400,keyboard-600,pointing-700,video-500,vmci-12000,pvscsi-1000,disk-1000-0,disk-1000-1,ethernet-0: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] applyDeviceChange: Device list after changes: ide-200,ide-201,ps2-300,pci-100,sio-400,keyboard-600,pointing-700,video-500,vmci-12000,pvscsi-1000,disk-1000-0,disk-1000-1,ethernet-0,pvscsi--201: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] NormalizeBus: Current SATA bus contents:: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] NormalizeBus: Current IDE bus contents: device-200,device-201: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] NormalizeBus: Outgoing device list: ide-200,ide-201,ps2-300,pci-100,sio-400,keyboard-600,pointing-700,video-500,vmci-12000,pvscsi-1000,disk-1000-0,disk-1000-1,ethernet-0,pvscsi--201: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] NormalizeBus: Outgoing device config spec: (add: *types.ParaVirtualSCSIController at key -201): timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] vsphere_virtual_machine (ID = 42300f4a-a93e-f22f-e1d7-48e9522eea83): SCSI bus has changed and requires a VM restart: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] DiskApplyOperation: Beginning apply operation: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] DiskApplyOperation: Looking for resources to delete: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] DiskApplyOperation: Looking for resources to create or update: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] DiskApplyOperation: Resources not being changed:: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] disk.2 (key 0 at <new device>) (<unknown>): Creating disk: timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] Locating datastore with ID "datastore-17292": timestamp="2024-06-20T11:07:35.170+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] Datastore with ID "datastore-17292" found: timestamp="2024-06-20T11:07:35.188+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] ControllerForCreateUpdate: Looking for controller type scsi: timestamp="2024-06-20T11:07:35.188+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] pickController: Looking for scsi controller at bus number 1: timestamp="2024-06-20T11:07:35.188+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] pickSCSIController: Found controller: pvscsi--201: timestamp="2024-06-20T11:07:35.188+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] ControllerForCreateUpdate: Found controller: pvscsi--201: timestamp="2024-06-20T11:07:35.188+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] disk.2 (key -202 at scsi:1:0) (<unknown>): Device config operations from create: (add: *types.VirtualDisk at key -202): timestamp="2024-06-20T11:07:35.188+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] disk.2 (key -202 at scsi:1:0) (<unknown>): Create finished: timestamp="2024-06-20T11:07:35.188+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] applyDeviceChange: Applying changes: (add: *types.VirtualDisk at key -202): timestamp="2024-06-20T11:07:35.188+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] applyDeviceChange: Device list before changes: ide-200,ide-201,ps2-300,pci-100,sio-400,keyboard-600,pointing-700,video-500,vmci-12000,pvscsi-1000,disk-1000-0,disk-1000-1,ethernet-0,pvscsi--201: timestamp="2024-06-20T11:07:35.188+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] applyDeviceChange: Device list after changes: ide-200,ide-201,ps2-300,pci-100,sio-400,keyboard-600,pointing-700,video-500,vmci-12000,pvscsi-1000,disk-1000-0,disk-1000-1,ethernet-0,pvscsi--201,disk--201-0: timestamp="2024-06-20T11:07:35.188+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] DiskApplyOperation: Post-apply final resource list: (key 2000 at scsi:0:0),(key 2001 at scsi:0:1),(key -202 at scsi:1:0): timestamp="2024-06-20T11:07:35.188+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] DiskApplyOperation: Device list at end of operation: ide-200,ide-201,ps2-300,pci-100,sio-400,keyboard-600,pointing-700,video-500,vmci-12000,pvscsi-1000,disk-1000-0,disk-1000-1,ethernet-0,pvscsi--201,disk--201-0: timestamp="2024-06-20T11:07:35.188+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] DiskApplyOperation: Device config operations from apply: (add: *types.VirtualDisk at key -202): timestamp="2024-06-20T11:07:35.188+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] DiskApplyOperation: Apply complete, returning updated spec: timestamp="2024-06-20T11:07:35.188+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] NetworkInterfaceApplyOperation: Beginning apply operation: timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] NetworkInterfaceApplyOperation: Looking for resources to delete: timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] NetworkInterfaceApplyOperation: Looking for resources to create or update: timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] NetworkInterfaceApplyOperation: No-op resource: key 4000: timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] NetworkInterfaceApplyOperation: Post-apply final resource list: (key 4000 at pci:0:7): timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] NetworkInterfaceApplyOperation: Device list at end of operation: ide-200,ide-201,ps2-300,pci-100,sio-400,keyboard-600,pointing-700,video-500,vmci-12000,pvscsi-1000,disk-1000-0,disk-1000-1,ethernet-0,pvscsi--201,disk--201-0: timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] NetworkInterfaceApplyOperation: Device config operations from apply:: timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] NetworkInterfaceApplyOperation: Apply complete, returning updated spec: timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] CdromApplyOperation: Beginning apply operation: timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] CdromApplyOperation: Looking for resources to delete: timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] CdromApplyOperation: Looking for resources to create or update: timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] CdromApplyOperation: Post-apply final resource list:: timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] CdromApplyOperation: Device list at end of operation: ide-200,ide-201,ps2-300,pci-100,sio-400,keyboard-600,pointing-700,video-500,vmci-12000,pvscsi-1000,disk-1000-0,disk-1000-1,ethernet-0,pvscsi--201,disk--201-0: timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] CdromApplyOperation: Device config operations from apply:: timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] CdromApplyOperation: Apply complete, returning updated spec: timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] vsphere_virtual_machine (ID = 42300f4a-a93e-f22f-e1d7-48e9522eea83): Final device list: ide-200,ide-201,ps2-300,pci-100,sio-400,keyboard-600,pointing-700,video-500,vmci-12000,pvscsi-1000,disk-1000-0,disk-1000-1,ethernet-0,pvscsi--201,disk--201-0: timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] vsphere_virtual_machine (ID = 42300f4a-a93e-f22f-e1d7-48e9522eea83): Final device change spec: (add: *types.ParaVirtualSCSIController at key -201),(add: *types.VirtualDisk at key -202): timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] Fetching properties for VM "/.../vm/.../.../..............": timestamp="2024-06-20T11:07:35.189+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] Attempting guest shutdown of virtual machine "/.../vm/.../.../..............": timestamp="2024-06-20T11:07:35.244+0200"
module.module.virtual_machines["..."].module.vsphere_virtual_machine.vsphere_virtual_machine.virtual_machine: Still modifying... [id=42300f4a-a93e-f22f-e1d7-48e9522eea83, 10s elapsed]
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] Reconfiguring virtual machine "/.../vm/.../.../..............": timestamp="2024-06-20T11:07:46.495+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] Fetching properties for VM "/.../vm/.../.../..............": timestamp="2024-06-20T11:07:47.015+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] Fetching configuration options for VM "/.../vm/.../.../..............": timestamp="2024-06-20T11:07:47.066+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] Found current hardware version: 19: timestamp="2024-06-20T11:07:47.392+0200"
module.module.virtual_machines["..."].module.vsphere_virtual_machine.vsphere_virtual_machine.virtual_machine: Still modifying... [id=42300f4a-a93e-f22f-e1d7-48e9522eea83, 20s elapsed]
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] Fetching properties for VM "/.../vm/.../.../..............": timestamp="2024-06-20T11:07:56.501+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] Powering on virtual machine "/.../vm/.../.../..............": timestamp="2024-06-20T11:07:56.551+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] blockUntilReadyForMethod: Going to block until "PowerOnVM_Task" is no longer in the Disabled Methods list for vm vm-215626: timestamp="2024-06-20T11:07:56.551+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] Fetching properties for VM "/.../vm/.../.../..............": timestamp="2024-06-20T11:07:56.551+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] blockUntilReadyForMethod: "PowerOnVM_Task" no longer disabled for vm vm-215626: timestamp="2024-06-20T11:07:56.596+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] Fetching properties for VM "/.../vm/.../.../..............": timestamp="2024-06-20T11:07:57.097+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] VM "/.../vm/.../.../.............." is powered off, attempting to power on.: timestamp="2024-06-20T11:07:57.142+0200"
[INFO] provider.terraform-provider-vsphere_v2.6.1_x5: [DEBUG] PowerOn task for VM "/.../vm/.../.../.............." was successful.: timestamp="2024-06-20T11:07:58.052+0200"
Panic Output
No response
Expected Behavior
According the provider documentation no reboot is performed on scsi_controller_count changes. Also adding a scsi controller via the UI of the machine, no reboot is required.
Actual Behavior
The virtual machine is rebooted if a new scsi controller is created.
Steps to Reproduce
Create a virtual machine
Add a new disk on a new scsi controller (for example unit_number 15 and scsi_controller_count 2)
Environment Details
No response
Screenshots
No response
References
No response
The text was updated successfully, but these errors were encountered:
Community Guidelines
Terraform
1.8.4
Terraform Provider
2.8.1, 2.7.0, 2.6.1
VMware vSphere
8.0.1
Description
If the scsi_controller_count is updated a virtual machine receives a reboot. This only happens if scsi_controller_count > the actual scsi controllers on the virtual machine.
Some test cases we performed on an existing virtual machine with two disks, both on the first scsi controller. (unit number 0,1 and scsi_controller_count 1)
Affected Resources or Data Sources
resource/vsphere_virtual_machine
Terraform Configuration
Debug Output
Panic Output
No response
Expected Behavior
According the provider documentation no reboot is performed on scsi_controller_count changes. Also adding a scsi controller via the UI of the machine, no reboot is required.
Actual Behavior
The virtual machine is rebooted if a new scsi controller is created.
Steps to Reproduce
Environment Details
No response
Screenshots
No response
References
No response
The text was updated successfully, but these errors were encountered: