@Tinnapop
Apologies for the delayed response. Based on my research streaming the output from compute_client.virtual_machines.begin_run_command
in real time is not supported by Azure. The begin_run_command
method returns a long-running operation poller object that can be used to check the status or get the result of the command execution. However, the poller object does not provide a way to stream the output as it is being generated by the script. The output is only available after the command execution is completed or failed.
One possible workaround is to use the output_blob_uri
parameter of the run_command_parameters
dictionary to specify an Azure storage blob where the script output stream will be uploaded. This way, you can monitor the blob content while the script is running and get the output in real time.
Hope this helps! Let me know if you have further questions.