How to Configure Failover Functionality if the Storage of the Active Virtual Machine is Taken Offline



This Knowledgebase article provides information about how to failover properly if the storage of the Active Virtual Machine is taken offline.

More Information

As soon as the storage where the Active Virtual Machine resides goes offline, the Active server gets into a frozen/unknown state. Even in this state, the server still responds to pings. A failover can be initiated when the passive server finds that the active server is unavailable and not online.
Unfortunately, if the active server still replies to pings, the failover cannot be initiated.

The procedure below offers a solution which can be customized to ensure the failover takes place. In order to do this, some scripts need to be used.

The scripts can be find in the Attached Files section below.


- To ensure that everything functions correctly, VMware vSphere Command-Line Interface should be installed on both primary and secondary servers.
- The NFStorageCheck.bat script should be placed in the %Neverfail Intall Dir%\R2\Scripts folder.
- Prior to usage, both Start.bat and NFStorageCheck.bat should be edited with the correct environment information.


For best results, the script should be started when the server starts, and be left running.

The script will perform the follwing:

  • Check if the server is active or passive.
  • If active, sleep for a while then go to the start and perform the same check again.
  • If passive, then:
    • Create a file on a share on the active server’s system drive, via the channel ip address  (\\<Channel IP>\c$)
    • Delete that file .
    • If all is OK, sleep for a while then go to the start and perform the active/passive check again.
    • If the file operations fail, then:
    • Use VMware calls (etc) to shut down the active server and allow the passive to detect and execute a failover.
  • Sleep for a while and go to the start again.


  1. In order to keep the CMD window hidden the script should only be called by a start-up script. To achieve this, a separate start script should be created and linked to a startup GPO.
    This can be done as follows:
    1. Start the Group Policy Editor (gpedit.msc) to open the Local Computer policy.
      1. Click Start , and then click Run .
      2. In the Open box, type Gpedit.msc , and then click OK .
    2. Expand Computer Configuration (if it is not already expanded).
    3. Expand Windows Settings .
    4. Click Scripts (Startup/Shutdown) .
    5. In the right pane, double-click Startup .
    6. Click Add and point to the Start.bat file.
    7. Click Apply and then OK .
    8. Quit the Group Policy Editor snap-in.
  2. The script will create a log file in %Neverfail Intall Dir%\R2\logs folder.

Applies To

All Versions

Related Information



0 out of 0 found this helpful



Please sign in to leave a comment.