Azure DSC - 使用 SAS 从存储帐户复制文件 - 错误 "Relative path is not supported"
Azure DSC - copying files from Storage Account with SAS - error "Relative path is not supported"
当我尝试使用 DSC 将网站(即使是单个文件)复制到 VM 时,配置如下:
File WebSiteContent {
Ensure = "Present"
SourcePath = "https://MYBLOB.blob.core.windows.net/prod/index.html?sv=2016-05-31&ss=b&srt=s&sp=rl&se=2017-11-29T21:47:36Z&st=2017-07-26T13:47:36Z&spr=https&sig=SIG_HERE"
DestinationPath = "C:\inetpub\backend\app_data"
Type = "Directory"
}
我收到一个错误:
[ERROR] Relative path is not supported. The related file/directory is: https://MYBLOB.blob.core.windows.net/prod/index.html?sv=2016-05-31&ss=b&srt=s&sp=rl&se=2017-11-29T21:47:36Z&st=2017-07-26T13:47:36Z&spr=https&sig=SIG_HERE. \r\n
不确定是什么原因,因为这是文件的绝对路径。任何让它发挥作用的建议都值得赞赏:)
您需要使用 xPSDesiredConfiguration 模块中的 xRemoteFile
File SetupDir {
Type = 'Directory'
DestinationPath = 'c:\Setup'
Ensure = "Present"
}
xRemoteFile SQLServerMangementPackage {
Uri = "http://go.microsoft.com/fwlink/?LinkID=824938"
DestinationPath = "c:\Setup\SSMS-Setup-ENU.exe"
DependsOn = "[File]SetupDir"
MatchSource = $false
}
当我尝试使用 DSC 将网站(即使是单个文件)复制到 VM 时,配置如下:
File WebSiteContent {
Ensure = "Present"
SourcePath = "https://MYBLOB.blob.core.windows.net/prod/index.html?sv=2016-05-31&ss=b&srt=s&sp=rl&se=2017-11-29T21:47:36Z&st=2017-07-26T13:47:36Z&spr=https&sig=SIG_HERE"
DestinationPath = "C:\inetpub\backend\app_data"
Type = "Directory"
}
我收到一个错误:
[ERROR] Relative path is not supported. The related file/directory is: https://MYBLOB.blob.core.windows.net/prod/index.html?sv=2016-05-31&ss=b&srt=s&sp=rl&se=2017-11-29T21:47:36Z&st=2017-07-26T13:47:36Z&spr=https&sig=SIG_HERE. \r\n
不确定是什么原因,因为这是文件的绝对路径。任何让它发挥作用的建议都值得赞赏:)
您需要使用 xPSDesiredConfiguration 模块中的 xRemoteFile
File SetupDir {
Type = 'Directory'
DestinationPath = 'c:\Setup'
Ensure = "Present"
}
xRemoteFile SQLServerMangementPackage {
Uri = "http://go.microsoft.com/fwlink/?LinkID=824938"
DestinationPath = "c:\Setup\SSMS-Setup-ENU.exe"
DependsOn = "[File]SetupDir"
MatchSource = $false
}