Open SongYouk opened 1 week ago
@SongYouk Thanks for your feedback! We will investigate and update as appropriate.
@TPavanBalaji The solution is very simple. I solved now. But I would like to recommend two things to be updated in the page.
But not any more possible to add new packages from the given environment. So should create new environment by myself as below.
Should be azure-common installed. Then now works. To let anyone can refer to this solution, I attached the pacakage information and my script.
The below is my script in runbook to start VM. And I used Service Principal rather than using 'azure_credential = DefaultAzureCredential()'
#!/usr/bin/env Python38new
# Example function to uninstall packages before reinstalling
import subprocess
import sys
import os
def upgrade_pip():
subprocess.call([sys.executable, "-m", "pip", "install", "--upgrade", "pip"])
from azure.identity import ClientSecretCredential
from azure.mgmt.compute import ComputeManagementClient
credential = ClientSecretCredential(
tenant_id='Your Tenant ID',
client_id='Your Client ID',
client_secret='Your Client Secret'
)
compute_client = ComputeManagementClient(credential, 'Your Subscription ID')
# Get resource group and VM name from command-line arguments
resource_group_name = "vm-tws_group"
vm_name = "vm-tws"
# Start the VM
print('\nStarting VM...')
async_vm_start = compute_client.virtual_machines.begin_start(resource_group_name, vm_name)
async_vm_start.wait()
print('\nVM started successfully.')
with best regards,
[Enter feedback here] Dear azure support team, could you check again really this page works?
I have installed all the packages' whl files as attached.
And I followrf all the process as described, and I remember that about two months ago I could get success from the same page, but today(May 5th, 2024), continuously get the error as "ModuleNotFoundError: No module named 'azure.profiles'"
So could you review and clarify again?
with best regards,
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.