Importing a VM with a snapshot from VMware to RHV results in VM having pre-snapshot data.

Solution In Progress - Updated -

Environment

  • Red Hat Virtualization 4.3 and 4.4

Issue

  • Importing a VM with a snapshot from VMware to RHV results in VM having pre-snapshot data.
  • After the import, the VM is booted and it contains older data.
  • The data is from before the snapshot.

Resolution

  • BZ 1943656 has been filed to address this issue.
  • The recommended workaround is to delete the VM snapshots on the VMware environment before importing the VM to RHV.

Diagnostic Steps

  • From the VMware logs we see the first vmdk is created.
2021-03-24T17:57:37.111Z| vcpu-0| I120: HBACommon: First write on scsi0:0.fileName='/vmfs/volumes/5ef49235-63588724-d8d5-141877595c4b/test2/test2.vmdk'
  • Next take a snapshot and there is test2-000001.vmdk.
2021-03-24T18:08:48.487Z| vcpu-0| I120: SnapshotVMXTakeSnapshotWork: Initiated lazy snapshot 'VM Snapshot 3%252f24%252f2021, 6:13:39 PM': 1
2021-03-24T18:08:49.381Z| vcpu-0| I120: HBACommon: First write on scsi0:0.fileName='/vmfs/volumes/5ef49235-63588724-d8d5-141877595c4b/test2/test2-000001.vmdk'
2021-03-24T18:09:04.325Z| vmx| I120: SnapshotVMXTakeSnapshotComplete: Done with snapshot 'VM Snapshot 3%252f24%252f2021, 6:13:39 PM': 1
  • Quering the datastore, we don't see the test2-000001-flat.vmdk
test2-000001-delta.vmdk 25-Mar-2021 19:44   67133440
test2-000001.vmdk       24-Mar-2021 19:29   327
test2-Snapshot1.vmem    24-Mar-2021 18:09   2147483648
test2-Snapshot1.vmsn    24-Mar-2021 18:09   9584577
test2-flat.vmdk         24-Mar-2021 18:08   10737418240
test2.nvram             25-Mar-2021 19:44   8684
test2.vmdk              24-Mar-2021 17:57   474
test2.vmsd              24-Mar-2021 18:08   433
test2.vmx               25-Mar-2021 19:44   2741
vmware-1.log            24-Mar-2021 18:09   238194
vmware-2.log            24-Mar-2021 18:12   194067
vmware.log              25-Mar-2021 19:44   194689
  • On the RHV-M host, in the /var/log/vdsm/import logs, we see the query for test2-000001-flat.vmdk failed.
'curl' -q --max-redirs '5' --globoff --head --silent --url 'https://vmware.example.com/folder/test2/test2-000001-flat.vmdk?dcPath=prod-dc&dsName=Datastore-1' --user <hidden> --insecure
HTTP/1.1 404 Not Found^M
Date: Wed, 24 Mar 2021 12:49:34 GMT^M
Set-Cookie: vmware_soap_session="9d9450a389cd791573051c5acb0ac51bf1e14f89"; Path=/; HttpOnly; Secure; ^M
Connection: close^M
Content-Type: text/plain; charset=utf-8^M
X-Frame-Options: DENY^M
Content-Length: 0^M
  • But the one for test2-flat.vmdk succeed.
'curl' -q --max-redirs '5' --globoff --head --silent --url 'https://vmware.example.com/folder/test2/test2-flat.vmdk?dcPath=prod-dc&dsName=Datastore-1' --user <hidden> --insecure
HTTP/1.1 200 OK^M
Date: Wed, 24 Mar 2021 12:49:36 GMT^M
Set-Cookie: vmware_soap_session="1ff34a41ffe675c2f23c5edba4f02aa7c86a484b"; Path=/; HttpOnly; Secure; ^M
Accept-Ranges: bytes^M
Connection: Keep-Alive^M
Content-Type: application/octet-stream^M
X-Frame-Options: DENY^M
Content-Length: 10737418240^M
  • The test2-flat.vmdk was used for the import and the VM booted with older data.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments