Skip to content

Commit 8666922

Browse files
committed
Update osDisk URI during second deployment in TestVirtualMachine test case to avoid conflicting blob URI error.
1 parent 81bb00f commit 8666922

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ function Test-VirtualMachine
212212
$p2.OSProfile = $p.OSProfile;
213213
$p2.NetworkProfile = $p.NetworkProfile;
214214
$p2.StorageProfile = $p.StorageProfile;
215+
216+
$p2.StorageProfile.DataDisks = $null;
217+
$p2.StorageProfile.OsDisk.Vhd.Uri = "https://$stoname.blob.core.windows.net/test/os2.vhd";
215218
New-AzureRmVM -ResourceGroupName $rgname -Location $loc -VM $p2;
216219

217220
$vm2 = Get-AzureRmVM -Name $vmname2 -ResourceGroupName $rgname;

0 commit comments

Comments
 (0)