HP StorageWorks Storage Mirroring Application Notes - Guidelines for Using VMware GSX Server with Storage Mirroring (T2558-96023, November 2006)
8
• Use .SHR Share Mapping File
• Active Directory—Failover Hostname
6. Verify that the VMware GSX console window is not started on the target host server. If it is started and
the target virtual machine is highlighted, the pre-failover script will not start the virtual machine. See the
VMware documentation for more information.
7. If a failure occurs, you will want to have the virtual machine start on the target automatically. To do this,
create a batch file called
postover.bat using the sample batch file below. Save the batch file to the
same directory on the target where your Storage Mirroring files are installed.
SAMPLE_POSTOVER.BAT
8. After a failure is resolved, you will be ready to bring your source back online. At this time, you will
want to stop the virtual machine on the target automatically. To do this, create a batch file called
preback.bat using the sample batch file below. Save the batch file to the same directory on your
target where your Storage Mirroring files are installed.
SAMPLE_PREBACK.BAT
NOTE: VMware Tools (included with VMware) must be installed on the virtual machine for the trysoft
option used in the pre-failback script to work correctly. VMware tools can be installed from the Settings
menu within the virtual machine. If VMware tools are not installed, the soft or hard commands can be
substituted. However, they are not preferred because the
trysoft option will first try to shut down the
virtual machine gracefully and only if it fails will it perform a hard shutdown.
9. Back on the Failover Control Center Monitor Settings dialog box, click Scripts and specify the scripts
that were previously created, using postover.bat for the target post-failover scrip and
preback.bat for the target pre-failback.
NOTE: The scripts are processed using the same account running the Storage Mirroring services.
10. Click OK to go back to the Monitor Settings dialog box.
11. Click OK to begin monitoring the source machine.
In the event of a source failure, your target is now ready to stand in for the source. For information on
monitoring failover, see the HP StorageWorks Storage Mirroring user’s guide.
Restoring back to the original source
If your source experiences a failure, such as a power, network, or disk failure, the virtual machine on the
target will stand in for the source while you resolve the source machine issues.
1. Verify that your source machine is not connected to the network. If it is, disconnect it.
REM Sample post-failover script for VMware
REM You may need to modify the path to the VMware-cmd file to fit your environment.
REM You will need to modify the path and name of the virtual machine.
REM The following command should appear as one line in your script file. It is on two
REM lines here so that you can see the entire command.
“C:\Program Files\VMware\VMware VMperl Scripting API vmware-cmd” “c:\Documents and
Settings\user_name\My Documents\my virtual machines\machine_type_dir\machine_type.vmx” start
rem
***SAMPLE*** pre-failback script for VMware failover
rem This sample batch file is provided as an example only. Because no two environments or
rem configurations are exactly the same, you MUST modify this script in order to make the
rem solution work in your environment.
REM You may need to modify the path to the VMware-cmd file to fit your environment.
REM You will need to modify the path and name of the virtual machine
REM The following command should appear as one line in your script file. It is on two
REM lines here so that you can see the entire command.
“C:\Program Files\VMware\VMware VMperl Scripting API vmware-cmd” “c:\Documents and Settings\
user_name\My Documents\my virtual machines\machine_type_dir\machine_type.vmx” stop trysoft