Skip to content
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

CPU changes do not trigger a system reboot (so return a VMware error CPU hot plug is not supported for this virtual machine.) #2337

Open
3 of 4 tasks
mattrawles opened this issue Feb 5, 2025 · 1 comment
Assignees
Labels
bug Type: Bug needs-triage Status: Issue Needs Triage

Comments

@mattrawles
Copy link

Community Guidelines

  • I have read and agree to the HashiCorp Community Guidelines .
  • 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.9.8

Terraform Provider

2.11.1

VMware vSphere

8.0.3.00400 vCenter Server 8.0 Update 3d (ESXi 7.0.3)

Description

When decreasing CPU in a vsphere_virtual_machine resource, we expect a system to reboot and apply the change.

The resource returns an error

Error: CPU hot plug is not supported for this virtual machine.

This error is also reported in the vsphere console.

Note on the same system RAM or RAM/CPU combined change (reductions) trigger a reboot, RAM/CPU increases apply hot without a reboot. System has hot CPU and RAM add enabled.

Affected Resources or Data Sources

vsphere_virtual_machine

Terraform Configuration

Changes in vsphere_virtual_machine of "num_cpus"

Debug Output

Terraform will perform the following actions:

module.instances.module.vsphere-instance.vsphere_virtual_machine.linux-vm["ld12925-lab-30"] will be updated in-place

~ resource "vsphere_virtual_machine" "linux-vm" {
id = "4236b3fd-a3bb-99f8-8464-881ed7e7300b"
name = "ld12925-lab-30"
~ num_cpus = 2 -> 1
~ tags = [

    ]
    # (74 unchanged attributes hidden)

    # (4 unchanged blocks hidden)
}

Plan: 0 to add, 1 to change, 0 to destroy.

Error: CPU hot plug is not supported for this virtual machine.

with module.instances.module.vsphere-instance.vsphere_virtual_machine.linux-vm["ld12925-lab-30"],
on .terraform/modules/instances.vsphere-instance/linux.tf line 1, in resource "vsphere_virtual_machine" "linux-vm":
1: resource "vsphere_virtual_machine" "linux-vm" {

Panic Output

No response

Expected Behavior

CPU remove should trigger a reboot.

Note on the same system RAM or RAM/CPU combined change (reductions) trigger a reboot, RAM/CPU increases apply hot.

ESXi 7 doesn't support hot CPU removal so terraform should not attempt it

https://knowledge.broadcom.com/external/article?legacyId=82568

Actual Behavior

Error: CPU hot plug is not supported for this virtual machine.

with module.instances.module.vsphere-instance.vsphere_virtual_machine.linux-vm["ld12925-lab-30"],
on .terraform/modules/instances.vsphere-instance/linux.tf line 1, in resource "vsphere_virtual_machine" "linux-vm":
1: resource "vsphere_virtual_machine" "linux-vm" {

Steps to Reproduce

create a vsphere_virtual_machine
increase its RAM/CPU as desired - hot add works as expected
reduce the CPU only - apply triggers vcentre error (not the expected reboot).

Environment Details

8.0.3.00400 vCenter Server 8.0 Update 3d (ESXi 7.0.3)

Screenshots

No response

References

https://knowledge.broadcom.com/external/article?legacyId=82568

@mattrawles mattrawles added bug Type: Bug needs-triage Status: Issue Needs Triage labels Feb 5, 2025
Copy link

github-actions bot commented Feb 5, 2025

Hello, mattrawles! 🖐

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.

@tenthirtyam tenthirtyam self-assigned this Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Type: Bug needs-triage Status: Issue Needs Triage
Projects
None yet
Development

No branches or pull requests

2 participants