vSphere
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:
- Host
System stringId The ID of an optional host system to pin the virtual machine to.
- Name string
Name of the virtual machine to create.
- Resource
Pool stringId The ID of a resource pool to put the virtual machine in.
- Allow
Unverified boolSsl Cert Allow unverified ssl certificates while deploying ovf/ova from url.
- Datastore
Id 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.
- Deployment
Option string The key of the chosen deployment option. If empty, the default option is chosen.
- Disk
Provisioning 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}).
- bool
- Folder string
The name of the folder to locate the virtual machine in.
- Ip
Allocation stringPolicy The IP allocation policy.
- Ip
Protocol string The IP protocol.
- Local
Ovf stringPath 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 Dictionary<string, string>Map The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.
- Remote
Ovf stringUrl URL to the remote ovf/ova file to be deployed.
- Host
System stringId The ID of an optional host system to pin the virtual machine to.
- Name string
Name of the virtual machine to create.
- Resource
Pool stringId The ID of a resource pool to put the virtual machine in.
- Allow
Unverified boolSsl Cert Allow unverified ssl certificates while deploying ovf/ova from url.
- Datastore
Id 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.
- Deployment
Option string The key of the chosen deployment option. If empty, the default option is chosen.
- Disk
Provisioning 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}).
- bool
- Folder string
The name of the folder to locate the virtual machine in.
- Ip
Allocation stringPolicy The IP allocation policy.
- Ip
Protocol string The IP protocol.
- Local
Ovf stringPath 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[string]stringMap The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.
- Remote
Ovf stringUrl URL to the remote ovf/ova file to be deployed.
- host
System StringId The ID of an optional host system to pin the virtual machine to.
- name String
Name of the virtual machine to create.
- resource
Pool StringId The ID of a resource pool to put the virtual machine in.
- allow
Unverified BooleanSsl Cert Allow unverified ssl certificates while deploying ovf/ova from url.
- datastore
Id 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.
- deployment
Option String The key of the chosen deployment option. If empty, the default option is chosen.
- disk
Provisioning 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}).
- Boolean
- folder String
The name of the folder to locate the virtual machine in.
- ip
Allocation StringPolicy The IP allocation policy.
- ip
Protocol String The IP protocol.
- local
Ovf StringPath 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 MapMap The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.
- remote
Ovf StringUrl URL to the remote ovf/ova file to be deployed.
- host
System stringId The ID of an optional host system to pin the virtual machine to.
- name string
Name of the virtual machine to create.
- resource
Pool stringId The ID of a resource pool to put the virtual machine in.
- allow
Unverified booleanSsl Cert Allow unverified ssl certificates while deploying ovf/ova from url.
- datastore
Id 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.
- deployment
Option string The key of the chosen deployment option. If empty, the default option is chosen.
- disk
Provisioning 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}).
- boolean
- folder string
The name of the folder to locate the virtual machine in.
- ip
Allocation stringPolicy The IP allocation policy.
- ip
Protocol string The IP protocol.
- local
Ovf stringPath 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 {[key: string]: string}Map The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.
- remote
Ovf stringUrl URL to the remote ovf/ova file to be deployed.
- host_
system_ strid The ID of an optional host system to pin the virtual machine to.
- name str
Name of the virtual machine to create.
- resource_
pool_ strid The ID of a resource pool to put the virtual machine in.
- allow_
unverified_ boolssl_ cert 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}).
- bool
- folder str
The name of the folder to locate the virtual machine in.
- ip_
allocation_ strpolicy The IP allocation policy.
- ip_
protocol str The IP protocol.
- local_
ovf_ strpath 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_ Mapping[str, str]map The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.
- remote_
ovf_ strurl URL to the remote ovf/ova file to be deployed.
- host
System StringId The ID of an optional host system to pin the virtual machine to.
- name String
Name of the virtual machine to create.
- resource
Pool StringId The ID of a resource pool to put the virtual machine in.
- allow
Unverified BooleanSsl Cert Allow unverified ssl certificates while deploying ovf/ova from url.
- datastore
Id 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.
- deployment
Option String The key of the chosen deployment option. If empty, the default option is chosen.
- disk
Provisioning 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}).
- Boolean
- folder String
The name of the folder to locate the virtual machine in.
- ip
Allocation StringPolicy The IP allocation policy.
- ip
Protocol String The IP protocol.
- local
Ovf StringPath 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 MapMap The mapping of name of network identifiers from the ovf descriptor to network UUID in the VI infrastructure.
- remote
Ovf StringUrl URL to the remote ovf/ova file to be deployed.
getOvfVmTemplate Result
The following output properties are available:
- Alternate
Guest stringName The guest name for the operating system .
- Annotation string
User-provided description of the virtual machine.
- Cpu
Hot boolAdd Enabled Allow CPUs to be added to this virtual machine while it is running.
- Cpu
Hot boolRemove Enabled Allow CPUs to be added to this virtual machine while it is running.
- Cpu
Performance boolCounters Enabled - Firmware string
The firmware interface to use on the virtual machine.
- Guest
Id string The guest ID for the operating system
- Host
System stringId - Id string
The provider-assigned unique ID for this managed resource.
- Ide
Controller intCount - Memory int
The size of the virtual machine's memory, in MB.
- Memory
Hot boolAdd Enabled Allow memory to be added to this virtual machine while it is running.
- Name string
- Nested
Hv boolEnabled Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
- Num
Cores intPer Socket 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 stringId - Sata
Controller intCount - Scsi
Controller intCount - Scsi
Type string - Swap
Placement stringPolicy The swap file placement policy for this virtual machine.
- Allow
Unverified boolSsl Cert - Datastore
Id string - Deployment
Option string - Disk
Provisioning string - bool
- Folder string
- Ip
Allocation stringPolicy - Ip
Protocol string - Local
Ovf stringPath - Ovf
Network Dictionary<string, string>Map - Remote
Ovf stringUrl
- Alternate
Guest stringName The guest name for the operating system .
- Annotation string
User-provided description of the virtual machine.
- Cpu
Hot boolAdd Enabled Allow CPUs to be added to this virtual machine while it is running.
- Cpu
Hot boolRemove Enabled Allow CPUs to be added to this virtual machine while it is running.
- Cpu
Performance boolCounters Enabled - Firmware string
The firmware interface to use on the virtual machine.
- Guest
Id string The guest ID for the operating system
- Host
System stringId - Id string
The provider-assigned unique ID for this managed resource.
- Ide
Controller intCount - Memory int
The size of the virtual machine's memory, in MB.
- Memory
Hot boolAdd Enabled Allow memory to be added to this virtual machine while it is running.
- Name string
- Nested
Hv boolEnabled Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
- Num
Cores intPer Socket 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 stringId - Sata
Controller intCount - Scsi
Controller intCount - Scsi
Type string - Swap
Placement stringPolicy The swap file placement policy for this virtual machine.
- Allow
Unverified boolSsl Cert - Datastore
Id string - Deployment
Option string - Disk
Provisioning string - bool
- Folder string
- Ip
Allocation stringPolicy - Ip
Protocol string - Local
Ovf stringPath - Ovf
Network map[string]stringMap - Remote
Ovf stringUrl
- alternate
Guest StringName The guest name for the operating system .
- annotation String
User-provided description of the virtual machine.
- cpu
Hot BooleanAdd Enabled Allow CPUs to be added to this virtual machine while it is running.
- cpu
Hot BooleanRemove Enabled Allow CPUs to be added to this virtual machine while it is running.
- cpu
Performance BooleanCounters Enabled - firmware String
The firmware interface to use on the virtual machine.
- guest
Id String The guest ID for the operating system
- host
System StringId - id String
The provider-assigned unique ID for this managed resource.
- ide
Controller IntegerCount - memory Integer
The size of the virtual machine's memory, in MB.
- memory
Hot BooleanAdd Enabled Allow memory to be added to this virtual machine while it is running.
- name String
- nested
Hv BooleanEnabled Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
- num
Cores IntegerPer Socket The number of cores to distribute amongst the CPUs in this virtual machine.
- num
Cpus Integer The number of virtual processors to assign to this virtual machine.
- resource
Pool StringId - sata
Controller IntegerCount - scsi
Controller IntegerCount - scsi
Type String - swap
Placement StringPolicy The swap file placement policy for this virtual machine.
- allow
Unverified BooleanSsl Cert - datastore
Id String - deployment
Option String - disk
Provisioning String - Boolean
- folder String
- ip
Allocation StringPolicy - ip
Protocol String - local
Ovf StringPath - ovf
Network MapMap - remote
Ovf StringUrl
- alternate
Guest stringName The guest name for the operating system .
- annotation string
User-provided description of the virtual machine.
- cpu
Hot booleanAdd Enabled Allow CPUs to be added to this virtual machine while it is running.
- cpu
Hot booleanRemove Enabled Allow CPUs to be added to this virtual machine while it is running.
- cpu
Performance booleanCounters Enabled - firmware string
The firmware interface to use on the virtual machine.
- guest
Id string The guest ID for the operating system
- host
System stringId - id string
The provider-assigned unique ID for this managed resource.
- ide
Controller numberCount - memory number
The size of the virtual machine's memory, in MB.
- memory
Hot booleanAdd Enabled Allow memory to be added to this virtual machine while it is running.
- name string
- nested
Hv booleanEnabled Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
- num
Cores numberPer Socket The number of cores to distribute amongst the CPUs in this virtual machine.
- num
Cpus number The number of virtual processors to assign to this virtual machine.
- resource
Pool stringId - sata
Controller numberCount - scsi
Controller numberCount - scsi
Type string - swap
Placement stringPolicy The swap file placement policy for this virtual machine.
- allow
Unverified booleanSsl Cert - datastore
Id string - deployment
Option string - disk
Provisioning string - boolean
- folder string
- ip
Allocation stringPolicy - ip
Protocol string - local
Ovf stringPath - ovf
Network {[key: string]: string}Map - remote
Ovf stringUrl
- alternate_
guest_ strname The guest name for the operating system .
- annotation str
User-provided description of the virtual machine.
- cpu_
hot_ booladd_ enabled Allow CPUs to be added to this virtual machine while it is running.
- cpu_
hot_ boolremove_ enabled Allow CPUs to be added to this virtual machine while it is running.
- cpu_
performance_ boolcounters_ enabled - firmware str
The firmware interface to use on the virtual machine.
- guest_
id str The guest ID for the operating system
- host_
system_ strid - id str
The provider-assigned unique ID for this managed resource.
- ide_
controller_ intcount - memory int
The size of the virtual machine's memory, in MB.
- memory_
hot_ booladd_ enabled Allow memory to be added to this virtual machine while it is running.
- name str
- nested_
hv_ boolenabled Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
- num_
cores_ intper_ socket 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_ strid - sata_
controller_ intcount - scsi_
controller_ intcount - scsi_
type str - swap_
placement_ strpolicy The swap file placement policy for this virtual machine.
- allow_
unverified_ boolssl_ cert - datastore_
id str - deployment_
option str - disk_
provisioning str - bool
- folder str
- ip_
allocation_ strpolicy - ip_
protocol str - local_
ovf_ strpath - ovf_
network_ Mapping[str, str]map - remote_
ovf_ strurl
- alternate
Guest StringName The guest name for the operating system .
- annotation String
User-provided description of the virtual machine.
- cpu
Hot BooleanAdd Enabled Allow CPUs to be added to this virtual machine while it is running.
- cpu
Hot BooleanRemove Enabled Allow CPUs to be added to this virtual machine while it is running.
- cpu
Performance BooleanCounters Enabled - firmware String
The firmware interface to use on the virtual machine.
- guest
Id String The guest ID for the operating system
- host
System StringId - id String
The provider-assigned unique ID for this managed resource.
- ide
Controller NumberCount - memory Number
The size of the virtual machine's memory, in MB.
- memory
Hot BooleanAdd Enabled Allow memory to be added to this virtual machine while it is running.
- name String
- nested
Hv BooleanEnabled Enable nested hardware virtualization on this virtual machine, facilitating nested virtualization in the guest.
- num
Cores NumberPer Socket The number of cores to distribute amongst the CPUs in this virtual machine.
- num
Cpus Number The number of virtual processors to assign to this virtual machine.
- resource
Pool StringId - sata
Controller NumberCount - scsi
Controller NumberCount - scsi
Type String - swap
Placement StringPolicy The swap file placement policy for this virtual machine.
- allow
Unverified BooleanSsl Cert - datastore
Id String - deployment
Option String - disk
Provisioning String - Boolean
- folder String
- ip
Allocation StringPolicy - ip
Protocol String - local
Ovf StringPath - ovf
Network MapMap - remote
Ovf StringUrl
Package Details
- Repository
- https://github.com/pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
vsphere
Terraform Provider.