When using the azure portal, I can select a VM that is already 'Enabled' in Azure as a resource then perform the 'Enable Guest Management' action on it. But when attempting to use the Az cli to perform the same change, I get error as shown below...
Format of command used.....
az connectedvmware vm guest-agent enable --username "vm user name" --password "vm password" --resource-group "resource group name" --subscription "Name or ID of subscription" --vm-name "vm name"
Error returned......
az ERROR: The command failed with an unexpected error. Here is the traceback:t
C:\Users\Administrator\Desktop\CLI create VM.ps1:9 char:1
az connectedvmware vm guest-agent enable --username "administrator"
CategoryInfo : NotSpecified: (ERROR: The comm... the traceback::String) [],
RemoteException
FullyQualifiedErrorId : NativeCommandError
ERROR: 'str' object is not callable
Traceback (most recent call last):
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line
231, in invoke
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-
packages\azure/cli/core/commands/__init__.py", line 663, in execute
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-
packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-
packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "C:\Users\Administrator\.azure\cliextensions\connectedvmware\azext_connectedvmware\custom.py", line 1790, in enable_guest_agent
enable_system_identity(vm_client, resource_group_name, vm_name)
File "C:\Users\Administrator\.azure\cliextensions\connectedvmware\azext_connectedvmware\custom.py", line 1770, in enable_system_identity
return sdk_no_wait(
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/util.py", line 693, in sdk_no_wait
TypeError: 'str' object is not callable
I am successfully executing other various connectedVMware cli commands that use the various inputs mentioned for the command above but the "guest-agent enable" variant seems to fail consistently. Any help on working round would be appreciated,