Restoring single disk of the VM does not restore any data using hotadd mode
search cancel

Restoring single disk of the VM does not restore any data using hotadd mode

book

Article ID: 337825

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
Restoring the virtual machine with single disk attached does not restore any data via using hotadd transport mode

Environment

VMware Virtual Disk Development 1.2

Cause


Resolution

VMware recommends to use the default controller as paraVirtual controller for hotadd.
In case of failure, you can try to change controller to paravirtual, which is actually the default controller.

On SAN policy
SAN policy should be OfflineAll.
  1. Set SAN policy as OfflineAll. This will make new arrived disks to become offline.
  2. Open the Command Prompt with administrator privilege, and run this commands to set the SAN policy and ensure that SAN policy is set to OfflineAll.

    Note: Before trying the below steps, you must set the VIXDISKLIB_FLAG_OPEN_UNBUFFERED in the open flag of VixDiskLib_OpenEx.

    For example :

    C:\WINDOWS\system32>diskpart
    Microsoft DiskPart version 10.0.14393.0 Copyright (C) 1999-2013 Microsoft Corporation.
    On computer: WIN-H80K5UHVE8D
    DISKPART> san
    SAN Policy : Offline Shared
    DISKPART> san policy=OfflineAll
    DiskPart successfully changed the SAN policy for the current operating system.
    DISKPART> san
    SAN Policy : Offline All
    DISKPART>

  3. Also, refer the diskpart command. For more information, see the Microsoft TechNet article SAN. Then, try to restore disk by hotadd.
  4. Add two dummy new disks on the Proxy manually before hotadd. Accept the default config of two new disks.
  5. Power off the proxy VM, then change the SCSI controller type to be LSI logical parallel. if there are more than one SCSI controllers, change all of them.
  6. Restart the proxy VM.
  7. Clone the current Proxy VM to another one. Restore disks by hotadd mode on that cloned proxy VM.

Pre-requisites for hotadd
  • Proxy must set SAN policy to Offline.
  • Proxy must set auto mount to be disable.
  • The mounted disk must be Offline. If not, set it to be offline manually.

    Note: For the mounted disk which is online now, after user set it to Offline, it will be mounted as offline in the next time.

  • For Hotadd, Window automount should be disabled and Hotadded disk has to be Offline.
  • If the disk was previously attached to backup proxy and brought online, it will stay online even after san policy change until manually brought offline or via below script.

    Set the Execution Policy to Remote Signed. For more information, see the TechNet article Using the Set- ExecutionPolicy Cmdlet.

Use the below script to change disk status.

Note: Before executing the script, find the system disk in registry to be able to set the value back to 0 after running the script.

To find the system disk:

    1. From device manager select Disk drives > VMware Virtual disk.....

      Note: If there are several disks, do for all of them.

    2. Right-click Properties and click Details. From the dropdown list find Driver key.
    3. Navigate go to the registry HKLM:\SYSTEM\CurrentControlSet\Enum\SCSI\ and search for the Driver key value.
    4. Navigate to the corresponding Device Parameters\Partmgr , you will see Attributes key.
    5. After running the script, revert it back to 0.

      For all disks of the Datamover / backup Proxy.

      powershell script:
      $val = 3
      $vendor = "VMware"
      $devIDs = Get-ChildItem "HKLM:\SYSTEM\CurrentControlSet\Enum\SCSI\Disk*Ven_$vendor*\*\Device Parameters\"
      foreach ($id in $devIDs)
      {
      $error.Clear()
      $regpath = $id.PSPath + "\Partmgr\"
      Set-ItemProperty -path $regpath -Name Attributes -Value $val -ErrorAction SilentlyContinue
      if ($error) # didn't find the path, create it and try again
      {
      New-Item -Path $id.PSPath -Name Partmgr
      Set-ItemProperty -path $regpath -Name Attributes -Value $val -ErrorAction SilentlyContinue
      $error.Clear()
      }
      Get-ItemProperty -Path $regpath -Name Attributes -ErrorAction SilentlyContinue | Select Attributes | fl | Out-String -Stream
      }