Closed sgaosdgr closed 4 months ago
Hello, sgaosdgr! 🖐
Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle.
If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests.
Please note, this is NOT a duplicate to 1902 bug report. Currently, hot add CPU and memory support is broken.
I am unable to reproduce this issue using the following:
Tests Provided Below:
🟢 PASS: Enabling Hot Add for Both CPU and Memory (Reboot expected and observed.)
terrafom-examples-vmware/vsphere/vsphere-virtual-machine/clone-template-windows-guest-customization on main [✘!?]
✦2 ➜ terraform apply -auto-approve
data.vsphere_datacenter.datacenter: Reading...
data.vsphere_datacenter.datacenter: Read complete after 0s [id=datacenter-3]
data.vsphere_network.network: Reading...
data.vsphere_datastore.datastore: Reading...
data.vsphere_compute_cluster.cluster: Reading...
data.vsphere_virtual_machine.template: Reading...
data.vsphere_network.network: Read complete after 0s [id=network-18085]
data.vsphere_datastore.datastore: Read complete after 0s [id=datastore-18076]
data.vsphere_compute_cluster.cluster: Read complete after 0s [id=domain-c18070]
data.vsphere_resource_pool.pool: Reading...
data.vsphere_virtual_machine.template: Read complete after 0s [id=421e4c56-9b9e-4d22-e171-922836680a14]
data.vsphere_resource_pool.pool: Read complete after 0s [id=resgroup-18071]
vsphere_virtual_machine.vm: Refreshing state... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
following symbols:
~ update in-place
Terraform will perform the following actions:
# vsphere_virtual_machine.vm will be updated in-place
~ resource "vsphere_virtual_machine" "vm" {
~ cpu_hot_add_enabled = false -> true
id = "421e1ce0-9a8a-12f9-fb8a-fb8c724db879"
~ memory_hot_add_enabled = false -> true
name = "windows-test"
~ num_cores_per_socket = 2 -> 1
tags = []
# (70 unchanged attributes hidden)
# (4 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
vsphere_virtual_machine.vm: Modifying... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879]
vsphere_virtual_machine.vm: Still modifying... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879, 10s elapsed]
vsphere_virtual_machine.vm: Still modifying... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879, 20s elapsed]
vsphere_virtual_machine.vm: Still modifying... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879, 30s elapsed]
vsphere_virtual_machine.vm: Still modifying... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879, 40s elapsed]
vsphere_virtual_machine.vm: Still modifying... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879, 50s elapsed]
vsphere_virtual_machine.vm: Still modifying... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879, 1m0s elapsed]
vsphere_virtual_machine.vm: Still modifying... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879, 1m10s elapsed]
vsphere_virtual_machine.vm: Modifications complete after 1m15s [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879]
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
🟢 PASS: Hot Add Memory (No reboot observed, as expected.)
terrafom-examples-vmware/vsphere/vsphere-virtual-machine/clone-template-windows-guest-customization on main [✘!?]
✦2 ➜ terraform plan
data.vsphere_datacenter.datacenter: Reading...
data.vsphere_datacenter.datacenter: Read complete after 0s [id=datacenter-3]
data.vsphere_datastore.datastore: Reading...
data.vsphere_network.network: Reading...
data.vsphere_compute_cluster.cluster: Reading...
data.vsphere_virtual_machine.template: Reading...
data.vsphere_network.network: Read complete after 0s [id=network-18085]
data.vsphere_compute_cluster.cluster: Read complete after 0s [id=domain-c18070]
data.vsphere_datastore.datastore: Read complete after 0s [id=datastore-18076]
data.vsphere_resource_pool.pool: Reading...
data.vsphere_virtual_machine.template: Read complete after 0s [id=421e4c56-9b9e-4d22-e171-922836680a14]
data.vsphere_resource_pool.pool: Read complete after 0s [id=resgroup-18071]
vsphere_virtual_machine.vm: Refreshing state... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879]
No changes. Your infrastructure matches the configuration.
Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are
needed.
terrafom-examples-vmware/vsphere/vsphere-virtual-machine/clone-template-windows-guest-customization on main [✘!?]
✦2 ➜ terraform plan
data.vsphere_datacenter.datacenter: Reading...
data.vsphere_datacenter.datacenter: Read complete after 0s [id=datacenter-3]
data.vsphere_network.network: Reading...
data.vsphere_compute_cluster.cluster: Reading...
data.vsphere_datastore.datastore: Reading...
data.vsphere_virtual_machine.template: Reading...
data.vsphere_network.network: Read complete after 0s [id=network-18085]
data.vsphere_compute_cluster.cluster: Read complete after 0s [id=domain-c18070]
data.vsphere_datastore.datastore: Read complete after 0s [id=datastore-18076]
data.vsphere_resource_pool.pool: Reading...
data.vsphere_virtual_machine.template: Read complete after 0s [id=421e4c56-9b9e-4d22-e171-922836680a14]
data.vsphere_resource_pool.pool: Read complete after 0s [id=resgroup-18071]
vsphere_virtual_machine.vm: Refreshing state... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
following symbols:
~ update in-place
Terraform will perform the following actions:
# vsphere_virtual_machine.vm will be updated in-place
~ resource "vsphere_virtual_machine" "vm" {
id = "421e1ce0-9a8a-12f9-fb8a-fb8c724db879"
~ memory = 4096 -> 8192
name = "windows-test"
tags = []
# (72 unchanged attributes hidden)
# (4 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if you
run "terraform apply" now.
terrafom-examples-vmware/vsphere/vsphere-virtual-machine/clone-template-windows-guest-customization on main [✘!?]
✦2 ➜ terraform apply -auto-approve
data.vsphere_datacenter.datacenter: Reading...
data.vsphere_datacenter.datacenter: Read complete after 0s [id=datacenter-3]
data.vsphere_network.network: Reading...
data.vsphere_compute_cluster.cluster: Reading...
data.vsphere_datastore.datastore: Reading...
data.vsphere_virtual_machine.template: Reading...
data.vsphere_network.network: Read complete after 0s [id=network-18085]
data.vsphere_datastore.datastore: Read complete after 0s [id=datastore-18076]
data.vsphere_compute_cluster.cluster: Read complete after 0s [id=domain-c18070]
data.vsphere_resource_pool.pool: Reading...
data.vsphere_virtual_machine.template: Read complete after 0s [id=421e4c56-9b9e-4d22-e171-922836680a14]
data.vsphere_resource_pool.pool: Read complete after 0s [id=resgroup-18071]
vsphere_virtual_machine.vm: Refreshing state... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
following symbols:
~ update in-place
Terraform will perform the following actions:
# vsphere_virtual_machine.vm will be updated in-place
~ resource "vsphere_virtual_machine" "vm" {
id = "421e1ce0-9a8a-12f9-fb8a-fb8c724db879"
~ memory = 4096 -> 8192
name = "windows-test"
tags = []
# (72 unchanged attributes hidden)
# (4 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
vsphere_virtual_machine.vm: Modifying... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879]
vsphere_virtual_machine.vm: Still modifying... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879, 10s elapsed]
vsphere_virtual_machine.vm: Modifications complete after 10s [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879]
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
🟢 PASS: Hot Add CPU (No reboot observed, as expected.)
terrafom-examples-vmware/vsphere/vsphere-virtual-machine/clone-template-windows-guest-customization on main [✘!?] took 11.8s
✦2 ➜ terraform plan
data.vsphere_datacenter.datacenter: Reading...
data.vsphere_datacenter.datacenter: Read complete after 0s [id=datacenter-3]
data.vsphere_datastore.datastore: Reading...
data.vsphere_compute_cluster.cluster: Reading...
data.vsphere_network.network: Reading...
data.vsphere_virtual_machine.template: Reading...
data.vsphere_network.network: Read complete after 1s [id=network-18085]
data.vsphere_datastore.datastore: Read complete after 1s [id=datastore-18076]
data.vsphere_compute_cluster.cluster: Read complete after 1s [id=domain-c18070]
data.vsphere_resource_pool.pool: Reading...
data.vsphere_virtual_machine.template: Read complete after 1s [id=421e4c56-9b9e-4d22-e171-922836680a14]
data.vsphere_resource_pool.pool: Read complete after 0s [id=resgroup-18071]
vsphere_virtual_machine.vm: Refreshing state... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
following symbols:
~ update in-place
Terraform will perform the following actions:
# vsphere_virtual_machine.vm will be updated in-place
~ resource "vsphere_virtual_machine" "vm" {
id = "421e1ce0-9a8a-12f9-fb8a-fb8c724db879"
name = "windows-test"
~ num_cpus = 2 -> 4
tags = []
# (72 unchanged attributes hidden)
# (4 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if you
run "terraform apply" now.
terrafom-examples-vmware/vsphere/vsphere-virtual-machine/clone-template-windows-guest-customization on main [✘!?]
✦2 ➜ terraform apply -auto-approve
data.vsphere_datacenter.datacenter: Reading...
data.vsphere_datacenter.datacenter: Read complete after 0s [id=datacenter-3]
data.vsphere_compute_cluster.cluster: Reading...
data.vsphere_network.network: Reading...
data.vsphere_datastore.datastore: Reading...
data.vsphere_virtual_machine.template: Reading...
data.vsphere_network.network: Read complete after 0s [id=network-18085]
data.vsphere_compute_cluster.cluster: Read complete after 0s [id=domain-c18070]
data.vsphere_resource_pool.pool: Reading...
data.vsphere_datastore.datastore: Read complete after 0s [id=datastore-18076]
data.vsphere_virtual_machine.template: Read complete after 0s [id=421e4c56-9b9e-4d22-e171-922836680a14]
data.vsphere_resource_pool.pool: Read complete after 0s [id=resgroup-18071]
vsphere_virtual_machine.vm: Refreshing state... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
following symbols:
~ update in-place
Terraform will perform the following actions:
# vsphere_virtual_machine.vm will be updated in-place
~ resource "vsphere_virtual_machine" "vm" {
id = "421e1ce0-9a8a-12f9-fb8a-fb8c724db879"
name = "windows-test"
~ num_cpus = 2 -> 4
tags = []
# (72 unchanged attributes hidden)
# (4 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
vsphere_virtual_machine.vm: Modifying... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879]
vsphere_virtual_machine.vm: Still modifying... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879, 10s elapsed]
vsphere_virtual_machine.vm: Modifications complete after 10s [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879]
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
🟢 PASS: Hot Add CPU and Memory (No reboot observed, as expected.)
terrafom-examples-vmware/vsphere/vsphere-virtual-machine/clone-template-windows-guest-customization on main [✘!?] took 11.8s
✦2 ➜ terraform plan
data.vsphere_datacenter.datacenter: Reading...
data.vsphere_datacenter.datacenter: Read complete after 0s [id=datacenter-3]
data.vsphere_datastore.datastore: Reading...
data.vsphere_network.network: Reading...
data.vsphere_compute_cluster.cluster: Reading...
data.vsphere_virtual_machine.template: Reading...
data.vsphere_network.network: Read complete after 0s [id=network-18085]
data.vsphere_datastore.datastore: Read complete after 1s [id=datastore-18076]
data.vsphere_compute_cluster.cluster: Read complete after 1s [id=domain-c18070]
data.vsphere_resource_pool.pool: Reading...
data.vsphere_virtual_machine.template: Read complete after 1s [id=421e4c56-9b9e-4d22-e171-922836680a14]
data.vsphere_resource_pool.pool: Read complete after 0s [id=resgroup-18071]
vsphere_virtual_machine.vm: Refreshing state... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
following symbols:
~ update in-place
Terraform will perform the following actions:
# vsphere_virtual_machine.vm will be updated in-place
~ resource "vsphere_virtual_machine" "vm" {
id = "421e1ce0-9a8a-12f9-fb8a-fb8c724db879"
~ memory = 8192 -> 10240
name = "windows-test"
~ num_cpus = 4 -> 6
tags = []
# (71 unchanged attributes hidden)
# (4 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if you
run "terraform apply" now.
terrafom-examples-vmware/vsphere/vsphere-virtual-machine/clone-template-windows-guest-customization on main [✘!?]
✦2 ➜ terraform apply -auto-approve
data.vsphere_datacenter.datacenter: Reading...
data.vsphere_datacenter.datacenter: Read complete after 0s [id=datacenter-3]
data.vsphere_network.network: Reading...
data.vsphere_datastore.datastore: Reading...
data.vsphere_compute_cluster.cluster: Reading...
data.vsphere_virtual_machine.template: Reading...
data.vsphere_network.network: Read complete after 0s [id=network-18085]
data.vsphere_compute_cluster.cluster: Read complete after 0s [id=domain-c18070]
data.vsphere_resource_pool.pool: Reading...
data.vsphere_datastore.datastore: Read complete after 0s [id=datastore-18076]
data.vsphere_virtual_machine.template: Read complete after 0s [id=421e4c56-9b9e-4d22-e171-922836680a14]
data.vsphere_resource_pool.pool: Read complete after 0s [id=resgroup-18071]
vsphere_virtual_machine.vm: Refreshing state... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the
following symbols:
~ update in-place
Terraform will perform the following actions:
# vsphere_virtual_machine.vm will be updated in-place
~ resource "vsphere_virtual_machine" "vm" {
id = "421e1ce0-9a8a-12f9-fb8a-fb8c724db879"
~ memory = 8192 -> 10240
name = "windows-test"
~ num_cpus = 4 -> 6
tags = []
# (71 unchanged attributes hidden)
# (4 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
vsphere_virtual_machine.vm: Modifying... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879]
vsphere_virtual_machine.vm: Still modifying... [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879, 10s elapsed]
vsphere_virtual_machine.vm: Modifications complete after 10s [id=421e1ce0-9a8a-12f9-fb8a-fb8c724db879]
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
Additionally, for the last test systeminfo
was run before and after the increase for both the CPU and Memory as seen in the screenshot below.
Ryan Johnson Distinguished Engineer, VMware by Broadcom
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Community Guidelines
Terraform
v1.7.5, v1.8.1
Terraform Provider
v2.7.0
VMware vSphere
v8.0 u2b
Description
The support for hot add CPU and memory is currently broken. A change to CPU and memory causes an VM to reboot. This is 100% reproducible.
Affected Resources or Data Sources
VM/
Terraform Configuration
Debug Output
Above two changes should not reboot the target VMs.
Panic Output
No response
Expected Behavior
Increasing CPU cores or memory size should take effect immediately without rebooting the target VM.
Actual Behavior
Increasing CPU core and memory size both cause the target VM reboot.
Steps to Reproduce
Environment Details
No response
Screenshots
No response
References
No response