#1 Global Leader in Data Resilience

How to Manually Repair a VMware Replica created by Veeam

KB ID: 1773
Product: Veeam Backup & Replication | 7.0 | 8.0 | 9.0 | 9.5 | 10 | 11 | 12 | 12.1 | 12.2 | 12.3
Published: 2013-06-20
Last Modified: 2024-10-01
Languages: DE | FR | ES
mailbox
Get weekly article updates
By subscribing, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.

Cheers for trusting us with the spot in your mailbox!

Now you’re less likely to miss what’s been brewing in our knowledge base with this weekly digest

error icon

Oops! Something went wrong.

Please, try again later.

The actions documented in this article should never be performed on a production virtual machine (VM), as they intentionally lead to the VM losing data. That data loss is only acceptable with a Veeam replica, because the replica will be repaired and brought back up-to-date when the next replication job run.
Article Applicability

This article is not intended for use with:

Challenge

This article explains how to manually revert a replica to its base disks, allow it to be remapped to a replication job and used as a seed when the replica's snapshot files have become corrupt.

The following are error messages that may prompt the use of this KB article:

  • A replication job may fail with a message such as:
    Unable to repair replica VM.
    
  • When the replication job fails to create a snapshot on the replica with:
    File or folder already exists.
    
    This occurs most often when a loose file is named like a snapshot but is not associated with the replica (e.g., DC01-0000001.VMDK), is in the folder with the replica files. When VMware creates the first snapshot on the replica it can’t because the file it was going to create has the same name as the aforementioned loose file.
  • Replication job fails with:
    Invalid Snapshot Configuration
    
    Verify that the error is coming from the replica by checking the replica's Tasks & Events.
  • Replication job fails with:
    CID mismatch error: The parent virtual disk has been modified since the child was created
    
    Verify that the error is coming from the replica by checking the replica's Tasks & Events.

Cause

An old or orphaned Snapshot file is linked to the VM configuration (vmx), and a new Snapshot is trying to use that file name.

Solution

Please be aware that as an alternative to performing the steps below, you may first attempt to clone the faulty replica within VMware; if it succeeds, map the Replication job to the clone of the replica.

Before Beginning

  1. Stop all replication jobs to the target location of the replica in question.
  2. Manually check each target side proxy for stuck replica hotadded disks (VMDK disks belonging to the replica that remain attached to the target proxy after the job is completed). See KB1775 for details.
    Consider switching the target proxies to use Network Transport mode to prevent stuck hotadded disks if it becomes a recurring issue.

 

Gather Information

The following actions are performed with the replica VM using a vSphere Client.

  1. Edit the Replica in vSphere Client.
  2. Note which disk files correlate to each SCSI ID.
    Example:
    [Datastore1] DC01_replica\DC01-00000023.vmdk on SCSI0:0
    [Datastore1] DC01_replica\DC01_1-00000023.vmdk on SCSI0:1
    [Datastore2] DC01_replica\DC01-00000023.vmdk on SCSI0:2
    

 

Prepare the Replica

The following actions are performed with the replica VM using a vSphere Client.

  1. Open the Snapshot Manager, and starting with the oldest snapshot, delete the snapshots one at a time. The goal is to get as much new information into the base disks as possible. At some point, though, there will be a snapshot that cannot be removed.
  2. If any snapshots are left in the snapshot manager, try using the Delete All option in the snapshot manager.
  3. Use the consolidate function to consolidate any orphaned snapshots.
    Note: It is expected that these steps to fail at some point. When you receive a failure, move on to the next step.

 

Preparing Veeam Backup & Replication

  1. Within the Veeam console, under Replicas, find the replica that will be repaired and right-click it.
  2. From the context menu, choose “Remove from replicas…” ("Remove from configuration")

    Note: After you use the “Remove from replicas…” ("Remove from configuration") function, it will remove the VM from the Replication job. You must re-add the VM back to the replication job manually.

 

Detach Snapshot Disks and Attach Base Disks

The following actions are performed with the replica VM using a vSphere Client.

  1. Edit the replica, select each of the disks, and click remove. It will put a strikethrough the drive and show the word (removing).
  2. After selecting all the disks for removal, press OK.

    When using the vSphere Web Client, if you run into a disk that displays “0” as the disk size, it won’t let you remove that disk from the VM. To remove this disk, you need to add a size to the disk. The number that you input here does not matter. We want to make sure the size of the disk no longer displays “0”. At this point, it will allow you to remove that disk.
  3. Edit the replica again and reattach the base disks to the replica.
    • Choose to add an existing disk.
    • Navigate to the location of the base disks for the replica.
    • Attach them to the same SCSI nodes that were noted earlier.

 

Datastore Cleanup

  1. Using the datastore browser, go to the folder of the replica.
  2. Most likely, there will be many files; keep in mind that the only files that are required are:
    • VMX — Virtual machine configuration file
    • VMXF — Additional virtual machine configuration files
    • NVRAM — Virtual machine BIOS or EFI configuration
    • VMDK — Virtual machine data disk (one base VMDK per disk)
      Note: Technically, the .vmdk file is a descriptor file, and the actual data contents are stored in a -flat.vmdk (base disk) or -delta.vmdk (snapshot) file. These flat and delta files remain hidden as long as there is a matching .vmdk file in the same folder. Snapshot .vmdk files can typically be identified by their names, which include a hyphen and six digits before the .vmdk extension (e.g., DC01-000001.vmdk).

    So, for example, here is a folder pre-cleanup post repair.
    User-added image

    We can remove the following files:
    User-added image

    Leaving the VMX, VMXF, NVRAM, and the VMDK for each disk. Removing the associated snapshot files that are no longer needed.

     

Test the replica

  1. Create a snapshot on the replica.
  2. Remove the snapshot.
  3. If no error occurs, re-add the VM to the replication job and map the replica.
  4. See if the job runs successfully.
To submit feedback regarding this article, please click this link: Send Article Feedback
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.

Spelling error in text

This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply except as noted in our Privacy Policy.
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

Oops! Something went wrong.

Please, try again later.

You have selected too large block!

Please try select less.

KB Feedback/Suggestion

This form is only for KB Feedback/Suggestions, if you need help with the software open a support case

By submitting, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.
This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply except as noted in our Privacy Policy.
Verify your email to continue your product download
We've sent a verification code to:
  • Incorrect verification code. Please try again.
An email with a verification code was just sent to
Didn't receive the code? Click to resend in sec
Didn't receive the code? Click to resend
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

error icon

Oops! Something went wrong.

Please, try again later.