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!

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,
    },
});

Using getOvfVmTemplate

function getOvfVmTemplate(args: GetOvfVmTemplateArgs, opts?: InvokeOptions): Promise<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,
                        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
func GetOvfVmTemplate(ctx *Context, args *GetOvfVmTemplateArgs, opts ...InvokeOption) (*GetOvfVmTemplateResult, error)

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

public static class GetOvfVmTemplate {
    public static Task<GetOvfVmTemplateResult> InvokeAsync(GetOvfVmTemplateArgs args, InvokeOptions? opts = null)
}

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}).
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}).
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}).
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}).
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.

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
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
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 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
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
folder str
ip_allocation_policy str
ip_protocol str
local_ovf_path str
ovf_network_map Mapping[str, str]
remote_ovf_url str

Package Details

Repository
https://github.com/pulumi/pulumi-vsphere
License
Apache-2.0
Notes
This Pulumi package is based on the vsphere Terraform Provider.