Skip to content

Commit 3bd30e6

Browse files
authored
Merge pull request Azure#4053 from hyonholee/preview
Increase the max size of vhd to 4TB.
2 parents 5b6e1ce + 78cb649 commit 3bd30e6

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/ResourceManager/Compute/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
## Current Release
2121
* Fix Test-AzureRmVMAEMExtension for virtual machines with multiple managed disks
2222
* Updated Set-AzureRmVMAEMExtension: Add caching information for Premium managed disks
23+
* Add-AzureRmVhd: The size limit on vhd is increased to 4TB.
2324

2425
## Version 3.0.0
2526
* Updated Set-AzureRmVMAEMExtension and Test-AzureRmVMAEMExtension cmdlets to support Premium managed disks

src/ServiceManagement/Compute/Sync/Upload/BlobCreatorBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public interface ICloudPageBlobObjectFactory
3939

4040
public abstract class BlobCreatorBase
4141
{
42-
private const long OneTeraByte = 1024L * 1024L * 1024L * 1024L;
42+
private const long FourTeraByte = 4 * 1024L * 1024L * 1024L * 1024L;
4343

4444
protected FileInfo localVhd;
4545
protected readonly ICloudPageBlobObjectFactory blobObjectFactory;
@@ -96,10 +96,10 @@ private static void AssertIfValidVhdSize(FileInfo fileInfo)
9696
{
9797
using (var stream = new VirtualDiskStream(fileInfo.FullName))
9898
{
99-
if (stream.Length > OneTeraByte)
99+
if (stream.Length > FourTeraByte)
100100
{
101101
var lengthString = stream.Length.ToString("N0", CultureInfo.CurrentCulture);
102-
var expectedLengthString = OneTeraByte.ToString("N0", CultureInfo.CurrentCulture);
102+
var expectedLengthString = FourTeraByte.ToString("N0", CultureInfo.CurrentCulture);
103103
string message = String.Format("VHD size is too large ('{0}'), maximum allowed size is '{1}'.", lengthString, expectedLengthString);
104104
throw new InvalidOperationException(message);
105105
}

src/ServiceManagement/Services/Commands.Utilities/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
-->
2020
## Current Release
2121

22+
* Add-AzureVhd: The size limit on vhd is increased to 4TB.
23+
2224
## Version 4.0.0
2325

2426
## Version 3.8.0

0 commit comments

Comments
 (0)