VirtualMachine Class

Describes a Virtual Machine.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Inheritance
azure.mgmt.compute.v2018_06_01.models._models_py3.Resource
VirtualMachine

Constructor

VirtualMachine(*, location: str, tags: typing.Union[typing.Dict[str, str], NoneType] = None, plan: typing.Union[_ForwardRef('Plan'), NoneType] = None, identity: typing.Union[_ForwardRef('VirtualMachineIdentity'), NoneType] = None, zones: typing.Union[typing.List[str], NoneType] = None, hardware_profile: typing.Union[_ForwardRef('HardwareProfile'), NoneType] = None, storage_profile: typing.Union[_ForwardRef('StorageProfile'), NoneType] = None, additional_capabilities: typing.Union[_ForwardRef('AdditionalCapabilities'), NoneType] = None, os_profile: typing.Union[_ForwardRef('OSProfile'), NoneType] = None, network_profile: typing.Union[_ForwardRef('NetworkProfile'), NoneType] = None, diagnostics_profile: typing.Union[_ForwardRef('DiagnosticsProfile'), NoneType] = None, availability_set: typing.Union[_ForwardRef('SubResource'), NoneType] = None, proximity_placement_group: typing.Union[_ForwardRef('SubResource'), NoneType] = None, license_type: typing.Union[str, NoneType] = None, **kwargs)

Parameters

location
str
Required

Required. Resource location.

tags
dict[str, str]
Required

A set of tags. Resource tags.

plan
Plan
Required

Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save.

identity
VirtualMachineIdentity
Required

The identity of the virtual machine, if configured.

zones
list[str]
Required

The virtual machine zones.

hardware_profile
HardwareProfile
Required

Specifies the hardware settings for the virtual machine.

storage_profile
StorageProfile
Required

Specifies the storage settings for the virtual machine disks.

additional_capabilities
AdditionalCapabilities
Required

Specifies additional capabilities enabled or disabled on the virtual machine.

os_profile
OSProfile
Required

Specifies the operating system settings for the virtual machine.

network_profile
NetworkProfile
Required

Specifies the network interfaces of the virtual machine.

diagnostics_profile
DiagnosticsProfile
Required

Specifies the boot diagnostic settings state. <br>:code:>><<<br>Minimum api-version: 2015-06-15.

availability_set
SubResource
Required

Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see Manage the availability of virtual machines. <br>``<br> For more information on Azure planned maintenance, see Planned maintenance for virtual machines in Azure <br>``<br> Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

proximity_placement_group
SubResource
Required

Specifies information about the proximity placement group that the virtual machine should be assigned to. <br>:code:>><<<br>Minimum api-version: 2018-04-01.

license_type
str
Required

Specifies that the image or disk that is being used was licensed on-premises. This element is only used for images that contain the Windows Server operating system. <br>``<br> Possible values are: <br>``<br> Windows_Client <br>``<br> Windows_Server <br>``<br> If this element is included in a request for an update, the value must match the initial value. This value cannot be updated. <br>``<br> For more information, see Azure Hybrid Use Benefit for Windows Server <br>``<br> Minimum api-version: 2015-06-15.

Variables

id
str

Resource Id.

name
str

Resource name.

type
str

Resource type.

resources
list[VirtualMachineExtension]

The virtual machine child extension resources.

provisioning_state
str

The provisioning state, which only appears in the response.

instance_view
VirtualMachineInstanceView

The virtual machine instance view.

vm_id
str

Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands.