Scripting Server Recovery - DR RRS feed

  • Question

  • Hello Folks,

    I am looking for some advices and options for our annual DR exercise leveraging scripting and automate the recovery of 40+ mission critical servers in a short span of time.

    Here's brief about our excercise -

    1. Production VM Image to be replicated to DR Location Site, and its start visible to Vcenter,
    2. Before Power on the VM, we have to assigned the DR VLAN Port in Nic Configuration for Production Nic So that once we put the IP address of DR Site, it start working.
    3. Once the VLAN Port Assigned, we just Power on the VM,
    4. Once the VM Boot up, we just go into NIC Configuration and Change the IP address , DNS , Gateway, in the NIC card as per the DR Location.
    5. Once its done we handover the VM to client.



    • Moved by Bill_Stewart Monday, March 7, 2016 9:33 PM This is not "scripts on demand"
    Friday, February 5, 2016 11:49 AM

All replies

  • Hi Rishabh,

    welcome to the Technet forums, this seems to be quite a task you've picked up. For location-derived configuration after boot, you can prepare a startup script with a means to detect its location. Alternatively, you could just wait until the vm is ready and have an external script run the necessary commands vie VM control (whatever VM solution you happen to be using).

    For steps 1 through 3, there ought to be powershell tools from  the VM solution provider (all the big ones have it), so simply write a script that executes those steps.

    Consider boot order and dependencies, which VMs can be booted in parallel and which VMs need to wait until they may start again. Build your script so it considers parallel processing, boot order and throttling.

    Separate logic (script) from configuration data. Avoid hardcoding data into scripts - necessities will change over time and you do not want to have to keep changing the script for each configuration change. Rather keep all the data in a central location where your scripts have access to it (e.g.: A database).
    Nothing is more awkward than to have a guaranteed DR solution that fails, because someone had an old server hardcoded somewhere in line #2076 and the last person that remembered the server's name just happens to have left the company half a year ago.

    Well, there's plenty more, but this should get you started in the right direction, I think.


    There's no place like

    Friday, February 5, 2016 12:05 PM
  • Thanks for your response Fred, You surely understood my requirement but let me make it more straight forward -We are virtualized on VMware 5.5u3 and all i need to know is -

    1. How to change VLAN Port for 40 servers through Powershell Script.

    2. How change NIC config (IP DNS gateway etc) for 40 servers through Powershell Script.

    I bought in your point to check with VMware for such automation scripts, Is there a way we can execute above from a remote server using a powershell script ?

    Friday, February 5, 2016 12:37 PM
  • Hi Rishabh,

    1. Here's a good guide to VLan configuration in VMware.
    2. You can use Invoke-VMScript to run a script on the guest os. So simply build a regular script to change those settings and run them using this cmdlet.


    There's no place like

    Friday, February 5, 2016 1:27 PM