1. Packages
  2. Xen Orchestra
  3. API Docs
  4. getXoaVdi
Viewing docs for xenorchestra v2.4.0
published on Thursday, Feb 26, 2026 by Vates
xenorchestra logo
Viewing docs for xenorchestra v2.4.0
published on Thursday, Feb 26, 2026 by Vates

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as xenorchestra from "@vates/pulumi-xenorchestra";
    
    const vdi = xenorchestra.getXoaVdi({
        nameLabel: "ubuntu-20.04.4-live-server-amd64.iso",
    });
    const demo_vm = new xenorchestra.Vm("demo-vm", {cdrom: vdi.then(vdi => vdi.id)});
    
    import pulumi
    import pulumi_xenorchestra as xenorchestra
    
    vdi = xenorchestra.get_xoa_vdi(name_label="ubuntu-20.04.4-live-server-amd64.iso")
    demo_vm = xenorchestra.Vm("demo-vm", cdrom=vdi.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/vatesfr/pulumi-xenorchestra/sdk/v2/go/xenorchestra"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		vdi, err := xenorchestra.GetXoaVdi(ctx, &xenorchestra.GetXoaVdiArgs{
    			NameLabel: pulumi.StringRef("ubuntu-20.04.4-live-server-amd64.iso"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = xenorchestra.NewVm(ctx, "demo-vm", &xenorchestra.VmArgs{
    			Cdrom: pulumi.String(vdi.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Xenorchestra = Pulumi.Xenorchestra;
    
    return await Deployment.RunAsync(() => 
    {
        var vdi = Xenorchestra.GetXoaVdi.Invoke(new()
        {
            NameLabel = "ubuntu-20.04.4-live-server-amd64.iso",
        });
    
        var demo_vm = new Xenorchestra.Vm("demo-vm", new()
        {
            Cdrom = vdi.Apply(getXoaVdiResult => getXoaVdiResult.Id),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.xenorchestra.XenorchestraFunctions;
    import com.pulumi.xenorchestra.inputs.GetXoaVdiArgs;
    import com.pulumi.xenorchestra.Vm;
    import com.pulumi.xenorchestra.VmArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var vdi = XenorchestraFunctions.getXoaVdi(GetXoaVdiArgs.builder()
                .nameLabel("ubuntu-20.04.4-live-server-amd64.iso")
                .build());
    
            var demo_vm = new Vm("demo-vm", VmArgs.builder()
                .cdrom(vdi.id())
                .build());
    
        }
    }
    
    resources:
      demo-vm:
        type: xenorchestra:Vm
        properties:
          cdrom: ${vdi.id}
    variables:
      vdi:
        fn::invoke:
          function: xenorchestra:getXoaVdi
          arguments:
            nameLabel: ubuntu-20.04.4-live-server-amd64.iso
    

    Using getXoaVdi

    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 getXoaVdi(args: GetXoaVdiArgs, opts?: InvokeOptions): Promise<GetXoaVdiResult>
    function getXoaVdiOutput(args: GetXoaVdiOutputArgs, opts?: InvokeOptions): Output<GetXoaVdiResult>
    def get_xoa_vdi(id: Optional[str] = None,
                    name_label: Optional[str] = None,
                    pool_id: Optional[str] = None,
                    tags: Optional[Sequence[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> GetXoaVdiResult
    def get_xoa_vdi_output(id: Optional[pulumi.Input[str]] = None,
                    name_label: Optional[pulumi.Input[str]] = None,
                    pool_id: Optional[pulumi.Input[str]] = None,
                    tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetXoaVdiResult]
    func GetXoaVdi(ctx *Context, args *GetXoaVdiArgs, opts ...InvokeOption) (*GetXoaVdiResult, error)
    func GetXoaVdiOutput(ctx *Context, args *GetXoaVdiOutputArgs, opts ...InvokeOption) GetXoaVdiResultOutput

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

    public static class GetXoaVdi 
    {
        public static Task<GetXoaVdiResult> InvokeAsync(GetXoaVdiArgs args, InvokeOptions? opts = null)
        public static Output<GetXoaVdiResult> Invoke(GetXoaVdiInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetXoaVdiResult> getXoaVdi(GetXoaVdiArgs args, InvokeOptions options)
    public static Output<GetXoaVdiResult> getXoaVdi(GetXoaVdiArgs args, InvokeOptions options)
    
    fn::invoke:
      function: xenorchestra:index/getXoaVdi:getXoaVdi
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The ID of the VDI.
    NameLabel string
    The name of the VDI to look up.
    PoolId string
    The ID of the pool the VDI belongs to. This is useful if you have a VDI with the same name on different pools.
    Tags List<string>
    The tags (labels) applied to the given entity. Not used for filtering if empty.
    Id string
    The ID of the VDI.
    NameLabel string
    The name of the VDI to look up.
    PoolId string
    The ID of the pool the VDI belongs to. This is useful if you have a VDI with the same name on different pools.
    Tags []string
    The tags (labels) applied to the given entity. Not used for filtering if empty.
    id String
    The ID of the VDI.
    nameLabel String
    The name of the VDI to look up.
    poolId String
    The ID of the pool the VDI belongs to. This is useful if you have a VDI with the same name on different pools.
    tags List<String>
    The tags (labels) applied to the given entity. Not used for filtering if empty.
    id string
    The ID of the VDI.
    nameLabel string
    The name of the VDI to look up.
    poolId string
    The ID of the pool the VDI belongs to. This is useful if you have a VDI with the same name on different pools.
    tags string[]
    The tags (labels) applied to the given entity. Not used for filtering if empty.
    id str
    The ID of the VDI.
    name_label str
    The name of the VDI to look up.
    pool_id str
    The ID of the pool the VDI belongs to. This is useful if you have a VDI with the same name on different pools.
    tags Sequence[str]
    The tags (labels) applied to the given entity. Not used for filtering if empty.
    id String
    The ID of the VDI.
    nameLabel String
    The name of the VDI to look up.
    poolId String
    The ID of the pool the VDI belongs to. This is useful if you have a VDI with the same name on different pools.
    tags List<String>
    The tags (labels) applied to the given entity. Not used for filtering if empty.

    getXoaVdi Result

    The following output properties are available:

    Id string
    The ID of the VDI.
    Parent string
    The ID of the parent VDI if one exists. An example of when a VDI will have a parent is when it was created from a VM fast clone.
    NameLabel string
    The name of the VDI to look up.
    PoolId string
    The ID of the pool the VDI belongs to. This is useful if you have a VDI with the same name on different pools.
    Tags List<string>
    The tags (labels) applied to the given entity. Not used for filtering if empty.
    Id string
    The ID of the VDI.
    Parent string
    The ID of the parent VDI if one exists. An example of when a VDI will have a parent is when it was created from a VM fast clone.
    NameLabel string
    The name of the VDI to look up.
    PoolId string
    The ID of the pool the VDI belongs to. This is useful if you have a VDI with the same name on different pools.
    Tags []string
    The tags (labels) applied to the given entity. Not used for filtering if empty.
    id String
    The ID of the VDI.
    parent String
    The ID of the parent VDI if one exists. An example of when a VDI will have a parent is when it was created from a VM fast clone.
    nameLabel String
    The name of the VDI to look up.
    poolId String
    The ID of the pool the VDI belongs to. This is useful if you have a VDI with the same name on different pools.
    tags List<String>
    The tags (labels) applied to the given entity. Not used for filtering if empty.
    id string
    The ID of the VDI.
    parent string
    The ID of the parent VDI if one exists. An example of when a VDI will have a parent is when it was created from a VM fast clone.
    nameLabel string
    The name of the VDI to look up.
    poolId string
    The ID of the pool the VDI belongs to. This is useful if you have a VDI with the same name on different pools.
    tags string[]
    The tags (labels) applied to the given entity. Not used for filtering if empty.
    id str
    The ID of the VDI.
    parent str
    The ID of the parent VDI if one exists. An example of when a VDI will have a parent is when it was created from a VM fast clone.
    name_label str
    The name of the VDI to look up.
    pool_id str
    The ID of the pool the VDI belongs to. This is useful if you have a VDI with the same name on different pools.
    tags Sequence[str]
    The tags (labels) applied to the given entity. Not used for filtering if empty.
    id String
    The ID of the VDI.
    parent String
    The ID of the parent VDI if one exists. An example of when a VDI will have a parent is when it was created from a VM fast clone.
    nameLabel String
    The name of the VDI to look up.
    poolId String
    The ID of the pool the VDI belongs to. This is useful if you have a VDI with the same name on different pools.
    tags List<String>
    The tags (labels) applied to the given entity. Not used for filtering if empty.

    Package Details

    Repository
    xenorchestra vatesfr/pulumi-xenorchestra
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the xenorchestra Terraform Provider.
    xenorchestra logo
    Viewing docs for xenorchestra v2.4.0
    published on Thursday, Feb 26, 2026 by Vates
      Try Pulumi Cloud free. Your team will thank you.