Description
Nutanix Cluster Information
Please provide the version of:
- Nutanix Cluster (Prism Element / AOS): 5.16.1
- Nutanix Prism Central: 5.16.1.2
Terraform Version
Terraform v0.12.24
- provider.nutanix v1.0.2
- provider.template v2.1.2
Affected Resource(s)
- nutanix_virtual_machine
Terraform Configuration Files
data "nutanix_cluster" "cluster_by_name" {
name = "ntnx-test-cls"
}
# # Create VM resources
resource "nutanix_virtual_machine" "vm" {
count = 1
name = "vm-debug-${count.index}"
cluster_uuid = data.nutanix_cluster.cluster_by_name.id
num_vcpus_per_socket = "1"
num_sockets = "4"
memory_size_mib = 4096
categories {
name = "Environment"
value = "Dev"
}
disk_list {
disk_size_mib = 5000
}
}
Debug Output
Error: internal error: cannot shut down the VM with UUID(d73fd035-3cb0-4384-ae4e-ee8dd36e8cd1): error waiting for vm (d73fd035-3cb0-4384-ae4e-ee8dd36e8cd1) to update: timeout while waiting for state to become 'COMPLETE' (last state: 'RUNNING', timeout: 1m0s)
on ApplicationServer.tf line 1, in resource "nutanix_virtual_machine" "vm":
1: resource "nutanix_virtual_machine" "vm" {
Expected Behavior
Adding the category to the VM without requiring powering down the VM
And also it seems that it cannot take into account power_state_mechanism = "ACPI"
Actual Behavior
if power_state_mechanism = "ACPI" it fails see debug output
if default power_state_mechanism it works with a VM power off
Steps to Reproduce
adding or modifying categories assignation to nutanix_virtual_machine