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 server.

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

Constructor

VirtualMachine(*, location: str, tags: Dict[str, str] | None = None, plan: _models.Plan | None = None, identity: _models.VirtualMachineIdentity | None = None, zones: List[str] | None = None, hardware_profile: _models.HardwareProfile | None = None, storage_profile: _models.StorageProfile | None = None, os_profile: _models.OSProfile | None = None, network_profile: _models.NetworkProfile | None = None, diagnostics_profile: _models.DiagnosticsProfile | None = None, availability_set: _models.SubResource | None = None, license_type: str | None = None, **kwargs: Any)

Keyword-Only Parameters

Name Description
location
str

Resource location. Required.

tags

Resource tags.

plan

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

The identity of the virtual machine, if configured.

zones

The virtual machine zones.

hardware_profile

Specifies the hardware settings for the virtual machine.

storage_profile

Specifies the storage settings for the virtual machine disks.

os_profile

Specifies the operating system settings for the virtual machine.

network_profile

Specifies the network interfaces of the virtual machine.

diagnostics_profile

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

availability_set

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. # pylint: disable=line-too-long <br>``<br> For more information on Azure planned maintenance, see Planned maintenance for virtual machines in Azure # pylint: disable=line-too-long <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.

license_type
str

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 # pylint: disable=line-too-long <br>``<br> Minimum api-version: 2015-06-15.

Variables

Name Description
id
str

Resource Id.

name
str

Resource name.

type
str

Resource type.

location
str

Resource location. Required.

tags

Resource tags.

plan

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.

resources

The virtual machine child extension resources.

identity

The identity of the virtual machine, if configured.

zones

The virtual machine zones.

hardware_profile

Specifies the hardware settings for the virtual machine.

storage_profile

Specifies the storage settings for the virtual machine disks.

os_profile

Specifies the operating system settings for the virtual machine.

network_profile

Specifies the network interfaces of the virtual machine.

diagnostics_profile

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

availability_set

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. # pylint: disable=line-too-long <br>``<br> For more information on Azure planned maintenance, see Planned maintenance for virtual machines in Azure # pylint: disable=line-too-long <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.

provisioning_state
str

The provisioning state, which only appears in the response.

instance_view

The virtual machine instance view.

license_type
str

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 # pylint: disable=line-too-long <br>``<br> Minimum api-version: 2015-06-15.

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.