@@ -26,6 +26,7 @@ function Test-VirtualMachineBootDiagnostics
26
26
# Common
27
27
$loc = Get-ComputeVMLocation ;
28
28
New-AzureRmResourceGroup - Name $rgname - Location $loc - Force;
29
+ $storageEndpointSuffix = Get-DefaultStorageEndpointSuffix ;
29
30
30
31
# VM Profile & Hardware
31
32
$vmsize = ' Standard_A4' ;
@@ -63,9 +64,9 @@ function Test-VirtualMachineBootDiagnostics
63
64
64
65
$osDiskName = ' osDisk' ;
65
66
$osDiskCaching = ' ReadWrite' ;
66
- $osDiskVhdUri = " https://$stoname .blob.$env: STORAGEENDPOINTSUFFIX /test/os.vhd" ;
67
- $dataDiskVhdUri1 = " https://$stoname .blob.$env: STORAGEENDPOINTSUFFIX /test/data1.vhd" ;
68
- $dataDiskVhdUri2 = " https://$stoname .blob.$env: STORAGEENDPOINTSUFFIX /test/data2.vhd" ;
67
+ $osDiskVhdUri = " https://$stoname .blob.$storageEndpointSuffix /test/os.vhd" ;
68
+ $dataDiskVhdUri1 = " https://$stoname .blob.$storageEndpointSuffix /test/data1.vhd" ;
69
+ $dataDiskVhdUri2 = " https://$stoname .blob.$storageEndpointSuffix /test/data2.vhd" ;
69
70
70
71
$p = Set-AzureRmVMOSDisk - VM $p - Name $osDiskName - VhdUri $osDiskVhdUri - Caching $osDiskCaching - CreateOption FromImage;
71
72
$p = Add-AzureRmVMDataDisk - VM $p - Name ' testDataDisk1' - Caching ' ReadOnly' - DiskSizeInGB 10 - Lun 1 - VhdUri $dataDiskVhdUri1 - CreateOption Empty;
@@ -90,7 +91,7 @@ function Test-VirtualMachineBootDiagnostics
90
91
$securePassword = ConvertTo-SecureString $password - AsPlainText - Force;
91
92
$cred = New-Object System.Management.Automation.PSCredential ($user , $securePassword );
92
93
$computerName = ' test' ;
93
- $vhdContainer = " https://$stoname .blob.$env: STORAGEENDPOINTSUFFIX /test" ;
94
+ $vhdContainer = " https://$stoname .blob.$storageEndpointSuffix /test" ;
94
95
95
96
$p = Set-AzureRmVMOperatingSystem - VM $p - Windows - ComputerName $computerName - Credential $cred ;
96
97
@@ -195,6 +196,7 @@ function Test-VirtualMachineBootDiagnosticsPremium
195
196
# Common
196
197
$loc = Get-ComputeVMLocation ;
197
198
New-AzureRMResourceGroup - Name $rgname - Location $loc - Force;
199
+ $storageEndpointSuffix = Get-DefaultStorageEndpointSuffix ;
198
200
199
201
# VM Profile & Hardware
200
202
$vmsize = ' Standard_DS1' ;
@@ -232,7 +234,7 @@ function Test-VirtualMachineBootDiagnosticsPremium
232
234
233
235
$osDiskName = ' osDisk' ;
234
236
$osDiskCaching = ' None' ;
235
- $osDiskVhdUri = " https://$stoname .blob.$env: STORAGEENDPOINTSUFFIX /test/os.vhd" ;
237
+ $osDiskVhdUri = " https://$stoname .blob.$storageEndpointSuffix /test/os.vhd" ;
236
238
237
239
$p = Set-AzureRMVMOSDisk - VM $p - Name $osDiskName - VhdUri $osDiskVhdUri - Caching $osDiskCaching - CreateOption FromImage;
238
240
@@ -246,7 +248,7 @@ function Test-VirtualMachineBootDiagnosticsPremium
246
248
$securePassword = ConvertTo-SecureString $password - AsPlainText - Force;
247
249
$cred = New-Object System.Management.Automation.PSCredential ($user , $securePassword );
248
250
$computerName = ' test' ;
249
- $vhdContainer = " https://$stoname .blob.$env: STORAGEENDPOINTSUFFIX /test" ;
251
+ $vhdContainer = " https://$stoname .blob.$storageEndpointSuffix /test" ;
250
252
251
253
$p = Set-AzureRMVMOperatingSystem - VM $p - Windows - ComputerName $computerName - Credential $cred ;
252
254
@@ -304,6 +306,7 @@ function Test-LinuxVirtualMachineBootDiagnostics
304
306
# Common
305
307
$loc = Get-ComputeVMLocation ;
306
308
New-AzureRMResourceGroup - Name $rgname - Location $loc - Force;
309
+ $storageEndpointSuffix = Get-DefaultStorageEndpointSuffix ;
307
310
308
311
# VM Profile & Hardware
309
312
$vmsize = ' Standard_A4' ;
@@ -335,7 +338,7 @@ function Test-LinuxVirtualMachineBootDiagnostics
335
338
336
339
$osDiskName = ' osDisk' ;
337
340
$osDiskCaching = ' ReadWrite' ;
338
- $osDiskVhdUri = " https://$stoname .blob.$env: STORAGEENDPOINTSUFFIX /test/os.vhd" ;
341
+ $osDiskVhdUri = " https://$stoname .blob.$storageEndpointSuffix /test/os.vhd" ;
339
342
$p = Set-AzureRMVMOSDisk - VM $p - Name $osDiskName - VhdUri $osDiskVhdUri - Caching $osDiskCaching - CreateOption FromImage;
340
343
341
344
Assert-AreEqual $p.StorageProfile.OSDisk.Caching $osDiskCaching ;
@@ -348,7 +351,7 @@ function Test-LinuxVirtualMachineBootDiagnostics
348
351
$securePassword = ConvertTo-SecureString $password - AsPlainText - Force;
349
352
$cred = New-Object System.Management.Automation.PSCredential ($user , $securePassword );
350
353
$computerName = ' test' ;
351
- $vhdContainer = " https://$stoname .blob.$env: STORAGEENDPOINTSUFFIX /test" ;
354
+ $vhdContainer = " https://$stoname .blob.$storageEndpointSuffix /test" ;
352
355
353
356
$imgRef = Get-DefaultCRPLinuxImageOffline ;
354
357
@@ -409,6 +412,7 @@ function Test-VirtualMachineBootDiagnosticsSet
409
412
# Common
410
413
$loc = Get-ComputeVMLocation ;
411
414
New-AzureRMResourceGroup - Name $rgname - Location $loc - Force;
415
+ $storageEndpointSuffix = Get-DefaultStorageEndpointSuffix ;
412
416
413
417
# VM Profile & Hardware
414
418
$vmsize = ' Standard_A4' ;
@@ -451,7 +455,7 @@ function Test-VirtualMachineBootDiagnosticsSet
451
455
452
456
$osDiskName = ' osDisk' ;
453
457
$osDiskCaching = ' ReadWrite' ;
454
- $osDiskVhdUri = " https://$stoname .blob.$env: STORAGEENDPOINTSUFFIX /test/os.vhd" ;
458
+ $osDiskVhdUri = " https://$stoname .blob.$storageEndpointSuffix /test/os.vhd" ;
455
459
456
460
$p = Set-AzureRMVMOSDisk - VM $p - Name $osDiskName - VhdUri $osDiskVhdUri - Caching $osDiskCaching - CreateOption FromImage;
457
461
@@ -465,7 +469,7 @@ function Test-VirtualMachineBootDiagnosticsSet
465
469
$securePassword = ConvertTo-SecureString $password - AsPlainText - Force;
466
470
$cred = New-Object System.Management.Automation.PSCredential ($user , $securePassword );
467
471
$computerName = ' test' ;
468
- $vhdContainer = " https://$stoname .blob.$env: STORAGEENDPOINTSUFFIX /test" ;
472
+ $vhdContainer = " https://$stoname .blob.$storageEndpointSuffix /test" ;
469
473
470
474
$p = Set-AzureRMVMOperatingSystem - VM $p - Windows - ComputerName $computerName - Credential $cred ;
471
475
0 commit comments