Copying the disk of a running VM fails in vSphere 7.0
book
Article ID: 335038
calendar_today
Updated On:
Products
VMware vSphere ESXi
Issue/Introduction
Symptoms: In vSphere 7.0 making a copy of the flat.vmdk file of a running VM fails when using a method such as the cp command or HTTP GET instead of using the VMware VDDK.
These methods worked for VMs running on vSphere 6.7 and earlier.
Environment
VMware vSphere ESXi 7.0.0
Cause
Using these methods as a way to backup virtual machines was never supported by VMware.
The HTTP GET method (https://code.vmware.com/docs/4205/vmware-vsphere-web-services-sdk-programming-guide/doc/PG_Appx_Http_Access.22.3.html) was never supported for copying the disks of a running VM.
The method previously worked due to an incorrect behaviour in VMFS where illegal flag combinations were not being properly enforced.
This incorrect behaviour, and the lack of a specific statement in the HTTP GET documentation that this method was for offline files only, led some users to incorrectly believe that this was a supported way to make backups of virtual machines.
The VDDK has always been offered and documented as the official way to backup VM disks.
These VMFS flag combinations are now being properly enforced in vSphere 7.0 which causes the disk copy to fail when using the unsupported methods.
Resolution
This is the expected behavior with vSphere 7.0 and later versions.
With vSphere 7.0, if a VM is powered on the only way to take a backup (or copy) of the VM disk files is through the VDDK APIs.
Vendors using the HTTP GET method must modify their backup solution to use the VDDK/VADP:
Investigating virtual machine file locks on ESXi (10051) https://kb.vmware.com/s/article/10051
Using the VMware vCenter Server 4.x,5.x and 6.0 datastore browser to download or copy a powered-on virtual machine's .vmx and .nvram files fails (1019286) https://kb.vmware.com/s/article/1019286