Cloning a powered on Windows VM to other cluster or Datacenter fails
search cancel

Cloning a powered on Windows VM to other cluster or Datacenter fails

book

Article ID: 321262

calendar_today

Updated On: 09-30-2024

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:

  • Cloning a powered on Windows VM to a cluster or Datacenter fails.
  • In the vpxd.log file, you see entries similar to:
  • /var/log/vmware/vpxd/vpxd.log:

    YYYY-MM-DDTHH:MM:SS error vpxd[21317] [Originator@6876 sub=VmProv opID=jxtz73l7-10477211-auto-68k9o-h5:70633250-e2-01] Get exception while executing action vpx.vmprov.ReconfigureVm: N3Vim5Fault20InvalidDatastorePath9ExceptionE(Fault cause: vim.fault.InvalidDatastorePath
    YYYY-MM-DDTHH:MM:SS info vpxd[21317] [Originator@6876 sub=Default opID=jxtz73l7-10477211-auto-68k9o-h5:70633250-e2] [VpxLRO] -- ERROR task-136231 -- vm-<vm id>-- vim.VirtualMachine.clone: vim.fault.InvalidDatastorePath:
    --> Result:
    --> (vim.fault.InvalidDatastorePath) {
    -->    [...]
    -->    datastorePath = "[<datastore name>] xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx/VM.vmdk"
    -->    [...]
    --> }


    Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.

Environment

VMware vSphere 6.5.x
VMware vSphere 6.7.x
VMware vSphere 7.0.x

Cause

  • This issue occurs due to the mis-handling of the creation of temporary snapshots when cloning a virtual machine. Ideally, when a powered on VM is cloned, a temporary snapshot is created. For a Windows VM, an extra child disk for a "writable" snapshot is created with the help of the Microsoft VSS (shadow copy service).
  • This is not handled correctly which causes the cloning of the powered on Windows VM to a cluster or datacenter to fail.

Resolution

This is a known issue affecting VMware vCenter 6.x and 7.x.

This issue is resolved in vCenter 7.0 U1c.

Workaround:
To work around the issue, power off the virtual machine before the cloning operation. 

Alternatively, take a VM snapshot and pass it as a parameter to Clone API.