Azure Stack SQL RP安装脚本失败
我尝试使用两个不同的脚本安装Azure Stack SQL RP,并且安装失败并出现不同的错误,如下所示:
I tried to install Azure Stack SQL RP with two different scripts and for both installation failed with different error as follows:
第一个脚本:
First Script:
#Variables
# Variables
$ defaultLocalPath =" C:\AzureStackOnAzureVM"
$defaultLocalPath = "C:\AzureStackOnAzureVM"
$ domain =" AzureStack"
$domain = "AzureStack"
$ prefix =" AzS"
$prefix = "AzS"
$ privilegedEndpoint =" $ prefix-ERCS01"
$privilegedEndpoint = "$prefix-ERCS01"
$ aadAdmin =" Admin @ Magakhnoukoutlook .onmicrosoft.com"
$aadAdmin = "Admin@Magakhnoukoutlook.onmicrosoft.com"
$ cloudAdmin =" AZURESTACK\CloudAdmin"
$cloudAdmin = "AZURESTACK\CloudAdmin"
$ vmLocalAdmin =" sqlrpadmin"
$vmLocalAdmin = "sqlrpadmin"
$ AadTenant =" Magakhnoukoutlook.onmicrosoft .com"
$AadTenant = "Magakhnoukoutlook.onmicrosoft.com"
#指向将要提取RP安装文件的目录的指针
# Pointer to the directory where the RP installation files will be extracted
$ tempDir =" $ defaultLocalPath\SQLRP"
$tempDir = "$defaultLocalPath\SQLRP"
#查找最新的SQL RP位'url
# Find latest SQL RP bits' url
$ url =" https://aka.ms/ azurestacksqlrp "   
$url = "https://aka.ms/azurestacksqlrp"
$ WebClientObject = New-Object System。 Net.WebClient
$WebClientObject = New-Object System.Net.WebClient
$ WebRequest = [System.Net.WebRequest] :: create ($ URL)
$WebRequest = [System.Net.WebRequest]::create($URL)
$ WebResponse = $ WebRequest.GetResponse()
$WebResponse = $WebRequest.GetResponse()
$ ActualDownloadURL = $ WebResponse.ResponseUri.AbsoluteUri
$ActualDownloadURL = $WebResponse.ResponseUri.AbsoluteUri
$ WebResponse.Close()
$WebResponse.Close()
#下载并提取最新的SQL RP位
# Download and extract latest SQL RP bits
New-Item`
New-Item `
; 
-Path $ tempDir`
-Path $tempDir `
   
-ItemType目录-Force
-ItemType Directory -Force
cd $ tempDir
cd $tempDir
Start-BitsTransfer`
Start-BitsTransfer `
-Source $ ActualDownloadURL`
-Source $ActualDownloadURL `
   
-Destination $ defaultLocalPath \sqlrp.zip
-Destination $defaultLocalPath\sqlrp.zip
Unblock-File`
Unblock-File `
$ defaultLocalPath \sqlrp.zip
$defaultLocalPath\sqlrp.zip
Expand -Archive`
Expand-Archive `
-Path $ defaultLocalPath \sqlrp.zip`
-Path $defaultLocalPath\sqlrp.zip `
  ;  
-DestinationPath $ tempDir -Force
-DestinationPath $tempDir -Force
#Create服务管理员帐户的凭证对象
# Create credential object for service admin account
$ aadAdminPass = ConvertTo-SecureString" MAGnfjcg @ " -AsPlainText -Force
$aadAdminPass = ConvertTo-SecureString "MAGnfjcg@" -AsPlainText -Force
$ aadAdminCred = New-Object System.Management.Automation。 PSCredential(" $ aadAdmin",$ aadAdminPass)
$aadAdminCred = New-Object System.Management.Automation.PSCredential ("$aadAdmin", $aadAdminPass)
#和特权所需的cloudadmin凭据端点访问
#and the cloudadmin credential required for Privileged Endpoint access
$ cloudAdminPass = ConvertTo-SecureString" MAGnfjcg!@#$" ; -AsPlainText -Force
$cloudAdminPass = ConvertTo-SecureString "MAGnfjcg!@#$" -AsPlainText -Force
$ cloudAdminCred = New-Object System.Management.Automation。 PSCredential($ cloudAdmin,$ cloudAdminPass)
$cloudAdminCred = New-Object System.Management.Automation.PSCredential ($cloudAdmin, $cloudAdminPass)
#设置新资源提供者的凭据VM
# Set credentials for the new Resource Provider VM
$ vmLocalAdminPass = ConvertTo-SecureString" MAGnfjcg!@#$" -AsPlainText -Force
$vmLocalAdminPass = ConvertTo-SecureString "MAGnfjcg!@#$" -AsPlainText -Force
$ vmLocalAdminCred = New-Object System.Management.Automation。 PSCredential($ vmLocalAdmin,$ vmLocalAdminPass)
$vmLocalAdminCred = New-Object System.Management.Automation.PSCredential ($vmLocalAdmin, $vmLocalAdminPass)
#根据需要更改以下内容
# change the following as appropriate
$ PfxPass = ConvertTo-SecureString" MAGnfjcg!@#$" -AsPlainText -Force
$PfxPass = ConvertTo-SecureString "MAGnfjcg!@#$" -AsPlainText -Force
#对于Azure Stack开发工具包,此值设置为
https://adminmanagement.local.azurestack.external 。
# For Azure Stack development kit, this value is set to https://adminmanagement.local.azurestack.external.
$ ArmEndpoint =
" https://adminmanagement.local.azurestack.external "
$ArmEndpoint = "https://adminmanagement.local.azurestack.external"
#注册一个面向Azure Stack实例的AzureRM环境
# Register an AzureRM environment that targets your Azure Stack instance
Add-AzureRMEnvironment`
Add-AzureRMEnvironment `
-Name" AzureStackAdmin" `
-Name "AzureStackAdmin" `
-ArmEndpoint $ ArmEndpoint
-ArmEndpoint $ArmEndpoint
#Get the Active目录tenantId
# Get the Active Directory tenantId
$ AuthEndpoint =(Get-AzureRmEnvironment -Name" AzureStackAdmin") .ActiveDirectoryAuthority.TrimEnd('/')
$AuthEndpoint = (Get-AzureRmEnvironment -Name "AzureStackAdmin").ActiveDirectoryAuthority.TrimEnd('/')
$ TenantId =(invoke-restmethod " $($ AuthEndpoint)/ $($ AADTenant)/。熟知/ openid-configuration")。issuer.TrimEnd('/')。分割('/')[ - 1]
$TenantId = (invoke-restmethod "$($AuthEndpoint)/$($AADTenant)/.well-known/openid-configuration").issuer.TrimEnd('/').Split('/')[-1]
#登录您的环境
# Sign in to your environment
Login-AzureRmAccount`
Login-AzureRmAccount `
-EnvironmentName" AzureStackAdmin" `
-EnvironmentName "AzureStackAdmin" `
-TenantId $ TenantID`
-TenantId $TenantID `
 
-Credential $ AadAdminCred
-Credential $AadAdminCred
#将目录更改为解压缩安装文件的文件夹
# Change directory to the folder where you extracted the installation files
#并调整端点
。\ DeploySQLProvider.ps1`
.\DeploySQLProvider.ps1 `
-AzCredential $ aadAdminCred`
-AzCredential $aadAdminCred `
   
-VMLocalCredential $ vmLocalAdminCred`
-VMLocalCredential $vmLocalAdminCred `
   
-CloudAdminCredential $ cloudAdminCred`
-CloudAdminCredential $cloudAdminCred `
   
-PrivilegedEndpoint $ privilegedEndpoint`
-PrivilegedEndpoint $privilegedEndpoint `
   
-DefaultSSLCertificatePassword $ PfxPass`
-DefaultSSLCertificatePassword $PfxPass `
   
-DependencyFilesLocalPath $ tempDir \cert
-DependencyFilesLocalPath $tempDir\cert
第一个脚本错误:
First Script Error:
PS> TerminatingError():"无法部署SQLAdapter"&b
PS> TerminatingError ():"无法执行[C:\AzureStackOnAzureVM \SQLRP \Providers \Deploy-Microsoft-provider.ps1]命令。错误:System.ArgumentException:无法在此部署来自在线文档的SQLAdapter"
PS>TerminatingError(): "Failed to deploy the SQLAdapter"
PS>TerminatingError(): "Can not execute [C:\AzureStackOnAzureVM\SQLRP\Providers\Deploy-Microsoft-provider.ps1] command. The error: System.ArgumentException: Failed to deploy the SQLAdapter"
第二个脚本
https://docs.microsoft.com/en-us/azure/ azure-stack / azure-stack-sql-resource-provider-deploy:
第二个脚本错误:
second script error:
找到2.3.0版本的Azure PowerShell模块,需要Azure PowerShell与Stack兼容,使用ArmProfile 2017-03-09-profile,请卸载当前版本版本并重新运行RP步骤
Azure PowerShell Module with 2.3.0 version found, Need Azure powershell compatible with Stack, Use ArmProfile 2017-03-09-profile, Please Uninstall the current version and rerun the RP step
(我之前尝试卸载Azure模块但没有工作)
(I tried uninstall Azure Module before but did not work)
任何指导?
这是1902的已知问题,我们正在努力调整PowerShell版本。
以下是GitHub问题,其中列出了概述,并且rfsonders在评论中发布了一种解决方法 。
您需要删除其他模块,并为RP安装安装所请求的版本,然后卸载并重新安装Azure Stack版本之后。
You will need to remove other modules, and install the requested version for the RP installation, then uninstall and reinstall the Azure Stack versions after.