Skip to content

Commit 3424404

Browse files
yunzhangMSknithinc
authored andcommitted
fix absolute local uri in json file. (#488)
1 parent 77cf34f commit 3424404

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Syndication/AzureStack.MarketplaceSyndication.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,15 +395,15 @@ function Download-Product {
395395
If ($checktool -eq $true){
396396
DownloadMarketplaceProduct -Source $zipsource -Destination $zipdestination -ProductName "$zipName.zip" -PremiumDownload -MaxRetry 2
397397
"$productFolder\$zipName.zip"|out-file "$productFolder\$azpkgName.txt" -Append
398-
$productDetailsProperties['sourceBlob'].uri = "$productFolder\$zipName.zip"
398+
$productDetailsProperties['sourceBlob'].uri = "$zipName.zip"
399399
} else {
400400
Write-Verbose "Please install Azure Storage Tools AzCopy first,canceling" -verbose
401401
return
402402
}
403403
} else {
404404
DownloadMarketplaceProduct -Source $zipsource -Destination $zipdestination -ProductName "$zipName.zip" -MaxRetry 2
405405
"$productFolder\$zipName.zip"|out-file "$productFolder\$azpkgName.txt" -Append
406-
$productDetailsProperties['sourceBlob'].uri = "$productFolder\$zipName.zip"
406+
$productDetailsProperties['sourceBlob'].uri = "$zipName.zip"
407407
}
408408
}
409409
}
@@ -797,7 +797,7 @@ function Resolve-ToLocalURI {
797797

798798
# check vm extension zip
799799
if ($json.productDetailsProperties.sourceBlob) {
800-
$vmExtensionZip = $json.productDetailsProperties.sourceBlob.uri
800+
$vmExtensionZip = "$productFolder\" + $json.productDetailsProperties.sourceBlob.uri
801801
$vmExtensionURI = Upload-ToStorage -filePath $vmExtensionZip -productid $productid -resourceGroup $resourceGroup
802802
$json.productDetailsProperties.sourceBlob.uri = $vmExtensionURI
803803
}

Syndication/readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ $credential = Get-Credential -Message "Enter the azure stack operator credential
6666
Import-AzSOfflineMarketplaceItem -origin “marketplace content folder" -armendpoint "Environment Arm Endpoint" -AzsCredential $credential
6767
```
6868

69+
Option -Origin needs to be the top level folder contains all the downloaded products. In the example above, Origin should be "D:\downloadfolder".
6970
Option -AzsCredential is optional, it is used to renew access token in case token expires.
7071

7172
## Downloaded Content
@@ -75,7 +76,7 @@ Files (VHD, ZIP and AZPKG) associated with a gallery items are stored in the des
7576

7677
## Working with disconnected Azure Stack
7778

78-
Additional resources on how to work with disconnected Azure Stack
79+
Additional resources on how to work with disconnected Azure Stack. You can also use the following method to import VM and VM extension.
7980

8081
### Importing the VHD
8182
For detailed steps to use the Portal see:

0 commit comments

Comments
 (0)