OVF deployment fails on vCenter due to automatic power-on alarm
search cancel

OVF deployment fails on vCenter due to automatic power-on alarm

book

Article ID: 434612

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

You experience a failure when deploying an OVF in vCenter Server. During the deployment process, the virtual machine unexpectedly powers on before the OVA import task is completed, causing the deployment to fail.

When this issue occurs, you will observe the following error in the /var/log/vmware/vpxd/vpxd.log indicating that the VM was in an invalid power state:

error vpxd[####] [Originator@####sub=StateLock opID=####] [VpxdVmStateLocker::ValidateObject] VM <VM_Name>: PowerState = poweredOn, expected PowerState = poweredOff

error vpxd[####] [Originator@####sub=Default opID=####] [VpxLRO] -- ERROR task-####--  -- Resources -- ResourcePool.ImportVAppLRO: :vim.fault.InvalidPowerState
--> Result:
--> (vim.fault.InvalidPowerState) {
-->    faultCause = (vmodl.MethodFault) null,
-->    faultMessage = <unset>,
-->    requestedState = "poweredOff",
-->    existingState = "poweredOn"
-->    msg = ""
--> }


Additionally, journalctl logs on the vCenter Server show an automated alarm triggering a power-on task immediately after the VM is created:

[vim.event.AlarmActionTriggeredEvent] [info] [] [####] [####] [Alarm 'New TKG Node added' on #################### triggered an action]
[vim.event.TaskEvent] [info] [] [####] [####] [Task: Power On virtual machine]

Environment

vCenter Server 8.x

Cause

This issue is caused by a custom vCenter Server alarm that is configured to trigger an automated "Power On virtual machine" action whenever a new VM is added. This alarm interrupts the OVF deployment by powering on the VM prematurely. The OVF import process strictly requires the target virtual machine to remain in a poweredOff state until the manifest and configurations are fully imported.

Resolution

To resolve this issue, you must prevent the vCenter Server alarm from automatically powering on the virtual machine during deployment.

  1. Log in to the vSphere Client.

  2. Select the vCenter Server, Datacenter, or Cluster where the virtual machine  is being deployed.

  3. Navigate to Configure > Alarm Definitions.

  4. Locate the alarm responsible for the automated power-on action.

  5. Disable the alarm temporarily, or modify its trigger conditions so that it does not apply to virtual machines.

  6. Retry the OVF deployment.

  7. (Optional) Once the deployment completes successfully, re-enable the alarm if it was temporarily disabled.