Virtual Machine Scale Set - Management Issue

%3CLINGO-SUB%20id%3D%22lingo-sub-71007%22%20slang%3D%22en-US%22%3EVirtual%20Machine%20Scale%20Set%20-%20Management%20Issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-71007%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20-%20hoping%20someone%20has%20come%20across%20this%20issue.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20having%20a%20problem%20with%20manual%20VMSS%20scaling%20commands.%20At%20the%20moment%20I'm%26nbsp%3Btrying%20to%20grow%20a%20scale%20set%20using%20the%20documented%20commands%2C%20but%20I%20have%20run%20into%20issues%20-%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUsing%20the%20PowerShell%26nbsp%3Bcommand%20(listed%20helpfully%26nbsp%3Bon%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fmsftstack.wordpress.com%2F2016%2F05%2F13%2Fchange-the-instance-count-of-an-azure-vm-scale-set%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ethis%20blog%3C%2FA%3E%3A(%3C%2Fimg%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CEM%3E%24vmss%20%3D%20Get-AzureRmVmss%20-ResourceGroupName%20RMNAME%20-VMScaleSetName%20SSNAME%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CEM%3E%24vmss.Sku.Capacity%20%3D%2010%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CEM%3EUpdate-AzureRmVmss%20-ResourceGroupName%20RMNAME%20-Name%20SSNAME%20-VirtualMachineScaleSet%20%24vmss%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20get%20the%26nbsp%3Berror%20below%2C%20setting%26nbsp%3B%3CEM%3ESSNAME%26nbsp%3B%3C%2FEM%3Eas%20a%20variable%20gives%20the%20same%20result%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CEM%3EUpdate-AzureRmVmss%20%3A%20'Name'%20cannot%20be%20null.%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20the%20same%20process%20via%20the%20Azure%20CLI%20command%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CEM%3Eaz%20vmss%20scale%20-g%26nbsp%3BRMNAME%26nbsp%3B-n%20SSNAME%20%E2%80%93new-capacity%2010%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20time%20i%20received%26nbsp%3Bthe%20below%20error%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CEM%3Eaz%20vmss%20scale%3A%20error%3A%20the%20following%20arguments%20are%20required%3A%20--new-capacity%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERunning%20the%26nbsp%3B%3CSTRONG%3E%3CEM%3E--debug%3C%2FEM%3E%3C%2FSTRONG%3E%26nbsp%3Bswitch%26nbsp%3Bshows%20that%20the%20argument%26nbsp%3Bappears%20to%20be%20parsed...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CEM%3EApplication%20event%20'CommandParser.Parsing'%20with%20event%20data%20%7B'argv'%3A%20%5B'vmss'%2C%20'sca%3C%2FEM%3E%3C%2FSTRONG%3E%3CSTRONG%3E%3CEM%3Ele'%2C%20'-g'%2C%20'RMNAME'%2C%20'-n'%2C%20'SSNAME'%2C%20'%E2%80%93new-capacity'%2C%20'10'%5D%7D%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%2C%20I'm%20a%20little%20bit%20stuck%20-%20it%20obviously%26nbsp%3B%3CEM%3Eshould%26nbsp%3B%3C%2FEM%3Ework%2C%20as%20its%20a%20documented%20operation.%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20only%20reason%20I%20could%20think%20that%20it%20may%20not%20be%20working%20is%20that%20I'm%20trying%20this%20against%20the%20UK%20South%20environment%2C%20which%20is%20very%20new%2C%20and%20maybe%20not%20all%20functions%20are%20supported.%20However%2C%20this%20shouldn't%26nbsp%3Bresult%20in%20the%20azure%20cli%20output.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20assistance%20appreciated!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-71007%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-74169%22%20slang%3D%22en-US%22%3ERe%3A%20Virtual%20Machine%20Scale%20Set%20-%20Management%20Issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-74169%22%20slang%3D%22en-US%22%3E%3CP%3Ehave%20you%20varified%20you%20have%20permission%20to%20get%20the%20requested%20target%20in%20powershell.%3C%2FP%3E%3CP%3EApart%20from%20that%20i%20found%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-machine-scale-sets%2Fvirtual-machine-scale-sets-overview%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ethis%3C%2FA%3E%2C%20that%20also%20shows%20you%20are%20using%20the%20correct%20method.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anyone%20on%20your%20company%20perhaps%20have%20a%20Action%20pack%20or%20Visual%20studio%20enterprise%20sub%2C%20they%20would%20have%205-10%20support%20tickets.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello - hoping someone has come across this issue.

 

I'm having a problem with manual VMSS scaling commands. At the moment I'm trying to grow a scale set using the documented commands, but I have run into issues -

 

Using the PowerShell command (listed helpfully on this blog:( 

 

$vmss = Get-AzureRmVmss -ResourceGroupName RMNAME -VMScaleSetName SSNAME

$vmss.Sku.Capacity = 10

Update-AzureRmVmss -ResourceGroupName RMNAME -Name SSNAME -VirtualMachineScaleSet $vmss

 

I get the error below, setting SSNAME as a variable gives the same result:

 

Update-AzureRmVmss : 'Name' cannot be null.

 

I tried the same process via the Azure CLI command:

 

az vmss scale -g RMNAME -n SSNAME –new-capacity 10

 

This time i received the below error:

 

az vmss scale: error: the following arguments are required: --new-capacity

 

Running the --debug switch shows that the argument appears to be parsed...

 

Application event 'CommandParser.Parsing' with event data {'argv': ['vmss', 'scale', '-g', 'RMNAME', '-n', 'SSNAME', '–new-capacity', '10']}

 

So, I'm a little bit stuck - it obviously should work, as its a documented operation. 

The only reason I could think that it may not be working is that I'm trying this against the UK South environment, which is very new, and maybe not all functions are supported. However, this shouldn't result in the azure cli output.

 

Any assistance appreciated!

 

1 Reply

have you varified you have permission to get the requested target in powershell.

Apart from that i found this, that also shows you are using the correct method.

 

Does anyone on your company perhaps have a Action pack or Visual studio enterprise sub, they would have 5-10 support tickets.