我想用python从azure中的磁盘创建一个Linux虚拟机。我找到了一些建议使用VHD
进行操作的链接,但没有清楚地说明如何执行该操作。
有人能用python解释答案吗(不是在CLI
或powershell
或{
我已经提到这个documentation:
VM_PARAMETERS = {
'location': LOCATION,
'os_profile': {
'computer_name': VM_NAME,
'admin_username': USERNAME,
'admin_password': PASSWORD
},
'hardware_profile': {
'vm_size': 'Basic_A0'
},
'storage_profile': {
'image_reference': {
'publisher': 'Canonical',
'offer': 'UbuntuServer',
'sku': '16.04.0-LTS',
'version': 'latest'
},
},
'network_profile': {
'network_interfaces': [{
'id': nic_id,
}]
},
}
compute_client.virtual_machines.create_or_update(GROUP_NAME, VM_NAME, VM_PARAMETERS)
请帮我拿这个。在
你特别问。。。在
不过,你是在PowerShell问答论坛上问这个问题的。在
你不应该在python论坛上问这个问题吗? https://stackoverflow.com/questions/tagged/python
说的都是。VHD是虚拟硬盘。你必须有一个,首先在适当的地方,以连接到一个虚拟机,以启动一个虚拟机。在
相关问题 更多 >
编程相关推荐