fix(region): azure vm disk size

This commit is contained in:
Qu Xuan
2021-08-12 19:44:36 +08:00
parent 2f0e6887b7
commit 30b112545d
2 changed files with 68 additions and 0 deletions
+3
View File
@@ -102,6 +102,9 @@ func (self *SClassicDisk) GetDiskSizeMB() int {
if self.Properties.DiskSizeGB > 0 {
return int(self.Properties.DiskSizeGB * 1024)
}
if self.Properties.DiskSize > 0 {
return int(self.Properties.DiskSize * 1024)
}
return 0
}
@@ -76,4 +76,69 @@ var CLASSIC_VM_SIZES = map[string]ClassicVMSize{
"Standard_G3": {MemoryInMB: 112 * 1024, NumberOfCores: 8, StorageSize: 1, MaxNic: 4},
"Standard_G4": {MemoryInMB: 224 * 1024, NumberOfCores: 16, StorageSize: 3, MaxNic: 8},
"Standard_G5": {MemoryInMB: 448 * 1024, NumberOfCores: 32, StorageSize: 6, MaxNic: 8},
"Standard_A0": {MemoryInMB: 768, NumberOfCores: 1},
"Standard_A1": {MemoryInMB: 1792, NumberOfCores: 1},
"Standard_A2": {MemoryInMB: 3584, NumberOfCores: 2},
"Standard_A3": {MemoryInMB: 7168, NumberOfCores: 4},
"Standard_A5": {MemoryInMB: 14336, NumberOfCores: 2},
"Standard_A4": {MemoryInMB: 14336, NumberOfCores: 8},
"Standard_A6": {MemoryInMB: 28672, NumberOfCores: 4},
"Standard_A7": {MemoryInMB: 57344, NumberOfCores: 8},
"Basic_A0": {MemoryInMB: 768, NumberOfCores: 1},
"Basic_A1": {MemoryInMB: 1792, NumberOfCores: 1},
"Basic_A2": {MemoryInMB: 3584, NumberOfCores: 2},
"Basic_A3": {MemoryInMB: 7168, NumberOfCores: 4},
"Basic_A4": {MemoryInMB: 14336, NumberOfCores: 8},
"Standard_D2_v2_Promo": {MemoryInMB: 7168, NumberOfCores: 2},
"Standard_D3_v2_Promo": {MemoryInMB: 14336, NumberOfCores: 4},
"Standard_D4_v2_Promo": {MemoryInMB: 28672, NumberOfCores: 8},
"Standard_D5_v2_Promo": {MemoryInMB: 57344, NumberOfCores: 16},
"Standard_D11_v2_Promo": {MemoryInMB: 14336, NumberOfCores: 2},
"Standard_D12_v2_Promo": {MemoryInMB: 28672, NumberOfCores: 4},
"Standard_D13_v2_Promo": {MemoryInMB: 57344, NumberOfCores: 8},
"Standard_D14_v2_Promo": {MemoryInMB: 114688, NumberOfCores: 16},
"Standard_F1": {MemoryInMB: 2048, NumberOfCores: 1},
"Standard_F2": {MemoryInMB: 4096, NumberOfCores: 2},
"Standard_F4": {MemoryInMB: 8192, NumberOfCores: 4},
"Standard_F8": {MemoryInMB: 16384, NumberOfCores: 8},
"Standard_F16": {MemoryInMB: 32768, NumberOfCores: 16},
"Standard_DS1_v2": {MemoryInMB: 3584, NumberOfCores: 1},
"Standard_DS2_v2": {MemoryInMB: 7168, NumberOfCores: 2},
"Standard_DS3_v2": {MemoryInMB: 14336, NumberOfCores: 4},
"Standard_DS4_v2": {MemoryInMB: 28672, NumberOfCores: 8},
"Standard_DS5_v2": {MemoryInMB: 57344, NumberOfCores: 16},
"Standard_DS11-1_v2": {MemoryInMB: 14336, NumberOfCores: 2},
"Standard_DS11_v2": {MemoryInMB: 14336, NumberOfCores: 2},
"Standard_DS12-1_v2": {MemoryInMB: 28672, NumberOfCores: 4},
"Standard_DS12-2_v2": {MemoryInMB: 28672, NumberOfCores: 4},
"Standard_DS12_v2": {MemoryInMB: 28672, NumberOfCores: 4},
"Standard_DS13-2_v2": {MemoryInMB: 57344, NumberOfCores: 8},
"Standard_DS13-4_v2": {MemoryInMB: 57344, NumberOfCores: 8},
"Standard_DS13_v2": {MemoryInMB: 57344, NumberOfCores: 8},
"Standard_DS14-4_v2": {MemoryInMB: 114688, NumberOfCores: 16},
"Standard_DS14-8_v2": {MemoryInMB: 114688, NumberOfCores: 16},
"Standard_DS14_v2": {MemoryInMB: 114688, NumberOfCores: 16},
"Standard_DS15_v2": {MemoryInMB: 143360, NumberOfCores: 20},
"Standard_DS2_v2_Promo": {MemoryInMB: 7168, NumberOfCores: 2},
"Standard_DS3_v2_Promo": {MemoryInMB: 14336, NumberOfCores: 4},
"Standard_DS4_v2_Promo": {MemoryInMB: 28672, NumberOfCores: 8},
"Standard_DS5_v2_Promo": {MemoryInMB: 57344, NumberOfCores: 16},
"Standard_DS11_v2_Promo": {MemoryInMB: 14336, NumberOfCores: 2},
"Standard_DS12_v2_Promo": {MemoryInMB: 28672, NumberOfCores: 4},
"Standard_DS13_v2_Promo": {MemoryInMB: 57344, NumberOfCores: 8},
"Standard_DS14_v2_Promo": {MemoryInMB: 114688, NumberOfCores: 16},
"Standard_F1s": {MemoryInMB: 2048, NumberOfCores: 1},
"Standard_F2s": {MemoryInMB: 4096, NumberOfCores: 2},
"Standard_F4s": {MemoryInMB: 8192, NumberOfCores: 4},
"Standard_F8s": {MemoryInMB: 16384, NumberOfCores: 8},
"Standard_F16s": {MemoryInMB: 32768, NumberOfCores: 16},
"Standard_DS1": {MemoryInMB: 3584, NumberOfCores: 1},
"Standard_DS2": {MemoryInMB: 7168, NumberOfCores: 2},
"Standard_DS3": {MemoryInMB: 14336, NumberOfCores: 4},
"Standard_DS4": {MemoryInMB: 28672, NumberOfCores: 8},
"Standard_DS11": {MemoryInMB: 14336, NumberOfCores: 2},
"Standard_DS12": {MemoryInMB: 28672, NumberOfCores: 4},
"Standard_DS13": {MemoryInMB: 57344, NumberOfCores: 8},
"Standard_DS14": {MemoryInMB: 114688, NumberOfCores: 16},
}