-
Notifications
You must be signed in to change notification settings - Fork 129
Description
On an attempt of increase memory on a VM which supports hot-plug addition the VM is being powered off when using the nutanix_virtual_machine_v2 resource.
The Nutanix documentation claims, that such operation is supported:
You can increase the memory allocation and (...) the number of vCPUs (sockets) while the VMs are powered on.
Recycling the VM is caused by incorrect condition under resource_nutanix_virtual_machine_v2.checkForHotPlugChanges() function.
There is no indication coming from the provider that a VM will be restarted on applying the changes.
Same change in UI doesn't cause the VM to be restarted.
Nutanix Cluster Information
- Nutanix Cluster (Prism Element / AOS): 7.3.1.1
- Nutanix Prism Central: pc.7.3.1.1
Terraform Version
Terraform v1.14.7 on linux_amd64
nutanix/nutanix v2.3.4
I'm unable to use the newest version of the provider as it is incompatible with PC. Mentioned code haven't changed between the versions.
Affected Resource(s)
- nutanix_virtual_machine_v2
Terraform Configuration Files
resource "nutanix_virtual_machine_v2" "compute" {
memory_size_bytes = var.computes_memory_size_mb * 1024 * 1024
num_cores_per_socket = 1
num_sockets = var.computes_num_vcpus
...
}Debug Output
Panic Output
Expected Behavior
VM memory is updated without power cycling the VM.
Actual Behavior
VM is being power cycled on increasing memory for hot-plug enabled VM.
Steps to Reproduce
- create a VM with 1GB of memory using
nutanix_virtual_machine_v2resource terraform apply- set VM memory to 2GB in terraform
terraform apply