Skip to content

Commit 2c8bf92

Browse files
committed
Fix Add-AzureRmVhd
1 parent 907fad6 commit 2c8bf92

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/AddVhdTests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ function Test-AddVhd
4343

4444
foreach ($testItem in $testData)
4545
{
46-
$vhdLocalPath = 'e:\vhdstore\' + $testItem.vhdName;
46+
$vhdLocalPath = 'f:\vhdstore\' + $testItem.vhdName;
4747
$vhdName = GetFileNameWithoutExtension $testItem.vhdName;
48-
$vhdDestUri = [System.String]::Format("{0}{1}/{2}{3}.vhd", $stoaccount.PrimaryEndpoints.Blob.AbsoluteUri, $vhdContainerName, $vhdName, $rgname);
48+
$vhdDestUri = [System.String]::Format("{0}{1}/{2}{3}.vhd", $stoaccount.PrimaryEndpoints.Blob, $vhdContainerName, $vhdName, $rgname);
4949
Write-Output ("Start Uploading... : " + $testItem.vhdName);
5050

5151
$vhdUploadContext = Add-AzureRmVhd -ResourceGroupName $rgname -Destination $vhdDestUri -LocalFilePath $vhdLocalPath -NumberOfUploaderThreads 1;

src/ResourceManager/Compute/Commands.Compute/StorageServices/AddAzureVhdCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public UploadParameters ValidateParameters()
141141
{
142142
if (vds.DiskType == DiskType.Fixed)
143143
{
144-
long divisor = Convert.ToInt64(Math.Pow(2, 20));
144+
long divisor = Convert.ToInt64(Math.Pow(2, 9));
145145
long rem = 0;
146146
Math.DivRem(filePath.Length, divisor, out rem);
147147
if (rem != 0)

0 commit comments

Comments
 (0)