This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Recovery and Update utility 3.2.78 new install fails at Rapid Appliance Self Recovery on DL4000

I have a DL4000 with a fresh install of Windows Server 2012. Attempting to run the latest RUU fails at the RASR step with an error message regarding the file C:\Dell\BMR\BMR_UpdateBMR.ps1
That directory is empty, and I cannot continue the install without completing the RASR install. Nothing that I've been able to find in the documentation helps.

 

Parents
  • Hi ljungnitsch:
    You are in a rather tight spot as redoing the Appliance from scratch is not supported. (This is why there are so many ways to recover it). Not sure if this helps, but please find the content of the BMR_UpdateBMR.ps1 script below (some lines may be broken due to their length and some diacritical signs [i.e. quotation marks] may be modified so they need to be replaced with the correct ones; if it is the case, search-and-replace would help.

    Its default location is in the C:\Dell_OEM\BMR folder so I suspect that it may be moved from/to the C:\DELL\BMR folder during the deployment.

    param ([switch]$interactive,$agentfile=$null)
    #export-import retention policy for a core and agents
    function get-infoobject{
    param ($cred=$null,$corename=$env:computername,$uriend)
    try{
    if(!($corename)){$corename=$env:computername}
    $url = "https://$($corename):8006/apprecovery/api/core/"
    $url = $url + $uriend
    $wc = New-Object System.Net.WebClient
    if($cred){$wc.Credentials = $cred}else{$wc.usedefaultcredentials=$true}
    [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }
    [xml]$objectinfo = $wc.DownloadString($url)
    }catch{Write-Host "Unable to retrieve requested object from core $corename" -f red;return $null }
    return $objectinfo
    }
    function get-agents{
    param ($r=$repohash)
    $agents=@()
    $agentkey = "HKEY_LOCAL_MACHINE\SOFTWARE\AppRecovery\Core\Agents"
    $agentsobject = get-childitem -Path "Registry::$($agentkey)"
    foreach($agentobject in $agentsobject){
    $fullpath = $agentobject.name
    $id = $fullpath | Split-Path -Leaf
    $agentname = (get-itemproperty -path "Registry::$($agentobject.name)" -name displayname).displayname
    $testpath="Registry::$($fullpath)\ReplicationService\RemoteCoreSummaryInfo"
    $test = test-path -Path $testpath
    if($test){$mastercorename=(Get-ItemProperty -Path $testpath -Name hostname).hostname;$agenttype="Replicated"}else{$mastercorename=$null;$agenttype="Protected"}
    $repoid = (Get-ItemProperty -Path "Registry::$($fullpath)\AgentProtectionConfiguration\StorageConfiguration" -Name RepositoryId).repositoryid
    $agent=[pscustomobject]@{Agentname=$agentname;Agenttype=$agenttype;Agentid=$id;MasterCoreName=$mastercorename;Volumes=(get-protecteddrives -id ($id));Repository=$r.item($repoid)}
    $agents+= $agent
    }
    return $agents | sort-object agentname
    }
    function get-repositories {
    $repohash=@{}
    $repositorykey = "HKEY_LOCAL_MACHINE\SOFTWARE\AppRecovery\Core\Repositories"
    [array]$repositoryfullids = (get-childitem -Path "Registry::$($repositorykey)").name
    foreach($repositoryfullid in $repositoryfullids){
    $repoid = $repositoryfullid | Split-Path -Leaf
    $reponame= (Get-ItemProperty -Path "Registry::$($repositoryfullid)\Specification" -Name name).name
    $repohash.Add($repoid,$reponame)
    }
    return $repohash
    }
    function get-protecteddrives {
    param ($id)
    $vollist = @()
    try{
    $agprotectiongroups = (get-childitem -path "REGISTRY::HKEY_LOCAL_MACHINE\SOFTWARE\AppRecovery\Core\Agents\$id\AgentProtectionConfiguration\ProtectionGroups" -ErrorAction Stop).name
    foreach($agprotectiongroup in $agprotectiongroups){
    $agvolumespath ="REGISTRY::$agprotectiongroup\VolumeNames"
    $agvolumes = (get-childitem -path $agvolumespath).Name

    foreach ($agvolume in $agvolumes){
    try{
    $agvol = (Get-ItemProperty -Path "REGISTRY::$agvolume" -Name Displayname -ErrorAction Stop).displayname
    }
    catch {
    $agvol = (Get-ItemProperty -Path "REGISTRY::$agvolume" -Name Guidname).Guidname
    $agvol = "(Volume '" + $agvol + "')"

    }
    $vollist += $agvol
    }
    }
    return ($vollist | sort-object)
    }
    catch{return $null}
    }
    cls
    $tempfolder = "$env:USERPROFILE\Downloads\RRInfo-$([GUID]::NewGuid().guid)"

    $menu = @"
    Select the operation to perform

    1. Export Retention Policy

    2. Export Protection Groups and Transfer Schedule

    Further instructions pop up when the execution finishes

    Enter option value
    "@
    if(!(Test-Path $tempfolder)){new-item -Path $tempfolder -ItemType Directory -Force | out-null}
    do{
    cls
    Write-Host "Retention Policy / Protection Policy Export Script`n--------------------------------------------------" -f Green
    Write-Host "Files Location: $tempfolder `n`n" -ForegroundColor Yellow
    $optype = Read-Host -Prompt $menu
    }until(1,2 -contains $optype)

    $prefix="ProtPol"
    if($optype -eq 1){$prefix="RetPol"}

    $placeholder=([GUID]::NewGuid()).Guid
    #make unique temp folder
    if(!(test-path -path $tempfolder -PathType Container)){New-Item -Path "$($tempfolder)" -ItemType Directory > $null}

    New-Item -Path "$($tempfolder)\$($prefix)$($placeholder)" -ItemType Directory > $null
    $firstline = "Windows Registry Editor Version 5.00"
    if($optype -eq 1){
    $corerp = "HKEY_LOCAL_MACHINE\SOFTWARE\AppRecovery\Core\RollupService"
    $agentrp = "HKEY_LOCAL_MACHINE\SOFTWARE\AppRecovery\Core\Agents\$placeholder\RollupService"
    $opname= "retention_policy"
    if(!($interactive.IsPresent)){
    #export core rollup policy
    Write-Host "Exporting Core $($env:computername) $opname" -f yellow
    & reg export $corerp "$($tempfolder)\$($prefix)$($placeholder)\$($env:computername).reg"
    $keyremovalfile += "`[-$($corerp)`]",""
    $addendum = " Core Retention Policy will NOT change"
    }
    }
    else {
    $agentrp = "HKEY_LOCAL_MACHINE\SOFTWARE\AppRecovery\Core\Agents\$placeholder\AgentProtectionConfiguration\ProtectionGroups"
    $opname= "protection_policy"
    }


    $keyremovalfile = @()
    $finalregfiletext=@()
    #get agents ids
    $repohash = get-repositories
    #$agentsraw = get-agents -r $repohash #(get-infoobject -uriend "agents").agents.agent
    $agentsraw = (get-infoobject -uriend "agents").agents.agent | where {"recoverypointsonly","HyperVServer","EsxServer","HyperVCluster" -notcontains $_.agenttype}| sort-object -Property displayname
    #$agents= $agentsraw | select-object @{n="displayname";e={$_.agentname}},@{n="id";e={$_.agentid}},repository
    $agents= $agentsraw | select-object @{n="displayname";e={$_.displayname}},@{n="id";e={$_.id}},repositoryname
    if($interactive.IsPresent){$agents = $agents | Out-GridView -Title "Select the agents to process. $addendum" -PassThru}
    if($agentfile){
    $myagents = get-content $agentfile

    $zz = $agents
    $agents=@()
    foreach($agent in $zz){
    if($myagents -contains $agent.displayname){$agents += $agent}
    }
    $agents | ft
    do{
    $response= Read-Host "Do you want to continue? `[Y/N`]"
    }until("Y","N" -contains $response)
    if($response -eq "N"){exit}
    }
    if(!($agents)){Write-Host "`n`nExiting...`n`n";exit}


    #export agents rollup policy
    Write-Host "`nBeginning Job" -ForegroundColor Yellow
    foreach ($agent in $agents){
    start-sleep 1
    Write-Host "`nExporting agent $($agent.displayname) $opname" -f yellow
    $agentkey = $agentrp.replace($placeholder,$agent.id)
    & reg export $agentkey "$($tempfolder)\$($prefix)$($placeholder)\$($agent.displayname).reg"
    $keyremovalfile += "`[-$($agentkey)`]",""
    }
    $regfiles = (get-childitem -Path "$($tempfolder)\$($prefix)$($placeholder)").fullname
    $finalregfiletext +=$firstline,""
    $finalregfiletext += $keyremovalfile

    foreach ($regfile in $regfiles){

    $finalregfiletext += (get-content -Path $regfile).replace($firstline,"")
    }
    $finalregfiletext | out-file "$tempfolder\$($env:computername)-$($opname).reg"

    $instructions = @"
    I N S T R U C T I O N S

    * Copy the content of
    `'$tempfolder`'
    on the target machine

    * Use
    `'$($env:computername)-$($opname).reg`'
    to import all exported values or

    * Use the files in
    `'$($prefix)$($placeholder)`'
    to import only specific agents

    * Hit 'OK' to open the results folder

    "@
    [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | out-null
    [System.Windows.Forms.MessageBox]::Show($instructions)
    Write-Host "`nJob Finished`n`n" -ForegroundColor Yellow
    invoke-item -path $tempfolder
Reply
  • Hi ljungnitsch:
    You are in a rather tight spot as redoing the Appliance from scratch is not supported. (This is why there are so many ways to recover it). Not sure if this helps, but please find the content of the BMR_UpdateBMR.ps1 script below (some lines may be broken due to their length and some diacritical signs [i.e. quotation marks] may be modified so they need to be replaced with the correct ones; if it is the case, search-and-replace would help.

    Its default location is in the C:\Dell_OEM\BMR folder so I suspect that it may be moved from/to the C:\DELL\BMR folder during the deployment.

    param ([switch]$interactive,$agentfile=$null)
    #export-import retention policy for a core and agents
    function get-infoobject{
    param ($cred=$null,$corename=$env:computername,$uriend)
    try{
    if(!($corename)){$corename=$env:computername}
    $url = "https://$($corename):8006/apprecovery/api/core/"
    $url = $url + $uriend
    $wc = New-Object System.Net.WebClient
    if($cred){$wc.Credentials = $cred}else{$wc.usedefaultcredentials=$true}
    [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }
    [xml]$objectinfo = $wc.DownloadString($url)
    }catch{Write-Host "Unable to retrieve requested object from core $corename" -f red;return $null }
    return $objectinfo
    }
    function get-agents{
    param ($r=$repohash)
    $agents=@()
    $agentkey = "HKEY_LOCAL_MACHINE\SOFTWARE\AppRecovery\Core\Agents"
    $agentsobject = get-childitem -Path "Registry::$($agentkey)"
    foreach($agentobject in $agentsobject){
    $fullpath = $agentobject.name
    $id = $fullpath | Split-Path -Leaf
    $agentname = (get-itemproperty -path "Registry::$($agentobject.name)" -name displayname).displayname
    $testpath="Registry::$($fullpath)\ReplicationService\RemoteCoreSummaryInfo"
    $test = test-path -Path $testpath
    if($test){$mastercorename=(Get-ItemProperty -Path $testpath -Name hostname).hostname;$agenttype="Replicated"}else{$mastercorename=$null;$agenttype="Protected"}
    $repoid = (Get-ItemProperty -Path "Registry::$($fullpath)\AgentProtectionConfiguration\StorageConfiguration" -Name RepositoryId).repositoryid
    $agent=[pscustomobject]@{Agentname=$agentname;Agenttype=$agenttype;Agentid=$id;MasterCoreName=$mastercorename;Volumes=(get-protecteddrives -id ($id));Repository=$r.item($repoid)}
    $agents+= $agent
    }
    return $agents | sort-object agentname
    }
    function get-repositories {
    $repohash=@{}
    $repositorykey = "HKEY_LOCAL_MACHINE\SOFTWARE\AppRecovery\Core\Repositories"
    [array]$repositoryfullids = (get-childitem -Path "Registry::$($repositorykey)").name
    foreach($repositoryfullid in $repositoryfullids){
    $repoid = $repositoryfullid | Split-Path -Leaf
    $reponame= (Get-ItemProperty -Path "Registry::$($repositoryfullid)\Specification" -Name name).name
    $repohash.Add($repoid,$reponame)
    }
    return $repohash
    }
    function get-protecteddrives {
    param ($id)
    $vollist = @()
    try{
    $agprotectiongroups = (get-childitem -path "REGISTRY::HKEY_LOCAL_MACHINE\SOFTWARE\AppRecovery\Core\Agents\$id\AgentProtectionConfiguration\ProtectionGroups" -ErrorAction Stop).name
    foreach($agprotectiongroup in $agprotectiongroups){
    $agvolumespath ="REGISTRY::$agprotectiongroup\VolumeNames"
    $agvolumes = (get-childitem -path $agvolumespath).Name

    foreach ($agvolume in $agvolumes){
    try{
    $agvol = (Get-ItemProperty -Path "REGISTRY::$agvolume" -Name Displayname -ErrorAction Stop).displayname
    }
    catch {
    $agvol = (Get-ItemProperty -Path "REGISTRY::$agvolume" -Name Guidname).Guidname
    $agvol = "(Volume '" + $agvol + "')"

    }
    $vollist += $agvol
    }
    }
    return ($vollist | sort-object)
    }
    catch{return $null}
    }
    cls
    $tempfolder = "$env:USERPROFILE\Downloads\RRInfo-$([GUID]::NewGuid().guid)"

    $menu = @"
    Select the operation to perform

    1. Export Retention Policy

    2. Export Protection Groups and Transfer Schedule

    Further instructions pop up when the execution finishes

    Enter option value
    "@
    if(!(Test-Path $tempfolder)){new-item -Path $tempfolder -ItemType Directory -Force | out-null}
    do{
    cls
    Write-Host "Retention Policy / Protection Policy Export Script`n--------------------------------------------------" -f Green
    Write-Host "Files Location: $tempfolder `n`n" -ForegroundColor Yellow
    $optype = Read-Host -Prompt $menu
    }until(1,2 -contains $optype)

    $prefix="ProtPol"
    if($optype -eq 1){$prefix="RetPol"}

    $placeholder=([GUID]::NewGuid()).Guid
    #make unique temp folder
    if(!(test-path -path $tempfolder -PathType Container)){New-Item -Path "$($tempfolder)" -ItemType Directory > $null}

    New-Item -Path "$($tempfolder)\$($prefix)$($placeholder)" -ItemType Directory > $null
    $firstline = "Windows Registry Editor Version 5.00"
    if($optype -eq 1){
    $corerp = "HKEY_LOCAL_MACHINE\SOFTWARE\AppRecovery\Core\RollupService"
    $agentrp = "HKEY_LOCAL_MACHINE\SOFTWARE\AppRecovery\Core\Agents\$placeholder\RollupService"
    $opname= "retention_policy"
    if(!($interactive.IsPresent)){
    #export core rollup policy
    Write-Host "Exporting Core $($env:computername) $opname" -f yellow
    & reg export $corerp "$($tempfolder)\$($prefix)$($placeholder)\$($env:computername).reg"
    $keyremovalfile += "`[-$($corerp)`]",""
    $addendum = " Core Retention Policy will NOT change"
    }
    }
    else {
    $agentrp = "HKEY_LOCAL_MACHINE\SOFTWARE\AppRecovery\Core\Agents\$placeholder\AgentProtectionConfiguration\ProtectionGroups"
    $opname= "protection_policy"
    }


    $keyremovalfile = @()
    $finalregfiletext=@()
    #get agents ids
    $repohash = get-repositories
    #$agentsraw = get-agents -r $repohash #(get-infoobject -uriend "agents").agents.agent
    $agentsraw = (get-infoobject -uriend "agents").agents.agent | where {"recoverypointsonly","HyperVServer","EsxServer","HyperVCluster" -notcontains $_.agenttype}| sort-object -Property displayname
    #$agents= $agentsraw | select-object @{n="displayname";e={$_.agentname}},@{n="id";e={$_.agentid}},repository
    $agents= $agentsraw | select-object @{n="displayname";e={$_.displayname}},@{n="id";e={$_.id}},repositoryname
    if($interactive.IsPresent){$agents = $agents | Out-GridView -Title "Select the agents to process. $addendum" -PassThru}
    if($agentfile){
    $myagents = get-content $agentfile

    $zz = $agents
    $agents=@()
    foreach($agent in $zz){
    if($myagents -contains $agent.displayname){$agents += $agent}
    }
    $agents | ft
    do{
    $response= Read-Host "Do you want to continue? `[Y/N`]"
    }until("Y","N" -contains $response)
    if($response -eq "N"){exit}
    }
    if(!($agents)){Write-Host "`n`nExiting...`n`n";exit}


    #export agents rollup policy
    Write-Host "`nBeginning Job" -ForegroundColor Yellow
    foreach ($agent in $agents){
    start-sleep 1
    Write-Host "`nExporting agent $($agent.displayname) $opname" -f yellow
    $agentkey = $agentrp.replace($placeholder,$agent.id)
    & reg export $agentkey "$($tempfolder)\$($prefix)$($placeholder)\$($agent.displayname).reg"
    $keyremovalfile += "`[-$($agentkey)`]",""
    }
    $regfiles = (get-childitem -Path "$($tempfolder)\$($prefix)$($placeholder)").fullname
    $finalregfiletext +=$firstline,""
    $finalregfiletext += $keyremovalfile

    foreach ($regfile in $regfiles){

    $finalregfiletext += (get-content -Path $regfile).replace($firstline,"")
    }
    $finalregfiletext | out-file "$tempfolder\$($env:computername)-$($opname).reg"

    $instructions = @"
    I N S T R U C T I O N S

    * Copy the content of
    `'$tempfolder`'
    on the target machine

    * Use
    `'$($env:computername)-$($opname).reg`'
    to import all exported values or

    * Use the files in
    `'$($prefix)$($placeholder)`'
    to import only specific agents

    * Hit 'OK' to open the results folder

    "@
    [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | out-null
    [System.Windows.Forms.MessageBox]::Show($instructions)
    Write-Host "`nJob Finished`n`n" -ForegroundColor Yellow
    invoke-item -path $tempfolder
Children
No Data