-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terraform apply cpu/memory change would reboot guest VM even if hot add is enabled for CPU and memory #2170
Comments
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. |
Some updates: The reboot is caused by two fields:
At each apply, they gets reset even if these fields are already set to on/hvOn, but the field values are not registered/recorded. |
Actually no matter what values are set, automatic, on/hvOn, off/hvOff, these fields always have a null value. This is the very reason at each play the target VM will be rebooted.
|
Just more information: experienced the same issue with Terraform 1.7.5. For debugging, we upgraded Terraform from 1.7.5 to 1.8.1. But terraform upgrade does not make any difference. |
This is a serious issue. This bug can reboot all VMs managed by terraform/vsphere at once whether an VM has any change or not. |
Looks like those are not getting computed. |
Actually found the similar issue reported in #1902. After applying the workaround, it does not reboot every VMs (with no change to them) any more. However, changing CPU and memory size still trigger VM reboot. Manually adjusting CPU and memory does not cause VM reboot. |
For example, memory change:
This change reboots the VM. |
Duplicate of #1902 |
It's not a duplicate. It's about hot add CPU and memory. Hot add CPU/memory support is broken right now. |
terraform show:
|
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.8.1
Terraform Provider
v2.7.0
VMware vSphere
v8.0 u2b
Description
When hot add is enabled for CPU and memory, increasing CPU count and memory size should take effect immediately without rebooting the target VM.
However, this is not the case. Increasing CPU and memory size both cause the target VM rebooting immediately.
The guest OS is RockyLinux 9.3 x86_64. Open-vm-tools 12.2.5 is installed.
Affected Resources or Data Sources
vm/
Terraform Configuration
Debug Output
The guest VM got rebooted immediately during
terraform apply
Panic Output
No response
Expected Behavior
When increasing CPU core or increasing memory size, the change takes effect immediately without rebooting the guest VM.
Actual Behavior
Both increasing CPU and memory will cause the guest VM rebooting immediately.
Steps to Reproduce
Environment Details
No response
Screenshots
No response
References
No response
The text was updated successfully, but these errors were encountered: