vSphere

Pulumi Official
Package maintained by Pulumi
v4.1.0 published on Wednesday, Nov 24, 2021 by Pulumi

getOvfVmTemplate

The vsphere.getOvfVmTemplate data source can be used to submit an OVF to vSphere and extract its hardware settings in a form that can be then used as inputs for a vsphere.VirtualMachine resource.

Example Usage

using Pulumi;
using VSphere = Pulumi.VSphere;

class MyStack : Stack
{
    public MyStack()
    {
        var ovf = Output.Create(VSphere.GetOvfVmTemplate.InvokeAsync(new VSphere.GetOvfVmTemplateArgs
        {
            Name = "testOVF",
            ResourcePoolId = vsphere_resource_pool.Rp.Id,
            DatastoreId = data.Vsphere_datastore.Ds.Id,
            HostSystemId = data.Vsphere_host.Hs.Id,
            RemoteOvfUrl = "https://download3.vmware.com/software/vmw-tools/nested-esxi/Nested_ESXi7.0_Appliance_Template_v1.ova",
            OvfNetworkMap = 
            {
                { "Network 1", data.Vsphere_network.Net.Id },
            },
        }));
    }

}

Coming soon!

Coming soon!

import pulumi
import pulumi_vsphere as vsphere

ovf = vsphere.get_ovf_vm_template(name="testOVF",
    resource_pool_id=vsphere_resource_pool["rp"]["id"],
    datastore_id=data["vsphere_datastore"]["ds"]["id"],
    host_system_id=data["vsphere_host"]["hs"]["id"],
    remote_ovf_url="https://download3.vmware.com/software/vmw-tools/nested-esxi/Nested_ESXi7.0_Appliance_Template_v1.ova",
    ovf_network_map={
        "Network 1": data["vsphere_network"]["net"]["id"],
    })
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";

const ovf = vsphere.getOvfVmTemplate({
    name: "testOVF",
    resourcePoolId: vsphere_resource_pool.rp.id,
    datastoreId: data.vsphere_datastore.ds.id,
    hostSystemId: data.vsphere_host.hs.id,
    remoteOvfUrl: "https://download3.vmware.com/software/vmw-tools/nested-esxi/Nested_ESXi7.0_Appliance_Template_v1.ova",
    ovfNetworkMap: {
        "Network 1": data.vsphere_network.net.id,
    },
});

Coming soon!

Using getOvfVmTemplate

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getOvfVmTemplate(args: GetOvfVmTemplateArgs, opts?: InvokeOptions): Promise<GetOvfVmTemplateResult>
function getOvfVmTemplateOutput(args: GetOvfVmTemplateOutputArgs, opts?: InvokeOptions): Output<GetOvfVmTemplateResult>
def get_ovf_vm_template(allow_unverified_ssl_cert: Optional[bool] = None,
                        datastore_id: Optional[str] = None,
                        deployment_option: Optional[str] = None,
                        disk_provisioning: Optional[str] = None,
                        enable_hidden_properties: Optional[bool] = None,
                        folder: Optional[str] = None,
                        host_system_id: Optional[str] = None,
                        ip_allocation_policy: Optional[str] = None,
                        ip_protocol: Optional[str] = None,
                        local_ovf_path: Optional[str] = None,
                        name: Optional[str] = None,
                        ovf_network_map: Optional[Mapping[str, str]] = None,
                        remote_ovf_url: Optional[str] = None,
                        resource_pool_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetOvfVmTemplateResult
def get_ovf_vm_template_output(allow_unverified_ssl_cert: Optional[pulumi.Input[bool]] = None,
                        datastore_id: Optional[pulumi.Input[str]] = None,
                        deployment_option: Optional[pulumi.Input[str]] = None,
                        disk_provisioning: Optional[pulumi.Input[str]] = None,
                        enable_hidden_properties: Optional[pulumi.Input[bool]] = None,
                        folder: Optional[pulumi.Input[str]] = None,
                        host_system_id: Optional[pulumi.Input[str]] = None,
                        ip_allocation_policy: Optional[pulumi.Input[str]] = None,
                        ip_protocol: Optional[pulumi.Input[str]] = None,
                        local_ovf_path: Optional[pulumi.Input[str]] = None,
                        name: Optional[pulumi.Input[str]] = None,
                        ovf_network_map: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                        remote_ovf_url: Optional[pulumi.Input[str]] = None,
                        resource_pool_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetOvfVmTemplateResult]
func GetOvfVmTemplate(ctx *Context, args *GetOvfVmTemplateArgs, opts ...InvokeOption) (*GetOvfVmTemplateResult, error)
func GetOvfVmTemplateOutput(ctx *Context, args *GetOvfVmTemplateOutputArgs, opts ...InvokeOption) GetOvfVmTemplateResultOutput

> Note: This function is named GetOvfVmTemplate in the Go SDK.

public static class GetOvfVmTemplate 
{
    public static Task<GetOvfVmTemplateResult> InvokeAsync(GetOvfVmTemplateArgs args, InvokeOptions? opts = null)
    public static Output<GetOvfVmTemplateResult> Invoke(GetOvfVmTemplateInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetOvfVmTemplateResult> getOvfVmTemplate(GetOvfVmTemplateArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: vsphere:index/getOvfVmTemplate:getOvfVmTemplate
  Arguments:
    # Arguments dictionary

The following arguments are supported:

HostSystemId string

The ID of an optional host system to pin the virtual machine to.

Name string

Name of the virtual machine to create.

ResourcePoolId string

The ID of a resource pool to put the virtual machine in.

AllowUnverifiedSslCert bool

Allow unverified ssl certificates while deploying ovf/ova from url.

DatastoreId string

The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.

DeploymentOption string

The key of the chosen deployment option. If empty, the default option is chosen.

DiskProvisioning string

The disk provisioning. If set, all the disks in the deployed OVF will have the same specified disk type (accepted values {thin, flat, thick, sameAsSource}).

EnableHiddenProperties bool
Folder string

The name of the folder to locate the virtual machine in.

IpAllocationPolicy string

The IP allocation policy.

IpProtocol string

The IP protocol.

LocalOvfPath string

The absolute path to the ovf/ova file in the local system. While deploying from ovf, make sure the other necessary files like the .vmdk files are also in the same directory as the given ovf file.

OvfNetworkMap Dictionary<string, string>

The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.

RemoteOvfUrl string

URL to the remote ovf/ova file to be deployed.

HostSystemId string

The ID of an optional host system to pin the virtual machine to.

Name string

Name of the virtual machine to create.

ResourcePoolId string

The ID of a resource pool to put the virtual machine in.

AllowUnverifiedSslCert bool

Allow unverified ssl certificates while deploying ovf/ova from url.

DatastoreId string

The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.

DeploymentOption string

The key of the chosen deployment option. If empty, the default option is chosen.

DiskProvisioning string

The disk provisioning. If set, all the disks in the deployed OVF will have the same specified disk type (accepted values {thin, flat, thick, sameAsSource}).

EnableHiddenProperties bool
Folder string

The name of the folder to locate the virtual machine in.

IpAllocationPolicy string

The IP allocation policy.

IpProtocol string

The IP protocol.

LocalOvfPath string

The absolute path to the ovf/ova file in the local system. While deploying from ovf, make sure the other necessary files like the .vmdk files are also in the same directory as the given ovf file.

OvfNetworkMap map[string]string

The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.

RemoteOvfUrl string

URL to the remote ovf/ova file to be deployed.

hostSystemId String

The ID of an optional host system to pin the virtual machine to.

name String

Name of the virtual machine to create.

resourcePoolId String

The ID of a resource pool to put the virtual machine in.

allowUnverifiedSslCert Boolean

Allow unverified ssl certificates while deploying ovf/ova from url.

datastoreId String

The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.

deploymentOption String

The key of the chosen deployment option. If empty, the default option is chosen.

diskProvisioning String

The disk provisioning. If set, all the disks in the deployed OVF will have the same specified disk type (accepted values {thin, flat, thick, sameAsSource}).

enableHiddenProperties Boolean
folder String

The name of the folder to locate the virtual machine in.

ipAllocationPolicy String

The IP allocation policy.

ipProtocol String

The IP protocol.

localOvfPath String

The absolute path to the ovf/ova file in the local system. While deploying from ovf, make sure the other necessary files like the .vmdk files are also in the same directory as the given ovf file.

ovfNetworkMap Map

The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.

remoteOvfUrl String

URL to the remote ovf/ova file to be deployed.

hostSystemId string

The ID of an optional host system to pin the virtual machine to.

name string

Name of the virtual machine to create.

resourcePoolId string

The ID of a resource pool to put the virtual machine in.

allowUnverifiedSslCert boolean

Allow unverified ssl certificates while deploying ovf/ova from url.

datastoreId string

The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.

deploymentOption string

The key of the chosen deployment option. If empty, the default option is chosen.

diskProvisioning string

The disk provisioning. If set, all the disks in the deployed OVF will have the same specified disk type (accepted values {thin, flat, thick, sameAsSource}).

enableHiddenProperties boolean
folder string

The name of the folder to locate the virtual machine in.

ipAllocationPolicy string

The IP allocation policy.

ipProtocol string

The IP protocol.

localOvfPath string

The absolute path to the ovf/ova file in the local system. While deploying from ovf, make sure the other necessary files like the .vmdk files are also in the same directory as the given ovf file.

ovfNetworkMap {[key: string]: string}

The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.

remoteOvfUrl string

URL to the remote ovf/ova file to be deployed.

host_system_id str

The ID of an optional host system to pin the virtual machine to.

name str

Name of the virtual machine to create.

resource_pool_id str

The ID of a resource pool to put the virtual machine in.

allow_unverified_ssl_cert bool

Allow unverified ssl certificates while deploying ovf/ova from url.

datastore_id str

The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.

deployment_option str

The key of the chosen deployment option. If empty, the default option is chosen.

disk_provisioning str

The disk provisioning. If set, all the disks in the deployed OVF will have the same specified disk type (accepted values {thin, flat, thick, sameAsSource}).

enable_hidden_properties bool
folder str

The name of the folder to locate the virtual machine in.

ip_allocation_policy str

The IP allocation policy.

ip_protocol str

The IP protocol.

local_ovf_path str

The absolute path to the ovf/ova file in the local system. While deploying from ovf, make sure the other necessary files like the .vmdk files are also in the same directory as the given ovf file.

ovf_network_map Mapping[str, str]

The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.

remote_ovf_url str

URL to the remote ovf/ova file to be deployed.

hostSystemId String

The ID of an optional host system to pin the virtual machine to.

name String

Name of the virtual machine to create.

resourcePoolId String

The ID of a resource pool to put the virtual machine in.

allowUnverifiedSslCert Boolean

Allow unverified ssl certificates while deploying ovf/ova from url.

datastoreId String

The ID of the virtual machine's datastore. The virtual machine configuration is placed here, along with any virtual disks that are created without datastores.

deploymentOption String

The key of the chosen deployment option. If empty, the default option is chosen.

diskProvisioning String

The disk provisioning. If set, all the disks in the deployed OVF will have the same specified disk type (accepted values {thin, flat, thick, sameAsSource}).

enableHiddenProperties Boolean
folder String

The name of the folder to locate the virtual machine in.

ipAllocationPolicy String

The IP allocation policy.

ipProtocol String

The IP protocol.

localOvfPath String

The absolute path to the ovf/ova file in the local system. While deploying from ovf, make sure the other necessary files like the .vmdk files are also in the same directory as the given ovf file.

ovfNetworkMap Map

The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.

remoteOvfUrl String

URL to the remote ovf/ova file to be deployed.

getOvfVmTemplate Result

The following output properties are available:

AlternateGuestName string

The guest name for the operating system .

Annotation string

User-provided description of the virtual machine.

CpuHotAddEnabled bool

Allow CPUs to be added to this virtual machine while it is running.

CpuHotRemoveEnabled bool

Allow CPUs to be added to this virtual machine while it is running.

CpuPerformanceCountersEnabled bool
Firmware string

The firmware interface to use on the virtual machine.

GuestId string

The guest ID for the operating system

HostSystemId string
Id string

The provider-assigned unique ID for this managed resource.

IdeControllerCount int
Memory int

The size of the virtual machine's memory, in MB.

MemoryHotAddEnabled bool

Allow memory to be added to this virtual machine while it is running.

Name string
NestedHvEnabled bool

Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.

NumCoresPerSocket int

The number of cores to distribute amongst the CPUs in this virtual machine.

NumCpus int

The number of virtual processors to assign to this virtual machine.

ResourcePoolId string
SataControllerCount int
ScsiControllerCount int
ScsiType string
SwapPlacementPolicy string

The swap file placement policy for this virtual machine.

AllowUnverifiedSslCert bool
DatastoreId string
DeploymentOption string
DiskProvisioning string
EnableHiddenProperties bool
Folder string
IpAllocationPolicy string
IpProtocol string
LocalOvfPath string
OvfNetworkMap Dictionary<string, string>
RemoteOvfUrl string
AlternateGuestName string

The guest name for the operating system .

Annotation string

User-provided description of the virtual machine.

CpuHotAddEnabled bool

Allow CPUs to be added to this virtual machine while it is running.

CpuHotRemoveEnabled bool

Allow CPUs to be added to this virtual machine while it is running.

CpuPerformanceCountersEnabled bool
Firmware string

The firmware interface to use on the virtual machine.

GuestId string

The guest ID for the operating system

HostSystemId string
Id string

The provider-assigned unique ID for this managed resource.

IdeControllerCount int
Memory int

The size of the virtual machine's memory, in MB.

MemoryHotAddEnabled bool

Allow memory to be added to this virtual machine while it is running.

Name string
NestedHvEnabled bool

Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.

NumCoresPerSocket int

The number of cores to distribute amongst the CPUs in this virtual machine.

NumCpus int

The number of virtual processors to assign to this virtual machine.

ResourcePoolId string
SataControllerCount int
ScsiControllerCount int
ScsiType string
SwapPlacementPolicy string

The swap file placement policy for this virtual machine.

AllowUnverifiedSslCert bool
DatastoreId string
DeploymentOption string
DiskProvisioning string
EnableHiddenProperties bool
Folder string
IpAllocationPolicy string
IpProtocol string
LocalOvfPath string
OvfNetworkMap map[string]string
RemoteOvfUrl string
alternateGuestName String

The guest name for the operating system .

annotation String

User-provided description of the virtual machine.

cpuHotAddEnabled Boolean

Allow CPUs to be added to this virtual machine while it is running.

cpuHotRemoveEnabled Boolean

Allow CPUs to be added to this virtual machine while it is running.

cpuPerformanceCountersEnabled Boolean
firmware String

The firmware interface to use on the virtual machine.

guestId String

The guest ID for the operating system

hostSystemId String
id String

The provider-assigned unique ID for this managed resource.

ideControllerCount Integer
memory Integer

The size of the virtual machine's memory, in MB.

memoryHotAddEnabled Boolean

Allow memory to be added to this virtual machine while it is running.

name String
nestedHvEnabled Boolean

Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.

numCoresPerSocket Integer

The number of cores to distribute amongst the CPUs in this virtual machine.

numCpus Integer

The number of virtual processors to assign to this virtual machine.

resourcePoolId String
sataControllerCount Integer
scsiControllerCount Integer
scsiType String
swapPlacementPolicy String

The swap file placement policy for this virtual machine.

allowUnverifiedSslCert Boolean
datastoreId String
deploymentOption String
diskProvisioning String
enableHiddenProperties Boolean
folder String
ipAllocationPolicy String
ipProtocol String
localOvfPath String
ovfNetworkMap Map
remoteOvfUrl String
alternateGuestName string

The guest name for the operating system .

annotation string

User-provided description of the virtual machine.

cpuHotAddEnabled boolean

Allow CPUs to be added to this virtual machine while it is running.

cpuHotRemoveEnabled boolean

Allow CPUs to be added to this virtual machine while it is running.

cpuPerformanceCountersEnabled boolean
firmware string

The firmware interface to use on the virtual machine.

guestId string

The guest ID for the operating system

hostSystemId string
id string

The provider-assigned unique ID for this managed resource.

ideControllerCount number
memory number

The size of the virtual machine's memory, in MB.

memoryHotAddEnabled boolean

Allow memory to be added to this virtual machine while it is running.

name string
nestedHvEnabled boolean

Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.

numCoresPerSocket number

The number of cores to distribute amongst the CPUs in this virtual machine.

numCpus number

The number of virtual processors to assign to this virtual machine.

resourcePoolId string
sataControllerCount number
scsiControllerCount number
scsiType string
swapPlacementPolicy string

The swap file placement policy for this virtual machine.

allowUnverifiedSslCert boolean
datastoreId string
deploymentOption string
diskProvisioning string
enableHiddenProperties boolean
folder string
ipAllocationPolicy string
ipProtocol string
localOvfPath string
ovfNetworkMap {[key: string]: string}
remoteOvfUrl string
alternate_guest_name str

The guest name for the operating system .

annotation str

User-provided description of the virtual machine.

cpu_hot_add_enabled bool

Allow CPUs to be added to this virtual machine while it is running.

cpu_hot_remove_enabled bool

Allow CPUs to be added to this virtual machine while it is running.

cpu_performance_counters_enabled bool
firmware str

The firmware interface to use on the virtual machine.

guest_id str

The guest ID for the operating system

host_system_id str
id str

The provider-assigned unique ID for this managed resource.

ide_controller_count int
memory int

The size of the virtual machine's memory, in MB.

memory_hot_add_enabled bool

Allow memory to be added to this virtual machine while it is running.

name str
nested_hv_enabled bool

Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.

num_cores_per_socket int

The number of cores to distribute amongst the CPUs in this virtual machine.

num_cpus int

The number of virtual processors to assign to this virtual machine.

resource_pool_id str
sata_controller_count int
scsi_controller_count int
scsi_type str
swap_placement_policy str

The swap file placement policy for this virtual machine.

allow_unverified_ssl_cert bool
datastore_id str
deployment_option str
disk_provisioning str
enable_hidden_properties bool
folder str
ip_allocation_policy str
ip_protocol str
local_ovf_path str
ovf_network_map Mapping[str, str]
remote_ovf_url str
alternateGuestName String

The guest name for the operating system .

annotation String

User-provided description of the virtual machine.

cpuHotAddEnabled Boolean

Allow CPUs to be added to this virtual machine while it is running.

cpuHotRemoveEnabled Boolean

Allow CPUs to be added to this virtual machine while it is running.

cpuPerformanceCountersEnabled Boolean
firmware String

The firmware interface to use on the virtual machine.

guestId String

The guest ID for the operating system

hostSystemId String
id String

The provider-assigned unique ID for this managed resource.

ideControllerCount Number
memory Number

The size of the virtual machine's memory, in MB.

memoryHotAddEnabled Boolean

Allow memory to be added to this virtual machine while it is running.

name String
nestedHvEnabled Boolean

Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.

numCoresPerSocket Number

The number of cores to distribute amongst the CPUs in this virtual machine.

numCpus Number

The number of virtual processors to assign to this virtual machine.

resourcePoolId String
sataControllerCount Number
scsiControllerCount Number
scsiType String
swapPlacementPolicy String

The swap file placement policy for this virtual machine.

allowUnverifiedSslCert Boolean
datastoreId String
deploymentOption String
diskProvisioning String
enableHiddenProperties Boolean
folder String
ipAllocationPolicy String
ipProtocol String
localOvfPath String
ovfNetworkMap Map
remoteOvfUrl String

Package Details

Repository
https://github.com/pulumi/pulumi-vsphere
License
Apache-2.0
Notes

This Pulumi package is based on the vsphere Terraform Provider.