azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

New-AzureRmVM stalls when called from (gui) event

Open keeshuizer opened this issue 9 years ago • 5 comments

Cmdlet(s)

New-AzureRmVM

PowerShell Version

5.1.14393.576

Module Version

OS Version

10.0.14393.576

Description

After running into an issue with storage related cmdlets which are run from a PowerShell GUI script (issue 3205 : https://github.com/Azure/azure-powershell/issues/3205) I'm using an ad-hoc build which includes the fix for this issue.

I just now ran into a problem (the same problem?) with another cmdlet:

The cmdlet is 'New-AzureRmVM'.

I'm creating a new VM using an existing vhd file, when i run the commands in a normal PowerShell session the New-AzureRmVM exits after a minute or so with the following:

PS N:> New-AzureRmVM -ResourceGroupName $SelectedTestEnv -Location $location -VM $vm -Verbose VERBOSE: Performing the operation "New" on target "app-keten01".

RequestId IsSuccessStatusCode StatusCode ReasonPhrase

                 True         OK OK

When i run the exact same code from my PowerShell GUI the creation of the VM is initiated (and finishes according to the Azure portal), but the command never finishes, it just hangs after the 'Performing the operation 'New' line.

Script/Steps for Reproduction

Execute New-AzureRmVM from a GUI event

keeshuizer avatar Jan 11 '17 08:01 keeshuizer

@singhkays Hey Kay, would you mind taking a look at this issue? It has been branch off from issue https://github.com/Azure/azure-powershell/issues/3205

cormacpayne avatar Jan 17 '17 22:01 cormacpayne

Any news/progress on this issue? I want to continue working on my script/gui but this little bug doesn't make that very easy :-(

keeshuizer avatar Jan 25 '17 08:01 keeshuizer

@hyonholee Can you take a look if this is same as #3205 ?

@twitchax In #3205 you mentioned.

twitchax commented on Dec 28, 2016 @keeshuizer, as @blueww mentioned, we understand that thread-safety is a concern, but we would prefer to do it right and make all of Azure PowerShell thread-safe.

Since this seems like the same issue, has there been any update on making PS thread safe?

singhkays avatar Jan 31 '17 22:01 singhkays

@shahabhijeet, can we engage compute to see if this is the same issue that storage has? Or, is this possibly caused by our underlying lack of support for concurrency?

twitchax avatar Jan 31 '17 23:01 twitchax

This appears to have been fixed. Closing.

cormacpayne avatar Mar 28 '18 00:03 cormacpayne