1. Packages
  2. Packages
  3. Proxmox Virtual Environment (Proxmox VE)
  4. API Docs
  5. getVmLegacy
Viewing docs for Proxmox Virtual Environment (Proxmox VE) v8.1.0
published on Sunday, Apr 26, 2026 by Daniel Muehlbachler-Pietrzykowski
proxmoxve logo
Viewing docs for Proxmox Virtual Environment (Proxmox VE) v8.1.0
published on Sunday, Apr 26, 2026 by Daniel Muehlbachler-Pietrzykowski

    Deprecated: Use proxmoxve.Vm instead. This data source will be removed in v1.0.

    Retrieves information about a specific VM.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as proxmoxve from "@muhlba91/pulumi-proxmoxve";
    
    const testVm = proxmoxve.getVmLegacy({
        nodeName: "test",
        vmId: 100,
    });
    
    import pulumi
    import pulumi_proxmoxve as proxmoxve
    
    test_vm = proxmoxve.get_vm_legacy(node_name="test",
        vm_id=100)
    
    package main
    
    import (
    	"github.com/muhlba91/pulumi-proxmoxve/sdk/v8/go/proxmoxve"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := proxmoxve.GetVmLegacy(ctx, &proxmoxve.LookupVmLegacyArgs{
    			NodeName: "test",
    			VmId:     100,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using ProxmoxVE = Pulumi.ProxmoxVE;
    
    return await Deployment.RunAsync(() => 
    {
        var testVm = ProxmoxVE.Index.GetVmLegacy.Invoke(new()
        {
            NodeName = "test",
            VmId = %!v(PANIC=Format method: fatal: A failure has occurred: unexpected literal type in GenLiteralValueExpression: cty.NumberIntVal(100) (example.pp:2,14-17)),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.proxmoxve.ProxmoxveFunctions;
    import com.pulumi.proxmoxve.inputs.GetVmLegacyArgs;
    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 testVm = ProxmoxveFunctions.getVmLegacy(GetVmLegacyArgs.builder()
                .nodeName("test")
                .vmId(%!v(PANIC=Format method: fatal: A failure has occurred: unexpected literal type in GenLiteralValueExpression: cty.NumberIntVal(100) (example.pp:2,14-17)))
                .build());
    
        }
    }
    
    variables:
      testVm:
        fn::invoke:
          function: proxmoxve:getVmLegacy
          arguments:
            nodeName: test
            vmId: 100
    

    Using getVmLegacy

    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 getVmLegacy(args: GetVmLegacyArgs, opts?: InvokeOptions): Promise<GetVmLegacyResult>
    function getVmLegacyOutput(args: GetVmLegacyOutputArgs, opts?: InvokeOptions): Output<GetVmLegacyResult>
    def get_vm_legacy(node_name: Optional[str] = None,
                      status: Optional[str] = None,
                      template: Optional[bool] = None,
                      vm_id: Optional[int] = None,
                      opts: Optional[InvokeOptions] = None) -> GetVmLegacyResult
    def get_vm_legacy_output(node_name: Optional[pulumi.Input[str]] = None,
                      status: Optional[pulumi.Input[str]] = None,
                      template: Optional[pulumi.Input[bool]] = None,
                      vm_id: Optional[pulumi.Input[int]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetVmLegacyResult]
    func LookupVmLegacy(ctx *Context, args *LookupVmLegacyArgs, opts ...InvokeOption) (*LookupVmLegacyResult, error)
    func LookupVmLegacyOutput(ctx *Context, args *LookupVmLegacyOutputArgs, opts ...InvokeOption) LookupVmLegacyResultOutput

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

    public static class GetVmLegacy 
    {
        public static Task<GetVmLegacyResult> InvokeAsync(GetVmLegacyArgs args, InvokeOptions? opts = null)
        public static Output<GetVmLegacyResult> Invoke(GetVmLegacyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVmLegacyResult> getVmLegacy(GetVmLegacyArgs args, InvokeOptions options)
    public static Output<GetVmLegacyResult> getVmLegacy(GetVmLegacyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: proxmoxve:index/getVmLegacy:getVmLegacy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    NodeName string
    The node name.
    VmId int
    The VM identifier.
    Status string
    The status of the VM.
    Template bool
    Whether the VM is a template.
    NodeName string
    The node name.
    VmId int
    The VM identifier.
    Status string
    The status of the VM.
    Template bool
    Whether the VM is a template.
    nodeName String
    The node name.
    vmId Integer
    The VM identifier.
    status String
    The status of the VM.
    template Boolean
    Whether the VM is a template.
    nodeName string
    The node name.
    vmId number
    The VM identifier.
    status string
    The status of the VM.
    template boolean
    Whether the VM is a template.
    node_name str
    The node name.
    vm_id int
    The VM identifier.
    status str
    The status of the VM.
    template bool
    Whether the VM is a template.
    nodeName String
    The node name.
    vmId Number
    The VM identifier.
    status String
    The status of the VM.
    template Boolean
    Whether the VM is a template.

    getVmLegacy Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The virtual machine name.
    NodeName string
    Tags List<string>
    A list of tags of the VM.
    VmId int
    Status string
    The status of the VM.
    Template bool
    Whether the VM is a template.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The virtual machine name.
    NodeName string
    Tags []string
    A list of tags of the VM.
    VmId int
    Status string
    The status of the VM.
    Template bool
    Whether the VM is a template.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The virtual machine name.
    nodeName String
    tags List<String>
    A list of tags of the VM.
    vmId Integer
    status String
    The status of the VM.
    template Boolean
    Whether the VM is a template.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The virtual machine name.
    nodeName string
    tags string[]
    A list of tags of the VM.
    vmId number
    status string
    The status of the VM.
    template boolean
    Whether the VM is a template.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The virtual machine name.
    node_name str
    tags Sequence[str]
    A list of tags of the VM.
    vm_id int
    status str
    The status of the VM.
    template bool
    Whether the VM is a template.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The virtual machine name.
    nodeName String
    tags List<String>
    A list of tags of the VM.
    vmId Number
    status String
    The status of the VM.
    template Boolean
    Whether the VM is a template.

    Package Details

    Repository
    proxmoxve muhlba91/pulumi-proxmoxve
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the proxmox Terraform Provider.
    proxmoxve logo
    Viewing docs for Proxmox Virtual Environment (Proxmox VE) v8.1.0
    published on Sunday, Apr 26, 2026 by Daniel Muehlbachler-Pietrzykowski
      Try Pulumi Cloud free. Your team will thank you.