इनोवेट समिट में माइग्रेट करें:
जानें कि Azure में माइग्रेट और आधुनिकीकरण कैसे आपके व्यवसाय के प्रदर्शन, लचीलापन और सुरक्षा को बढ़ावा दे सकता है, जिससे आप AI को पूरी तरह से अपना सकते हैं।अभी पंजीकरण करें
यह ब्राउज़र अब समर्थित नहीं है.
नवीनतम सुविधाओं, सुरक्षा अपडेट और तकनीकी सहायता का लाभ लेने के लिए Microsoft Edge में अपग्रेड करें.
Create a virtual machine on VMware vCenter using Azure Arc
आलेख
This article describes how to provision a VM using vCenter resources from Azure portal.
Create a VM in the Azure portal
Once your administrator has connected a VMware vCenter to Azure, represented VMware vCenter resources in Azure, and provided you with permissions on those resources, you'll create a virtual machine.
Prerequisites
An Azure subscription and resource group where you have an Arc VMware VM contributor role.
A resource pool/cluster/host on which you have Arc Private Cloud Resource User Role.
A virtual machine template resource on which you have Arc Private Cloud Resource User Role.
A virtual network resource on which you have Arc Private Cloud Resource User Role.
Follow these steps to create VM in the Azure portal:
From your browser, go to the Azure portal. Navigate to virtual machines browse view. You'll see a unified browse experience for Azure and Arc virtual machines.
Select Add and then select Azure Arc machine from the drop-down.
Select the Subscription and Resource group where you want to deploy the VM.
Provide the Virtual machine name and then select a Custom location that your administrator has shared with you.
If multiple kinds of VMs are supported, select VMware from the Virtual machine kind drop-down.
Select the Resource pool/cluster/host into which the VM should be deployed.
Select the datastore that you want to use for storage.
Select the Template based on which you'll create the VM.
युक्ति
You can override the template defaults for CPU Cores and Memory.
If you selected a Windows template, provide a Username, Password for the Administrator account.
(Optional) Change the disks configured in the template. For example, you can add more disks or update existing disks. All the disks and VM will be on the datastore selected in step 6.
(Optional) Change the network interfaces configured in the template. For example, you can add network interface (NIC) cards or update existing NICs. You can also change the network to which this NIC will be attached, provided you have appropriate permissions to the network resource.
(Optional) Add tags to the VM resource if necessary.
Select Create after reviewing all the properties. It should take a few minutes to create the VM.
This article describes how to provision a VM using vCenter resources using a Bicep template.
Create an Arc VMware machine using Bicep template
The following bicep template can be used to create an Arc VMware machine. Here is the list of available Azure Resource Manager (ARM), Bicep, and Terraform templates for Arc-enabled VMware resources. To trigger any other Arc operation, convert the corresponding ARM template to Bicep template.
This article describes how to provision a VM using vCenter resources using a Terraform template.
Create an Arc VMware machine with Terraform
Prerequisites
Azure Subscription: Ensure you have an active Azure subscription.
Terraform: Install Terraform on your machine.
Azure CLI: Install Azure CLI to authenticate and manage resources.
Follow these steps to create an Arc VMware machine using Terraform. The following two scenarios are covered in this article:
For VMs discovered in vCenter inventory, perform enable in Azure operation and install Arc agents.
Create a new Arc VMware VM using templates, Resource pool, Datastore and install Arc agents.
Scenario 1
For VMs discovered in vCenter inventory, perform enable in Azure operation and install Arc agents.
Step 1: Define variables in a variables.tf file
Create a file named variables.tf and define all the necessary variables.
Terraform
variable"subscription_id" {
description = "The subscription ID for the Azure account."
type = string
}
variable"resource_group_name" {
description = "The name of the resource group."
type = string
}
variable"location" {
description = "The location/region where the resources will be created."
type = string
}
variable"machine_name" {
description = "The name of the machine."
type = string
}
variable"inventory_item_id" {
description = "The ID of the Inventory Item for the VM."
type = string
}
variable"custom_location_id" {
description = "The ID of the custom location."
type = string
}
variable"vm_username" {
description = "The admin username for the VM."
type = string
}
variable"vm_password" {
description = "The admin password for the VM."
type = string
}
variable"resource_group_name" {
description = "The name of the resource group."
type = string
}
variable"location" {
description = "The location/region where the resources will be created."
type = string
}
variable"machine_name" {
description = "The name of the machine."
type = string
}
variable"vm_username" {
description = "The admin username for the VM."
type = string
}
variable"vm_password" {
description = "The admin password for the VM."
type = string
}
variable"inventory_id" {
description = "The Inventory ID for the VM."
type = string
}
variable"vcenter_id" {
description = "The ID of the vCenter."
type = string
}
variable"custom_location_id" {
description = "The ID of the custom location."
type = string
}
Step 2: Create a tfvars file
Create a file named CreateVMwareVM.tfvars and provide sample values for the variables.
Terraform
subscription_id = "your-subscription-id"
resource_group_name = "your-resource-group"
location = "eastus"
machine_name = "test_machine0001"
inventory_item_id = "/subscriptions/your-subscription-id/resourceGroups/your-resource-group/providers/Microsoft.ConnectedVMwarevSphere/VCenters/your-vcenter-id/InventoryItems/your-inventory-item-id"
custom_location_id = "/subscriptions/your-subscription-id/resourceGroups/your-resource-group/providers/Microsoft.ExtendedLocation/customLocations/your-custom-location-id"
vm_username = "Administrator"
vm_password = " The admin password for the VM "
Step 3: Modify the configuration to use variables
Create a file named main.tf and insert the following code.
Terraform
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 3.0"
}
azapi = {
source = "azure/azapi"
version = ">= 1.0.0"
}
}
}
# Configure the AzureRM provider with the subscription IDprovider"azurerm" {
features {}
subscription_id = var.subscription_id
}
# Configure the AzAPI provider with the subscription IDprovider"azapi" {
subscription_id = var.subscription_id
}
# Retrieve the resource group detailsdata"azurerm_resource_group""example" {
name = var.resource_group_name
}
# Create a VMware machine resource in Azureresource"azapi_resource""test_machine0001" {
schema_validation_enabled = false
parent_id = data.azurerm_resource_group.example.id
type = "Microsoft.HybridCompute/machines@2023-06-20-preview"
name = var.machine_name
location = data.azurerm_resource_group.example.location
body = jsonencode({
kind = "VMware"
identity = {
type = "SystemAssigned"
}
})
}
# Create a Virtual Machine instance using the VMware machine and Inventory Item IDresource"azapi_resource""test_inventory_vm0001" {
schema_validation_enabled = false
type = "Microsoft.ConnectedVMwarevSphere/VirtualMachineInstances@2023-10-01"
name = "default"
parent_id = azapi_resource.test_machine0001.id
body = jsonencode({
properties = {
infrastructureProfile = {
inventoryItemId = var.inventory_item_id
}
}
extendedLocation = {
type = "CustomLocation"
name = var.custom_location_id
}
})
depends_on = [azapi_resource.test_machine0001]
}
# Install Arc agent on the VMresource"azapi_resource""guestAgent" {
type = "Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/guestAgents@2023-10-01"
parent_id = azapi_resource.test_inventory_vm0001.id
name = "default"
body = jsonencode({
properties = {
credentials = {
username = var.vm_username
password = var.vm_password
}
provisioningAction = "install"
}
})
schema_validation_enabled = false
ignore_missing_property = false
depends_on = [azapi_resource.test_inventory_vm0001]
}
Step 4: Run Terraform commands
Use the -var-file flag to pass the .tfvars file during Terraform commands.
Initialize Terraform (if not already initialized):
terraform init
Validate the configuration:
terraform validate -var-file="CreateVMwareVM.tfvars"
Plan the changes:
terraform plan -var-file="CreateVMwareVM.tfvars"
Apply the changes:
terraform apply -var-file="CreateVMwareVM.tfvars"
Confirm the prompt by entering yes to apply the changes.
Best practices
Use version control: Keep your Terraform configuration files under version control (for example, Git) to track changes over time.
Review plans carefully: Always review the output of terraform plan before applying changes to ensure that you understand what changes will be made.
State management: Regularly back up your Terraform state files to avoid data loss.
By following these steps, you can effectively create and manage HCRP and Arc VMware VMs on Azure using Terraform and install guest agents on the created VMs.
Scenario 2
Create a new Arc VMware VM using templates, Resource pool, Datastore and install Arc agents.
Step 1: Define variables in a variables.tf file
Create a file named variables.tf and define all the necessary variables.
Terraform
variable"subscription_id" {
description = "The subscription ID for the Azure account."
type = string
}
variable"resource_group_name" {
description = "The name of the resource group."
type = string
}
variable"location" {
description = "The location/region where the resources will be created."
type = string
}
variable"machine_name" {
description = "The name of the machine."
type = string
}
variable"vm_username" {
description = "The admin username for the VM."
type = string
}
variable"vm_password" {
description = "The admin password for the VM."
type = string
}
variable"template_id" {
description = "The ID of the VM template."
type = string
}
variable"vcenter_id" {
description = "The ID of the vCenter."
type = string
}
variable"resource_pool_id" {
description = "The ID of the resource pool."
type = string
}
variable"datastore_id" {
description = "The ID of the datastore."
type = string
}
variable"custom_location_id" {
description = "The ID of the custom location."
type = string
}
Step 2: Create tfvars file
Create a file named CreateVMwareVM.tfvars and provide sample values for the variables.
Azure HPC HPC & AI वर्कलोड के लिए एक उद्देश्य-निर्मित क्लाउड क्षमता है, जो सर्वोत्तम एप्लिकेशन प्रदर्शन, मापनीयता और मूल्य प्रदान करने के लिए अग्रणी-एज प्रोसेसर और HPC-क्लास InfiniBand इंटरकनेक्ट का उपयोग करता है। Azure HPC उपयोगकर्ताओं को HPC & AI तकनीकों की अत्यधिक उपलब्ध श्रृंखला के माध्यम से नवाचार, उत्पादकता और व्यावसायिक चपलता को अनलॉक करने में सक्षम बनाता है, जिसे आपके व्यवसाय और तकनीकी आवश्यकताओं में परिवर्तन के रूप में गतिशील रूप से आवंटित किया जा सकता है। यह प्रशिक्षण पथ मॉड्यूल की एक श्रृंखला है
Azure Arc-enabled VMware vSphere extends Azure governance and management capabilities to VMware vSphere infrastructure and delivers a consistent management experience across both platforms.