你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Microsoft.ConnectedVMwarevSphere virtualMachineInstances

Bicep 资源定义

可以使用目标操作部署 virtualMachineInstances 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.ConnectedVMwarevSphere/virtualMachineInstances 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.ConnectedVMwarevSphere/virtualMachineInstances@2023-12-01' = {
  scope: resourceSymbolicName or scope
  extendedLocation: {
    name: 'string'
    type: 'string'
  }
  name: 'default'
  properties: {
    hardwareProfile: {
      memorySizeMB: int
      numCoresPerSocket: int
      numCPUs: int
    }
    infrastructureProfile: {
      firmwareType: 'string'
      inventoryItemId: 'string'
      smbiosUuid: 'string'
      templateId: 'string'
      vCenterId: 'string'
    }
    networkProfile: {
      networkInterfaces: [
        {
          deviceKey: int
          ipSettings: {
            allocationMethod: 'string'
            dnsServers: [
              'string'
            ]
            gateway: [
              'string'
            ]
            ipAddress: 'string'
            subnetMask: 'string'
          }
          name: 'string'
          networkId: 'string'
          nicType: 'string'
          powerOnBoot: 'string'
        }
      ]
    }
    osProfile: {
      adminPassword: 'string'
      adminUsername: 'string'
      computerName: 'string'
      guestId: 'string'
      osType: 'string'
      windowsConfiguration: {
        autoLogon: bool
        autoLogonCount: int
        domainName: 'string'
        domainUsername: 'string'
        domainUserPassword: 'string'
        firstLogonCommands: [
          'string'
        ]
        fullName: 'string'
        orgName: 'string'
        productId: 'string'
        timeZone: 'string'
        workGroupName: 'string'
      }
    }
    placementProfile: {
      clusterId: 'string'
      datastoreId: 'string'
      hostId: 'string'
      resourcePoolId: 'string'
    }
    securityProfile: {
      uefiSettings: {
        secureBootEnabled: bool
      }
    }
    storageProfile: {
      disks: [
        {
          controllerKey: int
          deviceKey: int
          deviceName: 'string'
          diskMode: 'string'
          diskSizeGB: int
          diskType: 'string'
          name: 'string'
          unitNumber: int
        }
      ]
    }
  }
}

属性值

ExtendedLocation

名字 描述 价值
名字 扩展位置名称。 字符串
类型 扩展位置类型。 字符串

HardwareProfile

名字 描述 价值
memorySizeMB 获取或设置 VM 的 MB 中的内存大小。 int
numCoresPerSocket 获取或设置 vm 的每个套接字的核心数。 如果未指定,则默认值为 1。 int
numCPU 获取或设置 vm 的 vCPU 数。 int

InfrastructureProfile

名字 描述 价值
firmwareType 固件类型 “bios”
“efi”
inventoryItemId 获取或设置虚拟机的清单项 ID。 字符串
smbiosUuid 获取或设置 VM 的 SMBIOS UUID。 字符串
templateId 获取或设置用于部署虚拟机的模板资源的 ARM ID。 字符串
vCenterId 获取或设置此资源池所在的 vCenter 资源的 ARM ID。 字符串

Microsoft.ConnectedVMwarevSphere/virtualMachineInstances

名字 描述 价值
extendedLocation 获取或设置扩展位置。 ExtendedLocation
名字 资源名称 “default”(必需)
性能 资源属性。 VirtualMachineInstanceProperties (必需)
范围 在与部署范围不同的范围内创建资源时使用。 将此属性设置为资源的符号名称,以应用 扩展资源

NetworkInterface

名字 描述 价值
deviceKey 获取或设置设备密钥值。 int
ipSettings 获取或设置 ipsettings。 NicIPSettings
名字 获取或设置网络接口的名称。 字符串
networkId 获取或设置用于连接虚拟机的网络资源的 ARM ID。 字符串
nicType NIC 类型 “e1000”
“e1000e”
“pcnet32”
“vmxnet”
“vmxnet2”
“vmxnet3”
powerOnBoot 获取或设置启动时电源。 “disabled”
“enabled”

NetworkProfile

名字 描述 价值
networkInterfaces 获取或设置与虚拟机关联的网络接口的列表。 NetworkInterface[]

NicIPSettings

名字 描述 价值
allocationMethod 获取或设置 nic 分配方法。 “dynamic”
“linklayer”
“other”
“random”
“static”
“unset”
dnsServers 获取或设置 dns 服务器。 string[]
网关 获取或设置网关。 string[]
ipAddress 获取或设置 nic 的 IP 地址。 字符串
subnetMask 获取或设置掩码。 字符串

OsProfileForVMInstance

名字 描述 价值
adminPassword 设置管理员密码。 字符串

约束:
敏感值。 以安全参数的形式传入。
adminUsername 获取或设置管理员用户名。 字符串
computerName 获取或设置计算机名称。 字符串
guestId 获取或设置 guestId。 字符串
osType 获取或设置 os 的类型。 “Linux”
“其他”
“Windows”
windowsConfiguration Windows 配置。 WindowsConfiguration

PlacementProfile

名字 描述 价值
clusterId 获取或设置要在其中部署此虚拟机的群集资源的 ARM ID。 字符串
datastoreId 获取或设置将保留虚拟机数据的数据存储资源的 ARM ID。 字符串
hostId 获取或设置此虚拟机将部署的主机资源的 ARM ID。 字符串
resourcePoolId 获取或设置要在其中部署此虚拟机的资源池资源的 ARM ID。 字符串

SecurityProfile

名字 描述 价值
uefiSettings 指定创建虚拟机时使用的安全启动等安全设置。 UefiSettings

StorageProfile

名字 描述 价值
磁盘 获取或设置与虚拟机关联的虚拟磁盘的列表。 VirtualDisk[]

UefiSettings

名字 描述 价值
secureBootEnabled 指定是否应在虚拟机上启用安全启动。 bool

VirtualDisk

名字 描述 价值
controllerKey 获取或设置控制器 ID。 int
deviceKey 获取或设置设备密钥值。 int
deviceName 获取或设置设备名称。 字符串
diskMode 获取或设置磁盘模式。 “independent_nonpersistent”
“independent_persistent”
“persistent”
diskSizeGB 获取或设置磁盘总大小。 int
diskType 获取或设置磁盘支持类型。 “flat”
“pmem”
“rawphysical”
“rawvirtual”
'sesparse'
“稀疏”
“unknown”
名字 获取或设置虚拟磁盘的名称。 字符串
unitNumber 获取或设置控制器上磁盘的单位号。 int

VirtualMachineInstanceProperties

名字 描述 价值
hardwareProfile 硬件属性。 HardwareProfile
infrastructureProfile 获取基础结构配置文件。 InfrastructureProfile
networkProfile 网络属性。 NetworkProfile
osProfile OS 属性。 OsProfileForVMInstance
placementProfile 放置属性。 PlacementProfile
securityProfile 获取安全配置文件。 SecurityProfile
storageProfile 存储属性。 StorageProfile

WindowsConfiguration

名字 描述 价值
autoLogon 设置一个值,该值指示是否启用自动登录。 bool
autoLogonCount 设置自动登录计数。 int
domainName 设置 VM 应加入的域名。 字符串
domainUsername 设置域用户名。 字符串
domainUserPassword 设置域用户密码。 字符串

约束:
敏感值。 以安全参数的形式传入。
firstLogonCommands 设置第一个登录命令 string[]
fullName 设置 VM 所有者的全名。 字符串
orgName 设置 VM 所有者所属的组织名称。 字符串
productId 设置 vm 的产品 ID。 字符串
timeZone 指定虚拟机的时区。 例如“太平洋标准时间”。 时区名称对应于Microsoft时区名称值(/previous-versions/windows/embedded/ms912391(v=winembedded.11)中列出的时区。 字符串
workGroupName 设置 VM 应加入的工作组名称。 字符串

ARM 模板资源定义

可以使用目标操作部署 virtualMachineInstances 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.ConnectedVMwarevSphere/virtualMachineInstances 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.ConnectedVMwarevSphere/virtualMachineInstances",
  "apiVersion": "2023-12-01",
  "name": "string",
  "extendedLocation": {
    "name": "string",
    "type": "string"
  },
  "properties": {
    "hardwareProfile": {
      "memorySizeMB": "int",
      "numCoresPerSocket": "int",
      "numCPUs": "int"
    },
    "infrastructureProfile": {
      "firmwareType": "string",
      "inventoryItemId": "string",
      "smbiosUuid": "string",
      "templateId": "string",
      "vCenterId": "string"
    },
    "networkProfile": {
      "networkInterfaces": [
        {
          "deviceKey": "int",
          "ipSettings": {
            "allocationMethod": "string",
            "dnsServers": [ "string" ],
            "gateway": [ "string" ],
            "ipAddress": "string",
            "subnetMask": "string"
          },
          "name": "string",
          "networkId": "string",
          "nicType": "string",
          "powerOnBoot": "string"
        }
      ]
    },
    "osProfile": {
      "adminPassword": "string",
      "adminUsername": "string",
      "computerName": "string",
      "guestId": "string",
      "osType": "string",
      "windowsConfiguration": {
        "autoLogon": "bool",
        "autoLogonCount": "int",
        "domainName": "string",
        "domainUsername": "string",
        "domainUserPassword": "string",
        "firstLogonCommands": [ "string" ],
        "fullName": "string",
        "orgName": "string",
        "productId": "string",
        "timeZone": "string",
        "workGroupName": "string"
      }
    },
    "placementProfile": {
      "clusterId": "string",
      "datastoreId": "string",
      "hostId": "string",
      "resourcePoolId": "string"
    },
    "securityProfile": {
      "uefiSettings": {
        "secureBootEnabled": "bool"
      }
    },
    "storageProfile": {
      "disks": [
        {
          "controllerKey": "int",
          "deviceKey": "int",
          "deviceName": "string",
          "diskMode": "string",
          "diskSizeGB": "int",
          "diskType": "string",
          "name": "string",
          "unitNumber": "int"
        }
      ]
    }
  }
}

属性值

ExtendedLocation

名字 描述 价值
名字 扩展位置名称。 字符串
类型 扩展位置类型。 字符串

HardwareProfile

名字 描述 价值
memorySizeMB 获取或设置 VM 的 MB 中的内存大小。 int
numCoresPerSocket 获取或设置 vm 的每个套接字的核心数。 如果未指定,则默认值为 1。 int
numCPU 获取或设置 vm 的 vCPU 数。 int

InfrastructureProfile

名字 描述 价值
firmwareType 固件类型 “bios”
“efi”
inventoryItemId 获取或设置虚拟机的清单项 ID。 字符串
smbiosUuid 获取或设置 VM 的 SMBIOS UUID。 字符串
templateId 获取或设置用于部署虚拟机的模板资源的 ARM ID。 字符串
vCenterId 获取或设置此资源池所在的 vCenter 资源的 ARM ID。 字符串

Microsoft.ConnectedVMwarevSphere/virtualMachineInstances

名字 描述 价值
apiVersion API 版本 '2023-12-01'
extendedLocation 获取或设置扩展位置。 ExtendedLocation
名字 资源名称 “default”(必需)
性能 资源属性。 VirtualMachineInstanceProperties (必需)
类型 资源类型 “Microsoft.ConnectedVMwarevSphere/virtualMachineInstances”

NetworkInterface

名字 描述 价值
deviceKey 获取或设置设备密钥值。 int
ipSettings 获取或设置 ipsettings。 NicIPSettings
名字 获取或设置网络接口的名称。 字符串
networkId 获取或设置用于连接虚拟机的网络资源的 ARM ID。 字符串
nicType NIC 类型 “e1000”
“e1000e”
“pcnet32”
“vmxnet”
“vmxnet2”
“vmxnet3”
powerOnBoot 获取或设置启动时电源。 “disabled”
“enabled”

NetworkProfile

名字 描述 价值
networkInterfaces 获取或设置与虚拟机关联的网络接口的列表。 NetworkInterface[]

NicIPSettings

名字 描述 价值
allocationMethod 获取或设置 nic 分配方法。 “dynamic”
“linklayer”
“other”
“random”
“static”
“unset”
dnsServers 获取或设置 dns 服务器。 string[]
网关 获取或设置网关。 string[]
ipAddress 获取或设置 nic 的 IP 地址。 字符串
subnetMask 获取或设置掩码。 字符串

OsProfileForVMInstance

名字 描述 价值
adminPassword 设置管理员密码。 字符串

约束:
敏感值。 以安全参数的形式传入。
adminUsername 获取或设置管理员用户名。 字符串
computerName 获取或设置计算机名称。 字符串
guestId 获取或设置 guestId。 字符串
osType 获取或设置 os 的类型。 “Linux”
“其他”
“Windows”
windowsConfiguration Windows 配置。 WindowsConfiguration

PlacementProfile

名字 描述 价值
clusterId 获取或设置要在其中部署此虚拟机的群集资源的 ARM ID。 字符串
datastoreId 获取或设置将保留虚拟机数据的数据存储资源的 ARM ID。 字符串
hostId 获取或设置此虚拟机将部署的主机资源的 ARM ID。 字符串
resourcePoolId 获取或设置要在其中部署此虚拟机的资源池资源的 ARM ID。 字符串

SecurityProfile

名字 描述 价值
uefiSettings 指定创建虚拟机时使用的安全启动等安全设置。 UefiSettings

StorageProfile

名字 描述 价值
磁盘 获取或设置与虚拟机关联的虚拟磁盘的列表。 VirtualDisk[]

UefiSettings

名字 描述 价值
secureBootEnabled 指定是否应在虚拟机上启用安全启动。 bool

VirtualDisk

名字 描述 价值
controllerKey 获取或设置控制器 ID。 int
deviceKey 获取或设置设备密钥值。 int
deviceName 获取或设置设备名称。 字符串
diskMode 获取或设置磁盘模式。 “independent_nonpersistent”
“independent_persistent”
“persistent”
diskSizeGB 获取或设置磁盘总大小。 int
diskType 获取或设置磁盘支持类型。 “flat”
“pmem”
“rawphysical”
“rawvirtual”
'sesparse'
“稀疏”
“unknown”
名字 获取或设置虚拟磁盘的名称。 字符串
unitNumber 获取或设置控制器上磁盘的单位号。 int

VirtualMachineInstanceProperties

名字 描述 价值
hardwareProfile 硬件属性。 HardwareProfile
infrastructureProfile 获取基础结构配置文件。 InfrastructureProfile
networkProfile 网络属性。 NetworkProfile
osProfile OS 属性。 OsProfileForVMInstance
placementProfile 放置属性。 PlacementProfile
securityProfile 获取安全配置文件。 SecurityProfile
storageProfile 存储属性。 StorageProfile

WindowsConfiguration

名字 描述 价值
autoLogon 设置一个值,该值指示是否启用自动登录。 bool
autoLogonCount 设置自动登录计数。 int
domainName 设置 VM 应加入的域名。 字符串
domainUsername 设置域用户名。 字符串
domainUserPassword 设置域用户密码。 字符串

约束:
敏感值。 以安全参数的形式传入。
firstLogonCommands 设置第一个登录命令 string[]
fullName 设置 VM 所有者的全名。 字符串
orgName 设置 VM 所有者所属的组织名称。 字符串
productId 设置 vm 的产品 ID。 字符串
timeZone 指定虚拟机的时区。 例如“太平洋标准时间”。 时区名称对应于Microsoft时区名称值(/previous-versions/windows/embedded/ms912391(v=winembedded.11)中列出的时区。 字符串
workGroupName 设置 VM 应加入的工作组名称。 字符串

用法示例

Terraform (AzAPI 提供程序)资源定义

可以使用目标操作部署 virtualMachineInstances 资源类型:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.ConnectedVMwarevSphere/virtualMachineInstances 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.ConnectedVMwarevSphere/virtualMachineInstances@2023-12-01"
  name = "string"
  parent_id = "string"
  body = jsonencode({
    extendedLocation = {
      name = "string"
      type = "string"
    }
    properties = {
      hardwareProfile = {
        memorySizeMB = int
        numCoresPerSocket = int
        numCPUs = int
      }
      infrastructureProfile = {
        firmwareType = "string"
        inventoryItemId = "string"
        smbiosUuid = "string"
        templateId = "string"
        vCenterId = "string"
      }
      networkProfile = {
        networkInterfaces = [
          {
            deviceKey = int
            ipSettings = {
              allocationMethod = "string"
              dnsServers = [
                "string"
              ]
              gateway = [
                "string"
              ]
              ipAddress = "string"
              subnetMask = "string"
            }
            name = "string"
            networkId = "string"
            nicType = "string"
            powerOnBoot = "string"
          }
        ]
      }
      osProfile = {
        adminPassword = "string"
        adminUsername = "string"
        computerName = "string"
        guestId = "string"
        osType = "string"
        windowsConfiguration = {
          autoLogon = bool
          autoLogonCount = int
          domainName = "string"
          domainUsername = "string"
          domainUserPassword = "string"
          firstLogonCommands = [
            "string"
          ]
          fullName = "string"
          orgName = "string"
          productId = "string"
          timeZone = "string"
          workGroupName = "string"
        }
      }
      placementProfile = {
        clusterId = "string"
        datastoreId = "string"
        hostId = "string"
        resourcePoolId = "string"
      }
      securityProfile = {
        uefiSettings = {
          secureBootEnabled = bool
        }
      }
      storageProfile = {
        disks = [
          {
            controllerKey = int
            deviceKey = int
            deviceName = "string"
            diskMode = "string"
            diskSizeGB = int
            diskType = "string"
            name = "string"
            unitNumber = int
          }
        ]
      }
    }
  })
}

属性值

ExtendedLocation

名字 描述 价值
名字 扩展位置名称。 字符串
类型 扩展位置类型。 字符串

HardwareProfile

名字 描述 价值
memorySizeMB 获取或设置 VM 的 MB 中的内存大小。 int
numCoresPerSocket 获取或设置 vm 的每个套接字的核心数。 如果未指定,则默认值为 1。 int
numCPU 获取或设置 vm 的 vCPU 数。 int

InfrastructureProfile

名字 描述 价值
firmwareType 固件类型 “bios”
“efi”
inventoryItemId 获取或设置虚拟机的清单项 ID。 字符串
smbiosUuid 获取或设置 VM 的 SMBIOS UUID。 字符串
templateId 获取或设置用于部署虚拟机的模板资源的 ARM ID。 字符串
vCenterId 获取或设置此资源池所在的 vCenter 资源的 ARM ID。 字符串

Microsoft.ConnectedVMwarevSphere/virtualMachineInstances

名字 描述 价值
extendedLocation 获取或设置扩展位置。 ExtendedLocation
名字 资源名称 “default”(必需)
parent_id 要向其应用此扩展资源的资源的 ID。 string (必需)
性能 资源属性。 VirtualMachineInstanceProperties (必需)
类型 资源类型 “Microsoft.ConnectedVMwarevSphere/virtualMachineInstances@2023-12-01”

NetworkInterface

名字 描述 价值
deviceKey 获取或设置设备密钥值。 int
ipSettings 获取或设置 ipsettings。 NicIPSettings
名字 获取或设置网络接口的名称。 字符串
networkId 获取或设置用于连接虚拟机的网络资源的 ARM ID。 字符串
nicType NIC 类型 “e1000”
“e1000e”
“pcnet32”
“vmxnet”
“vmxnet2”
“vmxnet3”
powerOnBoot 获取或设置启动时电源。 “disabled”
“enabled”

NetworkProfile

名字 描述 价值
networkInterfaces 获取或设置与虚拟机关联的网络接口的列表。 NetworkInterface[]

NicIPSettings

名字 描述 价值
allocationMethod 获取或设置 nic 分配方法。 “dynamic”
“linklayer”
“other”
“random”
“static”
“unset”
dnsServers 获取或设置 dns 服务器。 string[]
网关 获取或设置网关。 string[]
ipAddress 获取或设置 nic 的 IP 地址。 字符串
subnetMask 获取或设置掩码。 字符串

OsProfileForVMInstance

名字 描述 价值
adminPassword 设置管理员密码。 字符串

约束:
敏感值。 以安全参数的形式传入。
adminUsername 获取或设置管理员用户名。 字符串
computerName 获取或设置计算机名称。 字符串
guestId 获取或设置 guestId。 字符串
osType 获取或设置 os 的类型。 “Linux”
“其他”
“Windows”
windowsConfiguration Windows 配置。 WindowsConfiguration

PlacementProfile

名字 描述 价值
clusterId 获取或设置要在其中部署此虚拟机的群集资源的 ARM ID。 字符串
datastoreId 获取或设置将保留虚拟机数据的数据存储资源的 ARM ID。 字符串
hostId 获取或设置此虚拟机将部署的主机资源的 ARM ID。 字符串
resourcePoolId 获取或设置要在其中部署此虚拟机的资源池资源的 ARM ID。 字符串

SecurityProfile

名字 描述 价值
uefiSettings 指定创建虚拟机时使用的安全启动等安全设置。 UefiSettings

StorageProfile

名字 描述 价值
磁盘 获取或设置与虚拟机关联的虚拟磁盘的列表。 VirtualDisk[]

UefiSettings

名字 描述 价值
secureBootEnabled 指定是否应在虚拟机上启用安全启动。 bool

VirtualDisk

名字 描述 价值
controllerKey 获取或设置控制器 ID。 int
deviceKey 获取或设置设备密钥值。 int
deviceName 获取或设置设备名称。 字符串
diskMode 获取或设置磁盘模式。 “independent_nonpersistent”
“independent_persistent”
“persistent”
diskSizeGB 获取或设置磁盘总大小。 int
diskType 获取或设置磁盘支持类型。 “flat”
“pmem”
“rawphysical”
“rawvirtual”
'sesparse'
“稀疏”
“unknown”
名字 获取或设置虚拟磁盘的名称。 字符串
unitNumber 获取或设置控制器上磁盘的单位号。 int

VirtualMachineInstanceProperties

名字 描述 价值
hardwareProfile 硬件属性。 HardwareProfile
infrastructureProfile 获取基础结构配置文件。 InfrastructureProfile
networkProfile 网络属性。 NetworkProfile
osProfile OS 属性。 OsProfileForVMInstance
placementProfile 放置属性。 PlacementProfile
securityProfile 获取安全配置文件。 SecurityProfile
storageProfile 存储属性。 StorageProfile

WindowsConfiguration

名字 描述 价值
autoLogon 设置一个值,该值指示是否启用自动登录。 bool
autoLogonCount 设置自动登录计数。 int
domainName 设置 VM 应加入的域名。 字符串
domainUsername 设置域用户名。 字符串
domainUserPassword 设置域用户密码。 字符串

约束:
敏感值。 以安全参数的形式传入。
firstLogonCommands 设置第一个登录命令 string[]
fullName 设置 VM 所有者的全名。 字符串
orgName 设置 VM 所有者所属的组织名称。 字符串
productId 设置 vm 的产品 ID。 字符串
timeZone 指定虚拟机的时区。 例如“太平洋标准时间”。 时区名称对应于Microsoft时区名称值(/previous-versions/windows/embedded/ms912391(v=winembedded.11)中列出的时区。 字符串
workGroupName 设置 VM 应加入的工作组名称。 字符串