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

Agent VM status is deleted on update #675

Open
davhdavh opened this issue Feb 22, 2024 · 1 comment
Open

Agent VM status is deleted on update #675

davhdavh opened this issue Feb 22, 2024 · 1 comment

Comments

@davhdavh
Copy link

davhdavh commented Feb 22, 2024

Nutanix Cluster Information

AOS 6.5.1.6 LTS

Terraform Version

1.5.5

Affected Resource(s)

  • nutanix_virtual_machine

Terraform Configuration Files

terraform {
  required_providers {
    nutanix = {
      source = "nutanix/nutanix"
    }
  }
}

resource "nutanix_virtual_machine" "linux" {
  count = length(local.hosts)
  name = "linux${count.index + 1}"
  cluster_uuid = local.cluster.metadata.uuid

  num_vcpus_per_socket = 4
  memory_size_mib      = 48000
...
}

Debug Output

Panic Output

Error: error waiting for vm (c846afbf-4676-4e58-a1a2-195c6cc57f36) to update: error_detail: INVALID_ARGUMENT: Could not power on VM linux2. HA reservations are configured to tolerate 1 host failure(s). The VM-host affinity policy should specify at least 2 hosts to affine against. Alternatively, disable HA protection for the VMs by marking them as agent VM., progress_message: update_vm

│ with nutanix_virtual_machine.linux[1],
│ on inline-module.tf line 93, in resource "nutanix_virtual_machine" "linux":
│ 93: resource "nutanix_virtual_machine" "linux" {

Expected Behavior

update to .tf file would NOT alter the Agent VM setting on the host

Actual Behavior

update to .tf file DOES alter the Agent VM setting to FALSE, which causes the VM to be unable to boot since it is fixed to 1 physical host.

Steps to Reproduce

  1. terraform apply with a vm
  2. Manually mark vm as Agent VM and bind to 1 physical host (because the nutanix terraform provider doesn't support these settings)
  3. update any config that requires a reboot, such as cpu or memory, and terraform apply
@davhdavh
Copy link
Author

davhdavh commented Nov 6, 2024

status?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant