http://communities.vmware.com/docs/DOC-7470
I stumbled accross this link and will be looking into it today...Just wondered if anone has had a play with this yet
As we cannot afford to purchase SRM... this look like the way forward !!!!!!
Sorted ..Simple failover script taking into consideration Vmx have been created on the DR side.
Regards
I have taken a hint from the link and wirtten mine ( Not right yet )
In my evnvironment there is need to failover all the Vms running in a resource pool . So The Resource pool is the same on both datacenter .. so This it is he only parameter that needs to be passed
The script should
1) get and shutdown all the VMs on the source datacenter cluster
2) pause and wait for you to type "CONTINUE" ( You then go and do the SAN failover side)
3) Type continue and resan all hosts on cluster2
4) Start all vm in cluster2...&respource pool
Note in my environmnet all the vmx and resource have all ready been created @ the DR side....
As I said am still working on it ..as I am not yet a powershell GURU
I have re-written this simple script
Add VI-toolkit #
##################
Add-PSsnapin VMware.VimAutomation.Core
Initialize-VIToolkitEnvironment.ps1
*
connect-VIServer $vcserver
*
################################################################################
get List of Vm to failover and Shutdown
################################################################################
$vms = Get-Cluster -Name $cluster1 | Get-ResourcePool -Name $pool | Get-VM | Shutdown-VMGuest
################################################################################
Pause and wait for user input to continue.
################################################################################
#???????????????
################################################################################
Rescan target hosts storage
################################################################################
$ScanHost = Get-Cluster -name $cluster2 | Get-VMHost | Get-VMHostStorage -RescanAllHBA
################################################################################
#Start Target Virtual Machine
################################################################################
$vmstart = Get-Cluster -Name $cluster2 | Get-ResourcePool -Name $pool | Get-VM | Start-VM
##############################
Disconnect session from VC #
##############################
*
disconnect-viserver -confirm:$false
I just need to add code to get it to pause and wait for user input
*