-
- Enthusiast
- Posts: 38
- Liked: never
- Joined: Apr 22, 2012 1:36 pm
- Full Name: Andy Braithwaite
- Contact:
Script Instant Recovery of 6 VM's
I have a sharepoint farm which we will need to restore items, lists libraries, sites and site collecitons from. It seems that the quickest way to get all 6 VM's (1xDC, 1xSQL, 4xSharepoint) up and running on an isolated network is to use instant recovery. Because I can't set up an instant recovery 'job' in the UI (new feature please! ) I'll need to script it.
So what I need is a script that will prompt for the restore point, then start all 6 from that point in an isolated environment. Then I guess it would be handy if we could mount a 'helper' datastore to one of the VM's so data could be copied back to the live environment.
I hope this is enough info, if anyone could help with this I'd be very grateful!
Cheers
Andy
So what I need is a script that will prompt for the restore point, then start all 6 from that point in an isolated environment. Then I guess it would be handy if we could mount a 'helper' datastore to one of the VM's so data could be copied back to the live environment.
I hope this is enough info, if anyone could help with this I'd be very grateful!
Cheers
Andy
-
- Veteran
- Posts: 293
- Liked: 19 times
- Joined: Apr 13, 2011 12:45 pm
- Full Name: Thomas McConnell
- Contact:
Re: Script Instant Recovery of 6 VM's
Sounds easy enough, let me have a poke about and I'll get back to you, v6 I assume?
-
- Veteran
- Posts: 293
- Liked: 19 times
- Joined: Apr 13, 2011 12:45 pm
- Full Name: Thomas McConnell
- Contact:
Re: Script Instant Recovery of 6 VM's
on having another ponder, wouldn't using a surebackup job to spin up all 6 and then mounting a disk to one of them be a better option? scripted of course
-
- Enthusiast
- Posts: 38
- Liked: never
- Joined: Apr 22, 2012 1:36 pm
- Full Name: Andy Braithwaite
- Contact:
Re: Script Instant Recovery of 6 VM's
I have tried surebackup, there are a few issues with being able to communicate with the guests and confirm their roles. I'm going to raise a support case for that seperately, however even if that did work it seems that the surebackup job starts all the VM's in sequence, I really need to mount all the VM's as fast as possible.
I've had a fiddle but it's not working (yet)
$rp = Get-VBRRestorePoint -Backup ((Get-VBRBackup)[2])
$server = Get-VBRServer | where {$_.Name -eq "servername"}
$res = Find-VBRResourcePool -server $server
Start-VBRInstantRecovery -RestorePoint $rp -Server $server -ResourcePool $res
Any hints?
Thanks
Andy
I've had a fiddle but it's not working (yet)
$rp = Get-VBRRestorePoint -Backup ((Get-VBRBackup)[2])
$server = Get-VBRServer | where {$_.Name -eq "servername"}
$res = Find-VBRResourcePool -server $server
Start-VBRInstantRecovery -RestorePoint $rp -Server $server -ResourcePool $res
Any hints?
Thanks
Andy
-
- Veteran
- Posts: 293
- Liked: 19 times
- Joined: Apr 13, 2011 12:45 pm
- Full Name: Thomas McConnell
- Contact:
Re: Script Instant Recovery of 6 VM's
Haven't tested but this should be more what your after
you'll then have to use PowerCLI to change the VM onto your isolated network, connect the NICs, create and mount a disk and powerup, still think SB would be faster and you can fire more than one VM at a time with it also
Code: Select all
#Job name
jobName = "LAB - DC AA"
#VM name
$vmName = "vm.vPowerCLI.Local"
#Get the server you'll be using
$irRestoreServer = Get-VBRServer -Name "DestServer"
#Resource Pool
$irRestoreRP = Find-VBRResourcePool -Server $irRestoreServer -Name "Resources"
#Get the lastest restore point
$irRestorePoint = Get-VBRBackup -Name $jobName | Get-VBRRestorePoint -Name $vmName | Sort CreationTime -Descending | Select -First 1
#Fire the Instant restore job
Start-VBRInstantRecovery -VMName $("IR-" + $vmName) -Server $irRestoreServer -ResourcePool $irRestoreRP -PowerUp:$false -NICsEnabled:$false -Reason "vPowerCLI test IR" -RunAsync
-
- Enthusiast
- Posts: 38
- Liked: never
- Joined: Apr 22, 2012 1:36 pm
- Full Name: Andy Braithwaite
- Contact:
Re: Script Instant Recovery of 6 VM's
Thanks for the help so far Thomas, I'm curious, how can you start more than one at a time with surebackup?
My experience so far is that SB will start each VM in turn.
My experience so far is that SB will start each VM in turn.
-
- Chief Product Officer
- Posts: 31814
- Liked: 7302 times
- Joined: Jan 01, 2006 1:01 am
- Location: Baar, Switzerland
- Contact:
Re: Script Instant Recovery of 6 VM's
All VMs included in the Application Group are started at once (taking into account the required boot delay, of course).
All VMs from linked backup job with be started X at a time (where X is configurable, 3 by default).
All VMs from linked backup job with be started X at a time (where X is configurable, 3 by default).
-
- Enthusiast
- Posts: 38
- Liked: never
- Joined: Apr 22, 2012 1:36 pm
- Full Name: Andy Braithwaite
- Contact:
Re: Script Instant Recovery of 6 VM's
I think I'm missing something obvious, This is the description of the Application Group from the UI:
"Application Group defines your application dependancies by specifying the boot order of required VMs. Any application group typically includes at least a domain controller, DNS and DHCP server."
In the properties of the application group I can't find anywhere that allows me to boot multiple VMs - just the boot order...
Thanks for the help so far folks, sorry for the endless questions...
Andy
"Application Group defines your application dependancies by specifying the boot order of required VMs. Any application group typically includes at least a domain controller, DNS and DHCP server."
In the properties of the application group I can't find anywhere that allows me to boot multiple VMs - just the boot order...
Thanks for the help so far folks, sorry for the endless questions...
Andy
-
- Enthusiast
- Posts: 38
- Liked: never
- Joined: Apr 22, 2012 1:36 pm
- Full Name: Andy Braithwaite
- Contact:
Re: Script Instant Recovery of 6 VM's
Ahh, I found what you were referring to.
I was using 'application Group' not 'Backup Jobs' tab to define which servers to boot. The 'Backup Jobs' tab has the option to power on VMs simulataniousy.
Thanks for the help.
I was using 'application Group' not 'Backup Jobs' tab to define which servers to boot. The 'Backup Jobs' tab has the option to power on VMs simulataniousy.
Thanks for the help.
-
- Enthusiast
- Posts: 38
- Liked: never
- Joined: Apr 22, 2012 1:36 pm
- Full Name: Andy Braithwaite
- Contact:
Re: Script Instant Recovery of 6 VM's
It looks like the limitation with using the above is that the VM's are powered off immediately after successful boot.
It looks like I have three options:
a) powershell boot of all 6 VM's, followed by config changes (powercli)
b) Surebackup - use 'application group' - boot all VM's in order
c) Surebackup - use 'Backup Jobs' - boot all VM's simultaniously
Unless I've understood the functionality incorrectly:
a) is a problem because I want to be able to devolve the ability to restore sharepoint to the sharepoint admins, this might be a tad too complicated for them
b) takes a long time while you wait for each VM to boot
c) boots quickly but then shuts down each Vm immediately after a successful boot
I kinda need all VM's to boot at once, ignore all checking (if possible) and stay up until shut down.
I fear that this is going off topic (powershell) slightly, sorry for that!
Thanks again.
Andy
It looks like I have three options:
a) powershell boot of all 6 VM's, followed by config changes (powercli)
b) Surebackup - use 'application group' - boot all VM's in order
c) Surebackup - use 'Backup Jobs' - boot all VM's simultaniously
Unless I've understood the functionality incorrectly:
a) is a problem because I want to be able to devolve the ability to restore sharepoint to the sharepoint admins, this might be a tad too complicated for them
b) takes a long time while you wait for each VM to boot
c) boots quickly but then shuts down each Vm immediately after a successful boot
I kinda need all VM's to boot at once, ignore all checking (if possible) and stay up until shut down.
I fear that this is going off topic (powershell) slightly, sorry for that!
Thanks again.
Andy
Who is online
Users browsing this forum: No registered users and 14 guests