Failed to power on virtual machine after manual VCSA datastore migration
search cancel

Failed to power on virtual machine after manual VCSA datastore migration

book

Article ID: 451956

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

This article addresses power-on failures and network connectivity issues encountered after manually migrating a vCenter Server Appliance (VCSA) to a new datastore due to storage capacity depletion on the original datastore.

Symptoms:

  • Unable to power on VCSA after manual copy to a new datastore.
  • Error: "Failed to power on virtual machine... Unable to access file [VMNAME]-flat.vmdk since it is locked."
  • Post-power-on, VCSA is unreachable via network (Ping fails).
  • vSphere Client service shows 503 or "Service stopped" error.

Environment

VMware vCenter Server 8.x.

Cause

  • Stale Swap File Lock: The manual copy operation included a stale .vswp file from the previous distressed state, causing the ESXi host to perceive the VM as locked.
  • vDS Port Allocation Failure: Manually re-registering the VCSA while it is offline breaks vDS port binding, preventing the VCSA from acquiring a network identity.

Resolution

  1. Clear Stale Lock: SSH to the ESXi host where the VCSA is registered. Navigate to the VCSA directory on the new datastore and remove the stale .vswp file: rm [VM_NAME]-[RANDOM_ID].vswp
  2. Bypass vDS Networking: To restore network connectivity without a functioning vCenter:
      1. Create a temporary Standard vSwitch (vSS) with a port group on the required VLAN.
      2. Assign a physical uplink to the vSS.
      3. Connect the VCSA virtual network adapter to this temporary Standard vSwitch.
  3. Restore Services:
      1. Reboot the VCSA to allow internal services (vsphere-ui) to initialize.
      2. Once the UI is accessible, migrate the VCSA's network adapter back to the original Distributed Port Group.

Additional Information

For general troubleshooting on file locks, see KB 314365 (Investigating Virtual Machine file locks on ESXi Host(s))