1. Packages
  2. Opennebula Provider
  3. API Docs
  4. VirtualMachine
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

opennebula.VirtualMachine

Explore with Pulumi AI

opennebula logo
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

    Provides an OpenNebula virtual machine resource.

    This resource allows you to manage virtual machines on your OpenNebula clusters. When applied, a new virtual machine is created. When destroyed, this virtual machine is removed.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opennebula from "@pulumi/opennebula";
    
    const example: opennebula.VirtualMachine[] = [];
    for (const range = {value: 0}; range.value < 2; range.value++) {
        example.push(new opennebula.VirtualMachine(`example-${range.value}`, {
            description: "VM",
            cpu: 1,
            vcpu: 1,
            memory: 1024,
            group: "terraform",
            permissions: "660",
            context: {
                NETWORK: "YES",
                HOSTNAME: "$NAME",
                START_SCRIPT: "yum upgrade",
            },
            graphics: {
                type: "VNC",
                listen: "0.0.0.0",
                keymap: "fr",
            },
            os: {
                arch: "x86_64",
                boot: "disk0",
            },
            disks: [{
                imageId: opennebula_image.example.id,
                size: 10000,
                target: "vda",
                driver: "qcow2",
            }],
            onDiskChange: "RECREATE",
            nics: [{
                model: "virtio",
                networkId: _var.vnetid,
                securityGroups: [opennebula_security_group.example.id],
                dns: "1.1.1.1",
            }],
            vmgroup: {
                vmgroupId: 42,
                role: "vmgroup-role",
            },
            schedRequirements: "FREE_CPU > 60",
            tags: {
                environment: "example",
            },
            templateSections: [{
                name: "example",
                elements: {
                    key1: "value1",
                },
            }],
        }));
    }
    
    import pulumi
    import pulumi_opennebula as opennebula
    
    example = []
    for range in [{"value": i} for i in range(0, 2)]:
        example.append(opennebula.VirtualMachine(f"example-{range['value']}",
            description="VM",
            cpu=1,
            vcpu=1,
            memory=1024,
            group="terraform",
            permissions="660",
            context={
                "NETWORK": "YES",
                "HOSTNAME": "$NAME",
                "START_SCRIPT": "yum upgrade",
            },
            graphics={
                "type": "VNC",
                "listen": "0.0.0.0",
                "keymap": "fr",
            },
            os={
                "arch": "x86_64",
                "boot": "disk0",
            },
            disks=[{
                "image_id": opennebula_image["example"]["id"],
                "size": 10000,
                "target": "vda",
                "driver": "qcow2",
            }],
            on_disk_change="RECREATE",
            nics=[{
                "model": "virtio",
                "network_id": var["vnetid"],
                "security_groups": [opennebula_security_group["example"]["id"]],
                "dns": "1.1.1.1",
            }],
            vmgroup={
                "vmgroup_id": 42,
                "role": "vmgroup-role",
            },
            sched_requirements="FREE_CPU > 60",
            tags={
                "environment": "example",
            },
            template_sections=[{
                "name": "example",
                "elements": {
                    "key1": "value1",
                },
            }]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opennebula/opennebula"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		var example []*opennebula.VirtualMachine
    		for index := 0; index < 2; index++ {
    			key0 := index
    			_ := index
    			__res, err := opennebula.NewVirtualMachine(ctx, fmt.Sprintf("example-%v", key0), &opennebula.VirtualMachineArgs{
    				Description: pulumi.String("VM"),
    				Cpu:         pulumi.Float64(1),
    				Vcpu:        pulumi.Float64(1),
    				Memory:      pulumi.Float64(1024),
    				Group:       pulumi.String("terraform"),
    				Permissions: pulumi.String("660"),
    				Context: pulumi.StringMap{
    					"NETWORK":      pulumi.String("YES"),
    					"HOSTNAME":     pulumi.String("$NAME"),
    					"START_SCRIPT": pulumi.String("yum upgrade"),
    				},
    				Graphics: &opennebula.VirtualMachineGraphicsArgs{
    					Type:   pulumi.String("VNC"),
    					Listen: pulumi.String("0.0.0.0"),
    					Keymap: pulumi.String("fr"),
    				},
    				Os: &opennebula.VirtualMachineOsArgs{
    					Arch: pulumi.String("x86_64"),
    					Boot: pulumi.String("disk0"),
    				},
    				Disks: opennebula.VirtualMachineDiskArray{
    					&opennebula.VirtualMachineDiskArgs{
    						ImageId: pulumi.Any(opennebula_image.Example.Id),
    						Size:    pulumi.Float64(10000),
    						Target:  pulumi.String("vda"),
    						Driver:  pulumi.String("qcow2"),
    					},
    				},
    				OnDiskChange: pulumi.String("RECREATE"),
    				Nics: opennebula.VirtualMachineNicArray{
    					&opennebula.VirtualMachineNicArgs{
    						Model:     pulumi.String("virtio"),
    						NetworkId: pulumi.Any(_var.Vnetid),
    						SecurityGroups: pulumi.Float64Array{
    							opennebula_security_group.Example.Id,
    						},
    						Dns: pulumi.String("1.1.1.1"),
    					},
    				},
    				Vmgroup: &opennebula.VirtualMachineVmgroupArgs{
    					VmgroupId: pulumi.Float64(42),
    					Role:      pulumi.String("vmgroup-role"),
    				},
    				SchedRequirements: pulumi.String("FREE_CPU > 60"),
    				Tags: pulumi.StringMap{
    					"environment": pulumi.String("example"),
    				},
    				TemplateSections: opennebula.VirtualMachineTemplateSectionArray{
    					&opennebula.VirtualMachineTemplateSectionArgs{
    						Name: pulumi.String("example"),
    						Elements: pulumi.StringMap{
    							"key1": pulumi.String("value1"),
    						},
    					},
    				},
    			})
    			if err != nil {
    				return err
    			}
    			example = append(example, __res)
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opennebula = Pulumi.Opennebula;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new List<Opennebula.VirtualMachine>();
        for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
        {
            var range = new { Value = rangeIndex };
            example.Add(new Opennebula.VirtualMachine($"example-{range.Value}", new()
            {
                Description = "VM",
                Cpu = 1,
                Vcpu = 1,
                Memory = 1024,
                Group = "terraform",
                Permissions = "660",
                Context = 
                {
                    { "NETWORK", "YES" },
                    { "HOSTNAME", "$NAME" },
                    { "START_SCRIPT", "yum upgrade" },
                },
                Graphics = new Opennebula.Inputs.VirtualMachineGraphicsArgs
                {
                    Type = "VNC",
                    Listen = "0.0.0.0",
                    Keymap = "fr",
                },
                Os = new Opennebula.Inputs.VirtualMachineOsArgs
                {
                    Arch = "x86_64",
                    Boot = "disk0",
                },
                Disks = new[]
                {
                    new Opennebula.Inputs.VirtualMachineDiskArgs
                    {
                        ImageId = opennebula_image.Example.Id,
                        Size = 10000,
                        Target = "vda",
                        Driver = "qcow2",
                    },
                },
                OnDiskChange = "RECREATE",
                Nics = new[]
                {
                    new Opennebula.Inputs.VirtualMachineNicArgs
                    {
                        Model = "virtio",
                        NetworkId = @var.Vnetid,
                        SecurityGroups = new[]
                        {
                            opennebula_security_group.Example.Id,
                        },
                        Dns = "1.1.1.1",
                    },
                },
                Vmgroup = new Opennebula.Inputs.VirtualMachineVmgroupArgs
                {
                    VmgroupId = 42,
                    Role = "vmgroup-role",
                },
                SchedRequirements = "FREE_CPU > 60",
                Tags = 
                {
                    { "environment", "example" },
                },
                TemplateSections = new[]
                {
                    new Opennebula.Inputs.VirtualMachineTemplateSectionArgs
                    {
                        Name = "example",
                        Elements = 
                        {
                            { "key1", "value1" },
                        },
                    },
                },
            }));
        }
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opennebula.VirtualMachine;
    import com.pulumi.opennebula.VirtualMachineArgs;
    import com.pulumi.opennebula.inputs.VirtualMachineGraphicsArgs;
    import com.pulumi.opennebula.inputs.VirtualMachineOsArgs;
    import com.pulumi.opennebula.inputs.VirtualMachineDiskArgs;
    import com.pulumi.opennebula.inputs.VirtualMachineNicArgs;
    import com.pulumi.opennebula.inputs.VirtualMachineVmgroupArgs;
    import com.pulumi.opennebula.inputs.VirtualMachineTemplateSectionArgs;
    import com.pulumi.codegen.internal.KeyedValue;
    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) {
            for (var i = 0; i < 2; i++) {
                new VirtualMachine("example-" + i, VirtualMachineArgs.builder()
                    .description("VM")
                    .cpu(1)
                    .vcpu(1)
                    .memory(1024)
                    .group("terraform")
                    .permissions("660")
                    .context(Map.ofEntries(
                        Map.entry("NETWORK", "YES"),
                        Map.entry("HOSTNAME", "$NAME"),
                        Map.entry("START_SCRIPT", "yum upgrade")
                    ))
                    .graphics(VirtualMachineGraphicsArgs.builder()
                        .type("VNC")
                        .listen("0.0.0.0")
                        .keymap("fr")
                        .build())
                    .os(VirtualMachineOsArgs.builder()
                        .arch("x86_64")
                        .boot("disk0")
                        .build())
                    .disks(VirtualMachineDiskArgs.builder()
                        .imageId(opennebula_image.example().id())
                        .size(10000)
                        .target("vda")
                        .driver("qcow2")
                        .build())
                    .onDiskChange("RECREATE")
                    .nics(VirtualMachineNicArgs.builder()
                        .model("virtio")
                        .networkId(var_.vnetid())
                        .securityGroups(opennebula_security_group.example().id())
                        .dns("1.1.1.1")
                        .build())
                    .vmgroup(VirtualMachineVmgroupArgs.builder()
                        .vmgroupId(42)
                        .role("vmgroup-role")
                        .build())
                    .schedRequirements("FREE_CPU > 60")
                    .tags(Map.of("environment", "example"))
                    .templateSections(VirtualMachineTemplateSectionArgs.builder()
                        .name("example")
                        .elements(Map.of("key1", "value1"))
                        .build())
                    .build());
    
            
    }
        }
    }
    
    resources:
      example:
        type: opennebula:VirtualMachine
        properties:
          description: VM
          cpu: 1
          vcpu: 1
          memory: 1024
          group: terraform
          permissions: '660'
          context:
            NETWORK: YES
            HOSTNAME: $NAME
            START_SCRIPT: yum upgrade
          graphics:
            type: VNC
            listen: 0.0.0.0
            keymap: fr
          os:
            arch: x86_64
            boot: disk0
          disks:
            - imageId: ${opennebula_image.example.id}
              size: 10000
              target: vda
              driver: qcow2
          onDiskChange: RECREATE
          nics:
            - model: virtio
              networkId: ${var.vnetid}
              securityGroups:
                - ${opennebula_security_group.example.id}
              dns: 1.1.1.1
          vmgroup:
            vmgroupId: 42
            role: vmgroup-role
          schedRequirements: FREE_CPU > 60
          tags:
            environment: example
          templateSections:
            - name: example
              elements:
                key1: value1
        options: {}
    

    Instantiate from a template

    When the attribute template_id is set, here is the behavior:

    For all parameters excepted context: parameters present in VM overrides parameters defined in template. For context: it merges them.

    For disks and NICs defined in the template, if they are not overriden, are described in template_disk and template_nic attributes of the instantiated VM and are not modifiable anymore.

    Create VirtualMachine Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VirtualMachine(name: string, args?: VirtualMachineArgs, opts?: CustomResourceOptions);
    @overload
    def VirtualMachine(resource_name: str,
                       args: Optional[VirtualMachineArgs] = None,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def VirtualMachine(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       context: Optional[Mapping[str, str]] = None,
                       cpu: Optional[float] = None,
                       cpumodel: Optional[VirtualMachineCpumodelArgs] = None,
                       description: Optional[str] = None,
                       disks: Optional[Sequence[VirtualMachineDiskArgs]] = None,
                       graphics: Optional[VirtualMachineGraphicsArgs] = None,
                       group: Optional[str] = None,
                       hard_shutdown: Optional[bool] = None,
                       keep_nic_order: Optional[bool] = None,
                       lock: Optional[str] = None,
                       memory: Optional[float] = None,
                       name: Optional[str] = None,
                       nics: Optional[Sequence[VirtualMachineNicArgs]] = None,
                       on_disk_change: Optional[str] = None,
                       os: Optional[VirtualMachineOsArgs] = None,
                       pending: Optional[bool] = None,
                       permissions: Optional[str] = None,
                       raw: Optional[VirtualMachineRawArgs] = None,
                       sched_ds_requirements: Optional[str] = None,
                       sched_requirements: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None,
                       template_id: Optional[float] = None,
                       template_sections: Optional[Sequence[VirtualMachineTemplateSectionArgs]] = None,
                       timeout: Optional[float] = None,
                       timeouts: Optional[VirtualMachineTimeoutsArgs] = None,
                       vcpu: Optional[float] = None,
                       virtual_machine_id: Optional[str] = None,
                       vmgroup: Optional[VirtualMachineVmgroupArgs] = None)
    func NewVirtualMachine(ctx *Context, name string, args *VirtualMachineArgs, opts ...ResourceOption) (*VirtualMachine, error)
    public VirtualMachine(string name, VirtualMachineArgs? args = null, CustomResourceOptions? opts = null)
    public VirtualMachine(String name, VirtualMachineArgs args)
    public VirtualMachine(String name, VirtualMachineArgs args, CustomResourceOptions options)
    
    type: opennebula:VirtualMachine
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args VirtualMachineArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args VirtualMachineArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args VirtualMachineArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VirtualMachineArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VirtualMachineArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var virtualMachineResource = new Opennebula.VirtualMachine("virtualMachineResource", new()
    {
        Context = 
        {
            { "string", "string" },
        },
        Cpu = 0,
        Cpumodel = new Opennebula.Inputs.VirtualMachineCpumodelArgs
        {
            Model = "string",
        },
        Description = "string",
        Disks = new[]
        {
            new Opennebula.Inputs.VirtualMachineDiskArgs
            {
                Cache = "string",
                ComputedCache = "string",
                ComputedDevPrefix = "string",
                ComputedDiscard = "string",
                ComputedDriver = "string",
                ComputedIo = "string",
                ComputedSize = 0,
                ComputedTarget = "string",
                ComputedVolatileFormat = "string",
                DevPrefix = "string",
                Discard = "string",
                DiskId = 0,
                Driver = "string",
                ImageId = 0,
                Io = "string",
                Size = 0,
                Target = "string",
                VolatileFormat = "string",
                VolatileType = "string",
            },
        },
        Graphics = new Opennebula.Inputs.VirtualMachineGraphicsArgs
        {
            Listen = "string",
            Type = "string",
            Keymap = "string",
            Passwd = "string",
            Port = "string",
            RandomPasswd = false,
        },
        Group = "string",
        HardShutdown = false,
        KeepNicOrder = false,
        Lock = "string",
        Memory = 0,
        Name = "string",
        Nics = new[]
        {
            new Opennebula.Inputs.VirtualMachineNicArgs
            {
                ComputedDns = "string",
                ComputedGateway = "string",
                ComputedIp = "string",
                ComputedMac = "string",
                ComputedMethod = "string",
                ComputedModel = "string",
                ComputedPhysicalDevice = "string",
                ComputedSecurityGroups = new[]
                {
                    0,
                },
                ComputedVirtioQueues = "string",
                Dns = "string",
                Gateway = "string",
                Ip = "string",
                Mac = "string",
                Method = "string",
                Model = "string",
                Network = "string",
                NetworkId = 0,
                NetworkModeAuto = false,
                NicId = 0,
                PhysicalDevice = "string",
                SchedRank = "string",
                SchedRequirements = "string",
                SecurityGroups = new[]
                {
                    0,
                },
                VirtioQueues = "string",
            },
        },
        OnDiskChange = "string",
        Os = new Opennebula.Inputs.VirtualMachineOsArgs
        {
            Arch = "string",
            Boot = "string",
        },
        Pending = false,
        Permissions = "string",
        Raw = new Opennebula.Inputs.VirtualMachineRawArgs
        {
            Data = "string",
            Type = "string",
        },
        SchedDsRequirements = "string",
        SchedRequirements = "string",
        Tags = 
        {
            { "string", "string" },
        },
        TemplateId = 0,
        TemplateSections = new[]
        {
            new Opennebula.Inputs.VirtualMachineTemplateSectionArgs
            {
                Name = "string",
                Elements = 
                {
                    { "string", "string" },
                },
            },
        },
        Timeouts = new Opennebula.Inputs.VirtualMachineTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
        Vcpu = 0,
        VirtualMachineId = "string",
        Vmgroup = new Opennebula.Inputs.VirtualMachineVmgroupArgs
        {
            Role = "string",
            VmgroupId = 0,
        },
    });
    
    example, err := opennebula.NewVirtualMachine(ctx, "virtualMachineResource", &opennebula.VirtualMachineArgs{
    	Context: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Cpu: pulumi.Float64(0),
    	Cpumodel: &opennebula.VirtualMachineCpumodelArgs{
    		Model: pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Disks: opennebula.VirtualMachineDiskArray{
    		&opennebula.VirtualMachineDiskArgs{
    			Cache:                  pulumi.String("string"),
    			ComputedCache:          pulumi.String("string"),
    			ComputedDevPrefix:      pulumi.String("string"),
    			ComputedDiscard:        pulumi.String("string"),
    			ComputedDriver:         pulumi.String("string"),
    			ComputedIo:             pulumi.String("string"),
    			ComputedSize:           pulumi.Float64(0),
    			ComputedTarget:         pulumi.String("string"),
    			ComputedVolatileFormat: pulumi.String("string"),
    			DevPrefix:              pulumi.String("string"),
    			Discard:                pulumi.String("string"),
    			DiskId:                 pulumi.Float64(0),
    			Driver:                 pulumi.String("string"),
    			ImageId:                pulumi.Float64(0),
    			Io:                     pulumi.String("string"),
    			Size:                   pulumi.Float64(0),
    			Target:                 pulumi.String("string"),
    			VolatileFormat:         pulumi.String("string"),
    			VolatileType:           pulumi.String("string"),
    		},
    	},
    	Graphics: &opennebula.VirtualMachineGraphicsArgs{
    		Listen:       pulumi.String("string"),
    		Type:         pulumi.String("string"),
    		Keymap:       pulumi.String("string"),
    		Passwd:       pulumi.String("string"),
    		Port:         pulumi.String("string"),
    		RandomPasswd: pulumi.Bool(false),
    	},
    	Group:        pulumi.String("string"),
    	HardShutdown: pulumi.Bool(false),
    	KeepNicOrder: pulumi.Bool(false),
    	Lock:         pulumi.String("string"),
    	Memory:       pulumi.Float64(0),
    	Name:         pulumi.String("string"),
    	Nics: opennebula.VirtualMachineNicArray{
    		&opennebula.VirtualMachineNicArgs{
    			ComputedDns:            pulumi.String("string"),
    			ComputedGateway:        pulumi.String("string"),
    			ComputedIp:             pulumi.String("string"),
    			ComputedMac:            pulumi.String("string"),
    			ComputedMethod:         pulumi.String("string"),
    			ComputedModel:          pulumi.String("string"),
    			ComputedPhysicalDevice: pulumi.String("string"),
    			ComputedSecurityGroups: pulumi.Float64Array{
    				pulumi.Float64(0),
    			},
    			ComputedVirtioQueues: pulumi.String("string"),
    			Dns:                  pulumi.String("string"),
    			Gateway:              pulumi.String("string"),
    			Ip:                   pulumi.String("string"),
    			Mac:                  pulumi.String("string"),
    			Method:               pulumi.String("string"),
    			Model:                pulumi.String("string"),
    			Network:              pulumi.String("string"),
    			NetworkId:            pulumi.Float64(0),
    			NetworkModeAuto:      pulumi.Bool(false),
    			NicId:                pulumi.Float64(0),
    			PhysicalDevice:       pulumi.String("string"),
    			SchedRank:            pulumi.String("string"),
    			SchedRequirements:    pulumi.String("string"),
    			SecurityGroups: pulumi.Float64Array{
    				pulumi.Float64(0),
    			},
    			VirtioQueues: pulumi.String("string"),
    		},
    	},
    	OnDiskChange: pulumi.String("string"),
    	Os: &opennebula.VirtualMachineOsArgs{
    		Arch: pulumi.String("string"),
    		Boot: pulumi.String("string"),
    	},
    	Pending:     pulumi.Bool(false),
    	Permissions: pulumi.String("string"),
    	Raw: &opennebula.VirtualMachineRawArgs{
    		Data: pulumi.String("string"),
    		Type: pulumi.String("string"),
    	},
    	SchedDsRequirements: pulumi.String("string"),
    	SchedRequirements:   pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	TemplateId: pulumi.Float64(0),
    	TemplateSections: opennebula.VirtualMachineTemplateSectionArray{
    		&opennebula.VirtualMachineTemplateSectionArgs{
    			Name: pulumi.String("string"),
    			Elements: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    		},
    	},
    	Timeouts: &opennebula.VirtualMachineTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    	Vcpu:             pulumi.Float64(0),
    	VirtualMachineId: pulumi.String("string"),
    	Vmgroup: &opennebula.VirtualMachineVmgroupArgs{
    		Role:      pulumi.String("string"),
    		VmgroupId: pulumi.Float64(0),
    	},
    })
    
    var virtualMachineResource = new VirtualMachine("virtualMachineResource", VirtualMachineArgs.builder()
        .context(Map.of("string", "string"))
        .cpu(0)
        .cpumodel(VirtualMachineCpumodelArgs.builder()
            .model("string")
            .build())
        .description("string")
        .disks(VirtualMachineDiskArgs.builder()
            .cache("string")
            .computedCache("string")
            .computedDevPrefix("string")
            .computedDiscard("string")
            .computedDriver("string")
            .computedIo("string")
            .computedSize(0)
            .computedTarget("string")
            .computedVolatileFormat("string")
            .devPrefix("string")
            .discard("string")
            .diskId(0)
            .driver("string")
            .imageId(0)
            .io("string")
            .size(0)
            .target("string")
            .volatileFormat("string")
            .volatileType("string")
            .build())
        .graphics(VirtualMachineGraphicsArgs.builder()
            .listen("string")
            .type("string")
            .keymap("string")
            .passwd("string")
            .port("string")
            .randomPasswd(false)
            .build())
        .group("string")
        .hardShutdown(false)
        .keepNicOrder(false)
        .lock("string")
        .memory(0)
        .name("string")
        .nics(VirtualMachineNicArgs.builder()
            .computedDns("string")
            .computedGateway("string")
            .computedIp("string")
            .computedMac("string")
            .computedMethod("string")
            .computedModel("string")
            .computedPhysicalDevice("string")
            .computedSecurityGroups(0)
            .computedVirtioQueues("string")
            .dns("string")
            .gateway("string")
            .ip("string")
            .mac("string")
            .method("string")
            .model("string")
            .network("string")
            .networkId(0)
            .networkModeAuto(false)
            .nicId(0)
            .physicalDevice("string")
            .schedRank("string")
            .schedRequirements("string")
            .securityGroups(0)
            .virtioQueues("string")
            .build())
        .onDiskChange("string")
        .os(VirtualMachineOsArgs.builder()
            .arch("string")
            .boot("string")
            .build())
        .pending(false)
        .permissions("string")
        .raw(VirtualMachineRawArgs.builder()
            .data("string")
            .type("string")
            .build())
        .schedDsRequirements("string")
        .schedRequirements("string")
        .tags(Map.of("string", "string"))
        .templateId(0)
        .templateSections(VirtualMachineTemplateSectionArgs.builder()
            .name("string")
            .elements(Map.of("string", "string"))
            .build())
        .timeouts(VirtualMachineTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .vcpu(0)
        .virtualMachineId("string")
        .vmgroup(VirtualMachineVmgroupArgs.builder()
            .role("string")
            .vmgroupId(0)
            .build())
        .build());
    
    virtual_machine_resource = opennebula.VirtualMachine("virtualMachineResource",
        context={
            "string": "string",
        },
        cpu=0,
        cpumodel={
            "model": "string",
        },
        description="string",
        disks=[{
            "cache": "string",
            "computed_cache": "string",
            "computed_dev_prefix": "string",
            "computed_discard": "string",
            "computed_driver": "string",
            "computed_io": "string",
            "computed_size": 0,
            "computed_target": "string",
            "computed_volatile_format": "string",
            "dev_prefix": "string",
            "discard": "string",
            "disk_id": 0,
            "driver": "string",
            "image_id": 0,
            "io": "string",
            "size": 0,
            "target": "string",
            "volatile_format": "string",
            "volatile_type": "string",
        }],
        graphics={
            "listen": "string",
            "type": "string",
            "keymap": "string",
            "passwd": "string",
            "port": "string",
            "random_passwd": False,
        },
        group="string",
        hard_shutdown=False,
        keep_nic_order=False,
        lock="string",
        memory=0,
        name="string",
        nics=[{
            "computed_dns": "string",
            "computed_gateway": "string",
            "computed_ip": "string",
            "computed_mac": "string",
            "computed_method": "string",
            "computed_model": "string",
            "computed_physical_device": "string",
            "computed_security_groups": [0],
            "computed_virtio_queues": "string",
            "dns": "string",
            "gateway": "string",
            "ip": "string",
            "mac": "string",
            "method": "string",
            "model": "string",
            "network": "string",
            "network_id": 0,
            "network_mode_auto": False,
            "nic_id": 0,
            "physical_device": "string",
            "sched_rank": "string",
            "sched_requirements": "string",
            "security_groups": [0],
            "virtio_queues": "string",
        }],
        on_disk_change="string",
        os={
            "arch": "string",
            "boot": "string",
        },
        pending=False,
        permissions="string",
        raw={
            "data": "string",
            "type": "string",
        },
        sched_ds_requirements="string",
        sched_requirements="string",
        tags={
            "string": "string",
        },
        template_id=0,
        template_sections=[{
            "name": "string",
            "elements": {
                "string": "string",
            },
        }],
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        },
        vcpu=0,
        virtual_machine_id="string",
        vmgroup={
            "role": "string",
            "vmgroup_id": 0,
        })
    
    const virtualMachineResource = new opennebula.VirtualMachine("virtualMachineResource", {
        context: {
            string: "string",
        },
        cpu: 0,
        cpumodel: {
            model: "string",
        },
        description: "string",
        disks: [{
            cache: "string",
            computedCache: "string",
            computedDevPrefix: "string",
            computedDiscard: "string",
            computedDriver: "string",
            computedIo: "string",
            computedSize: 0,
            computedTarget: "string",
            computedVolatileFormat: "string",
            devPrefix: "string",
            discard: "string",
            diskId: 0,
            driver: "string",
            imageId: 0,
            io: "string",
            size: 0,
            target: "string",
            volatileFormat: "string",
            volatileType: "string",
        }],
        graphics: {
            listen: "string",
            type: "string",
            keymap: "string",
            passwd: "string",
            port: "string",
            randomPasswd: false,
        },
        group: "string",
        hardShutdown: false,
        keepNicOrder: false,
        lock: "string",
        memory: 0,
        name: "string",
        nics: [{
            computedDns: "string",
            computedGateway: "string",
            computedIp: "string",
            computedMac: "string",
            computedMethod: "string",
            computedModel: "string",
            computedPhysicalDevice: "string",
            computedSecurityGroups: [0],
            computedVirtioQueues: "string",
            dns: "string",
            gateway: "string",
            ip: "string",
            mac: "string",
            method: "string",
            model: "string",
            network: "string",
            networkId: 0,
            networkModeAuto: false,
            nicId: 0,
            physicalDevice: "string",
            schedRank: "string",
            schedRequirements: "string",
            securityGroups: [0],
            virtioQueues: "string",
        }],
        onDiskChange: "string",
        os: {
            arch: "string",
            boot: "string",
        },
        pending: false,
        permissions: "string",
        raw: {
            data: "string",
            type: "string",
        },
        schedDsRequirements: "string",
        schedRequirements: "string",
        tags: {
            string: "string",
        },
        templateId: 0,
        templateSections: [{
            name: "string",
            elements: {
                string: "string",
            },
        }],
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
        vcpu: 0,
        virtualMachineId: "string",
        vmgroup: {
            role: "string",
            vmgroupId: 0,
        },
    });
    
    type: opennebula:VirtualMachine
    properties:
        context:
            string: string
        cpu: 0
        cpumodel:
            model: string
        description: string
        disks:
            - cache: string
              computedCache: string
              computedDevPrefix: string
              computedDiscard: string
              computedDriver: string
              computedIo: string
              computedSize: 0
              computedTarget: string
              computedVolatileFormat: string
              devPrefix: string
              discard: string
              diskId: 0
              driver: string
              imageId: 0
              io: string
              size: 0
              target: string
              volatileFormat: string
              volatileType: string
        graphics:
            keymap: string
            listen: string
            passwd: string
            port: string
            randomPasswd: false
            type: string
        group: string
        hardShutdown: false
        keepNicOrder: false
        lock: string
        memory: 0
        name: string
        nics:
            - computedDns: string
              computedGateway: string
              computedIp: string
              computedMac: string
              computedMethod: string
              computedModel: string
              computedPhysicalDevice: string
              computedSecurityGroups:
                - 0
              computedVirtioQueues: string
              dns: string
              gateway: string
              ip: string
              mac: string
              method: string
              model: string
              network: string
              networkId: 0
              networkModeAuto: false
              nicId: 0
              physicalDevice: string
              schedRank: string
              schedRequirements: string
              securityGroups:
                - 0
              virtioQueues: string
        onDiskChange: string
        os:
            arch: string
            boot: string
        pending: false
        permissions: string
        raw:
            data: string
            type: string
        schedDsRequirements: string
        schedRequirements: string
        tags:
            string: string
        templateId: 0
        templateSections:
            - elements:
                string: string
              name: string
        timeouts:
            create: string
            delete: string
            update: string
        vcpu: 0
        virtualMachineId: string
        vmgroup:
            role: string
            vmgroupId: 0
    

    VirtualMachine Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The VirtualMachine resource accepts the following input properties:

    Context Dictionary<string, string>
    Array of free form key=value pairs, rendered and added to the CONTEXT variables for the VM. Recommended to include: NETWORK = "YES" and SET_HOSTNAME = "$NAME". If a template_id is set, see Instantiate from a template for details.
    Cpu double
    Amount of CPU shares assigned to the VM. Mandatory if template_id is not set.
    Cpumodel VirtualMachineCpumodel
    Definition of CPU Model type for the Virtual Machine
    Description string
    The description of the template.
    Disks List<VirtualMachineDisk>
    Can be specified multiple times to attach several disks. See Disk parameters below for details.
    Graphics VirtualMachineGraphics
    See Graphics parameters below for details.
    Group string
    Name of the group which owns the virtual machine. Defaults to the caller primary group.
    HardShutdown bool
    If the VM doesn't have ACPI support, it immediately poweroff/terminate/reboot/undeploy the VM. Defaults to false.
    KeepNicOrder bool
    Indicates if the provider should keep NIC list ordering at update.
    Lock string
    Lock the VM with a specific lock level. Supported values: USE, MANAGE, ADMIN, ALL or UNLOCK.
    Memory double
    Amount of RAM assigned to the VM in MB. Mandatory if template_id is not set.
    Name string
    The name of the virtual machine.
    Nics List<VirtualMachineNic>
    Can be specified multiple times to attach several NICs. See Nic parameters below for details.
    OnDiskChange string
    Select the behavior for changing disk images. Supported values: RECREATE or SWAP (default). RECREATE forces recreation of the vm and SWAP adopts the standard behavior of hot-swapping the disks. NOTE: This property does not affect the behavior of adding new disks.
    Os VirtualMachineOs
    See OS parameters below for details.
    Pending bool
    Pending state during VM creation. Defaults to false.
    Permissions string
    Permissions applied on virtual machine. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    Raw VirtualMachineRaw
    Allow to pass hypervisor level tuning content. See Raw parameters below for details.
    SchedDsRequirements string
    Storage placement requirements to deploy the resource following specific rule.
    SchedRequirements string
    Scheduling requirements to deploy the resource following specific rule.
    Tags Dictionary<string, string>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    TemplateId double
    If set, VM are instantiated from the template ID. See Instantiate from a template for details. Changing this argument triggers a new resource.
    TemplateSections List<VirtualMachineTemplateSection>
    Allow to add a custom vector. See Template section parameters
    Timeout double
    Timeout (in Minutes) for VM availability. Defaults to 3 minutes.

    Deprecated: Deprecated

    Timeouts VirtualMachineTimeouts
    Vcpu double
    Number of virtual CPUs assigned to the virtual machine
    VirtualMachineId string
    ID of the virtual machine.
    Vmgroup VirtualMachineVmgroup
    See VM group parameters below for details. Changing this argument triggers a new resource.
    Context map[string]string
    Array of free form key=value pairs, rendered and added to the CONTEXT variables for the VM. Recommended to include: NETWORK = "YES" and SET_HOSTNAME = "$NAME". If a template_id is set, see Instantiate from a template for details.
    Cpu float64
    Amount of CPU shares assigned to the VM. Mandatory if template_id is not set.
    Cpumodel VirtualMachineCpumodelArgs
    Definition of CPU Model type for the Virtual Machine
    Description string
    The description of the template.
    Disks []VirtualMachineDiskArgs
    Can be specified multiple times to attach several disks. See Disk parameters below for details.
    Graphics VirtualMachineGraphicsArgs
    See Graphics parameters below for details.
    Group string
    Name of the group which owns the virtual machine. Defaults to the caller primary group.
    HardShutdown bool
    If the VM doesn't have ACPI support, it immediately poweroff/terminate/reboot/undeploy the VM. Defaults to false.
    KeepNicOrder bool
    Indicates if the provider should keep NIC list ordering at update.
    Lock string
    Lock the VM with a specific lock level. Supported values: USE, MANAGE, ADMIN, ALL or UNLOCK.
    Memory float64
    Amount of RAM assigned to the VM in MB. Mandatory if template_id is not set.
    Name string
    The name of the virtual machine.
    Nics []VirtualMachineNicArgs
    Can be specified multiple times to attach several NICs. See Nic parameters below for details.
    OnDiskChange string
    Select the behavior for changing disk images. Supported values: RECREATE or SWAP (default). RECREATE forces recreation of the vm and SWAP adopts the standard behavior of hot-swapping the disks. NOTE: This property does not affect the behavior of adding new disks.
    Os VirtualMachineOsArgs
    See OS parameters below for details.
    Pending bool
    Pending state during VM creation. Defaults to false.
    Permissions string
    Permissions applied on virtual machine. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    Raw VirtualMachineRawArgs
    Allow to pass hypervisor level tuning content. See Raw parameters below for details.
    SchedDsRequirements string
    Storage placement requirements to deploy the resource following specific rule.
    SchedRequirements string
    Scheduling requirements to deploy the resource following specific rule.
    Tags map[string]string
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    TemplateId float64
    If set, VM are instantiated from the template ID. See Instantiate from a template for details. Changing this argument triggers a new resource.
    TemplateSections []VirtualMachineTemplateSectionArgs
    Allow to add a custom vector. See Template section parameters
    Timeout float64
    Timeout (in Minutes) for VM availability. Defaults to 3 minutes.

    Deprecated: Deprecated

    Timeouts VirtualMachineTimeoutsArgs
    Vcpu float64
    Number of virtual CPUs assigned to the virtual machine
    VirtualMachineId string
    ID of the virtual machine.
    Vmgroup VirtualMachineVmgroupArgs
    See VM group parameters below for details. Changing this argument triggers a new resource.
    context Map<String,String>
    Array of free form key=value pairs, rendered and added to the CONTEXT variables for the VM. Recommended to include: NETWORK = "YES" and SET_HOSTNAME = "$NAME". If a template_id is set, see Instantiate from a template for details.
    cpu Double
    Amount of CPU shares assigned to the VM. Mandatory if template_id is not set.
    cpumodel VirtualMachineCpumodel
    Definition of CPU Model type for the Virtual Machine
    description String
    The description of the template.
    disks List<VirtualMachineDisk>
    Can be specified multiple times to attach several disks. See Disk parameters below for details.
    graphics VirtualMachineGraphics
    See Graphics parameters below for details.
    group String
    Name of the group which owns the virtual machine. Defaults to the caller primary group.
    hardShutdown Boolean
    If the VM doesn't have ACPI support, it immediately poweroff/terminate/reboot/undeploy the VM. Defaults to false.
    keepNicOrder Boolean
    Indicates if the provider should keep NIC list ordering at update.
    lock String
    Lock the VM with a specific lock level. Supported values: USE, MANAGE, ADMIN, ALL or UNLOCK.
    memory Double
    Amount of RAM assigned to the VM in MB. Mandatory if template_id is not set.
    name String
    The name of the virtual machine.
    nics List<VirtualMachineNic>
    Can be specified multiple times to attach several NICs. See Nic parameters below for details.
    onDiskChange String
    Select the behavior for changing disk images. Supported values: RECREATE or SWAP (default). RECREATE forces recreation of the vm and SWAP adopts the standard behavior of hot-swapping the disks. NOTE: This property does not affect the behavior of adding new disks.
    os VirtualMachineOs
    See OS parameters below for details.
    pending Boolean
    Pending state during VM creation. Defaults to false.
    permissions String
    Permissions applied on virtual machine. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    raw VirtualMachineRaw
    Allow to pass hypervisor level tuning content. See Raw parameters below for details.
    schedDsRequirements String
    Storage placement requirements to deploy the resource following specific rule.
    schedRequirements String
    Scheduling requirements to deploy the resource following specific rule.
    tags Map<String,String>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    templateId Double
    If set, VM are instantiated from the template ID. See Instantiate from a template for details. Changing this argument triggers a new resource.
    templateSections List<VirtualMachineTemplateSection>
    Allow to add a custom vector. See Template section parameters
    timeout Double
    Timeout (in Minutes) for VM availability. Defaults to 3 minutes.

    Deprecated: Deprecated

    timeouts VirtualMachineTimeouts
    vcpu Double
    Number of virtual CPUs assigned to the virtual machine
    virtualMachineId String
    ID of the virtual machine.
    vmgroup VirtualMachineVmgroup
    See VM group parameters below for details. Changing this argument triggers a new resource.
    context {[key: string]: string}
    Array of free form key=value pairs, rendered and added to the CONTEXT variables for the VM. Recommended to include: NETWORK = "YES" and SET_HOSTNAME = "$NAME". If a template_id is set, see Instantiate from a template for details.
    cpu number
    Amount of CPU shares assigned to the VM. Mandatory if template_id is not set.
    cpumodel VirtualMachineCpumodel
    Definition of CPU Model type for the Virtual Machine
    description string
    The description of the template.
    disks VirtualMachineDisk[]
    Can be specified multiple times to attach several disks. See Disk parameters below for details.
    graphics VirtualMachineGraphics
    See Graphics parameters below for details.
    group string
    Name of the group which owns the virtual machine. Defaults to the caller primary group.
    hardShutdown boolean
    If the VM doesn't have ACPI support, it immediately poweroff/terminate/reboot/undeploy the VM. Defaults to false.
    keepNicOrder boolean
    Indicates if the provider should keep NIC list ordering at update.
    lock string
    Lock the VM with a specific lock level. Supported values: USE, MANAGE, ADMIN, ALL or UNLOCK.
    memory number
    Amount of RAM assigned to the VM in MB. Mandatory if template_id is not set.
    name string
    The name of the virtual machine.
    nics VirtualMachineNic[]
    Can be specified multiple times to attach several NICs. See Nic parameters below for details.
    onDiskChange string
    Select the behavior for changing disk images. Supported values: RECREATE or SWAP (default). RECREATE forces recreation of the vm and SWAP adopts the standard behavior of hot-swapping the disks. NOTE: This property does not affect the behavior of adding new disks.
    os VirtualMachineOs
    See OS parameters below for details.
    pending boolean
    Pending state during VM creation. Defaults to false.
    permissions string
    Permissions applied on virtual machine. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    raw VirtualMachineRaw
    Allow to pass hypervisor level tuning content. See Raw parameters below for details.
    schedDsRequirements string
    Storage placement requirements to deploy the resource following specific rule.
    schedRequirements string
    Scheduling requirements to deploy the resource following specific rule.
    tags {[key: string]: string}
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    templateId number
    If set, VM are instantiated from the template ID. See Instantiate from a template for details. Changing this argument triggers a new resource.
    templateSections VirtualMachineTemplateSection[]
    Allow to add a custom vector. See Template section parameters
    timeout number
    Timeout (in Minutes) for VM availability. Defaults to 3 minutes.

    Deprecated: Deprecated

    timeouts VirtualMachineTimeouts
    vcpu number
    Number of virtual CPUs assigned to the virtual machine
    virtualMachineId string
    ID of the virtual machine.
    vmgroup VirtualMachineVmgroup
    See VM group parameters below for details. Changing this argument triggers a new resource.
    context Mapping[str, str]
    Array of free form key=value pairs, rendered and added to the CONTEXT variables for the VM. Recommended to include: NETWORK = "YES" and SET_HOSTNAME = "$NAME". If a template_id is set, see Instantiate from a template for details.
    cpu float
    Amount of CPU shares assigned to the VM. Mandatory if template_id is not set.
    cpumodel VirtualMachineCpumodelArgs
    Definition of CPU Model type for the Virtual Machine
    description str
    The description of the template.
    disks Sequence[VirtualMachineDiskArgs]
    Can be specified multiple times to attach several disks. See Disk parameters below for details.
    graphics VirtualMachineGraphicsArgs
    See Graphics parameters below for details.
    group str
    Name of the group which owns the virtual machine. Defaults to the caller primary group.
    hard_shutdown bool
    If the VM doesn't have ACPI support, it immediately poweroff/terminate/reboot/undeploy the VM. Defaults to false.
    keep_nic_order bool
    Indicates if the provider should keep NIC list ordering at update.
    lock str
    Lock the VM with a specific lock level. Supported values: USE, MANAGE, ADMIN, ALL or UNLOCK.
    memory float
    Amount of RAM assigned to the VM in MB. Mandatory if template_id is not set.
    name str
    The name of the virtual machine.
    nics Sequence[VirtualMachineNicArgs]
    Can be specified multiple times to attach several NICs. See Nic parameters below for details.
    on_disk_change str
    Select the behavior for changing disk images. Supported values: RECREATE or SWAP (default). RECREATE forces recreation of the vm and SWAP adopts the standard behavior of hot-swapping the disks. NOTE: This property does not affect the behavior of adding new disks.
    os VirtualMachineOsArgs
    See OS parameters below for details.
    pending bool
    Pending state during VM creation. Defaults to false.
    permissions str
    Permissions applied on virtual machine. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    raw VirtualMachineRawArgs
    Allow to pass hypervisor level tuning content. See Raw parameters below for details.
    sched_ds_requirements str
    Storage placement requirements to deploy the resource following specific rule.
    sched_requirements str
    Scheduling requirements to deploy the resource following specific rule.
    tags Mapping[str, str]
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    template_id float
    If set, VM are instantiated from the template ID. See Instantiate from a template for details. Changing this argument triggers a new resource.
    template_sections Sequence[VirtualMachineTemplateSectionArgs]
    Allow to add a custom vector. See Template section parameters
    timeout float
    Timeout (in Minutes) for VM availability. Defaults to 3 minutes.

    Deprecated: Deprecated

    timeouts VirtualMachineTimeoutsArgs
    vcpu float
    Number of virtual CPUs assigned to the virtual machine
    virtual_machine_id str
    ID of the virtual machine.
    vmgroup VirtualMachineVmgroupArgs
    See VM group parameters below for details. Changing this argument triggers a new resource.
    context Map<String>
    Array of free form key=value pairs, rendered and added to the CONTEXT variables for the VM. Recommended to include: NETWORK = "YES" and SET_HOSTNAME = "$NAME". If a template_id is set, see Instantiate from a template for details.
    cpu Number
    Amount of CPU shares assigned to the VM. Mandatory if template_id is not set.
    cpumodel Property Map
    Definition of CPU Model type for the Virtual Machine
    description String
    The description of the template.
    disks List<Property Map>
    Can be specified multiple times to attach several disks. See Disk parameters below for details.
    graphics Property Map
    See Graphics parameters below for details.
    group String
    Name of the group which owns the virtual machine. Defaults to the caller primary group.
    hardShutdown Boolean
    If the VM doesn't have ACPI support, it immediately poweroff/terminate/reboot/undeploy the VM. Defaults to false.
    keepNicOrder Boolean
    Indicates if the provider should keep NIC list ordering at update.
    lock String
    Lock the VM with a specific lock level. Supported values: USE, MANAGE, ADMIN, ALL or UNLOCK.
    memory Number
    Amount of RAM assigned to the VM in MB. Mandatory if template_id is not set.
    name String
    The name of the virtual machine.
    nics List<Property Map>
    Can be specified multiple times to attach several NICs. See Nic parameters below for details.
    onDiskChange String
    Select the behavior for changing disk images. Supported values: RECREATE or SWAP (default). RECREATE forces recreation of the vm and SWAP adopts the standard behavior of hot-swapping the disks. NOTE: This property does not affect the behavior of adding new disks.
    os Property Map
    See OS parameters below for details.
    pending Boolean
    Pending state during VM creation. Defaults to false.
    permissions String
    Permissions applied on virtual machine. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    raw Property Map
    Allow to pass hypervisor level tuning content. See Raw parameters below for details.
    schedDsRequirements String
    Storage placement requirements to deploy the resource following specific rule.
    schedRequirements String
    Scheduling requirements to deploy the resource following specific rule.
    tags Map<String>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    templateId Number
    If set, VM are instantiated from the template ID. See Instantiate from a template for details. Changing this argument triggers a new resource.
    templateSections List<Property Map>
    Allow to add a custom vector. See Template section parameters
    timeout Number
    Timeout (in Minutes) for VM availability. Defaults to 3 minutes.

    Deprecated: Deprecated

    timeouts Property Map
    vcpu Number
    Number of virtual CPUs assigned to the virtual machine
    virtualMachineId String
    ID of the virtual machine.
    vmgroup Property Map
    See VM group parameters below for details. Changing this argument triggers a new resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VirtualMachine resource produces the following output properties:

    DefaultTags Dictionary<string, string>
    Default tags defined in the provider configuration.
    Gid double
    Group ID which owns the virtual machine.
    Gname string
    Group Name which owns the virtual machine.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ip string
    Primary IP address assigned by OpenNebula
    Lcmstate double
    LCM State of the virtual machine.
    State double
    State of the virtual machine.
    TagsAll Dictionary<string, string>
    Result of the applied default_tags and then resource tags.
    TemplateDisks List<VirtualMachineTemplateDisk>
    when template_id is used and the template define some disks, this contains the template disks description.
    TemplateNics List<VirtualMachineTemplateNic>
    when template_id is used and the template define some NICs, this contains the template NICs description.
    TemplateSectionNames Dictionary<string, string>
    When template_id was set this keeps the template section names only.
    TemplateTags Dictionary<string, string>
    When template_id was set this keeps the template tags.
    Uid double
    User ID whom owns the virtual machine.
    Uname string
    User Name whom owns the virtual machine.
    DefaultTags map[string]string
    Default tags defined in the provider configuration.
    Gid float64
    Group ID which owns the virtual machine.
    Gname string
    Group Name which owns the virtual machine.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ip string
    Primary IP address assigned by OpenNebula
    Lcmstate float64
    LCM State of the virtual machine.
    State float64
    State of the virtual machine.
    TagsAll map[string]string
    Result of the applied default_tags and then resource tags.
    TemplateDisks []VirtualMachineTemplateDisk
    when template_id is used and the template define some disks, this contains the template disks description.
    TemplateNics []VirtualMachineTemplateNic
    when template_id is used and the template define some NICs, this contains the template NICs description.
    TemplateSectionNames map[string]string
    When template_id was set this keeps the template section names only.
    TemplateTags map[string]string
    When template_id was set this keeps the template tags.
    Uid float64
    User ID whom owns the virtual machine.
    Uname string
    User Name whom owns the virtual machine.
    defaultTags Map<String,String>
    Default tags defined in the provider configuration.
    gid Double
    Group ID which owns the virtual machine.
    gname String
    Group Name which owns the virtual machine.
    id String
    The provider-assigned unique ID for this managed resource.
    ip String
    Primary IP address assigned by OpenNebula
    lcmstate Double
    LCM State of the virtual machine.
    state Double
    State of the virtual machine.
    tagsAll Map<String,String>
    Result of the applied default_tags and then resource tags.
    templateDisks List<VirtualMachineTemplateDisk>
    when template_id is used and the template define some disks, this contains the template disks description.
    templateNics List<VirtualMachineTemplateNic>
    when template_id is used and the template define some NICs, this contains the template NICs description.
    templateSectionNames Map<String,String>
    When template_id was set this keeps the template section names only.
    templateTags Map<String,String>
    When template_id was set this keeps the template tags.
    uid Double
    User ID whom owns the virtual machine.
    uname String
    User Name whom owns the virtual machine.
    defaultTags {[key: string]: string}
    Default tags defined in the provider configuration.
    gid number
    Group ID which owns the virtual machine.
    gname string
    Group Name which owns the virtual machine.
    id string
    The provider-assigned unique ID for this managed resource.
    ip string
    Primary IP address assigned by OpenNebula
    lcmstate number
    LCM State of the virtual machine.
    state number
    State of the virtual machine.
    tagsAll {[key: string]: string}
    Result of the applied default_tags and then resource tags.
    templateDisks VirtualMachineTemplateDisk[]
    when template_id is used and the template define some disks, this contains the template disks description.
    templateNics VirtualMachineTemplateNic[]
    when template_id is used and the template define some NICs, this contains the template NICs description.
    templateSectionNames {[key: string]: string}
    When template_id was set this keeps the template section names only.
    templateTags {[key: string]: string}
    When template_id was set this keeps the template tags.
    uid number
    User ID whom owns the virtual machine.
    uname string
    User Name whom owns the virtual machine.
    default_tags Mapping[str, str]
    Default tags defined in the provider configuration.
    gid float
    Group ID which owns the virtual machine.
    gname str
    Group Name which owns the virtual machine.
    id str
    The provider-assigned unique ID for this managed resource.
    ip str
    Primary IP address assigned by OpenNebula
    lcmstate float
    LCM State of the virtual machine.
    state float
    State of the virtual machine.
    tags_all Mapping[str, str]
    Result of the applied default_tags and then resource tags.
    template_disks Sequence[VirtualMachineTemplateDisk]
    when template_id is used and the template define some disks, this contains the template disks description.
    template_nics Sequence[VirtualMachineTemplateNic]
    when template_id is used and the template define some NICs, this contains the template NICs description.
    template_section_names Mapping[str, str]
    When template_id was set this keeps the template section names only.
    template_tags Mapping[str, str]
    When template_id was set this keeps the template tags.
    uid float
    User ID whom owns the virtual machine.
    uname str
    User Name whom owns the virtual machine.
    defaultTags Map<String>
    Default tags defined in the provider configuration.
    gid Number
    Group ID which owns the virtual machine.
    gname String
    Group Name which owns the virtual machine.
    id String
    The provider-assigned unique ID for this managed resource.
    ip String
    Primary IP address assigned by OpenNebula
    lcmstate Number
    LCM State of the virtual machine.
    state Number
    State of the virtual machine.
    tagsAll Map<String>
    Result of the applied default_tags and then resource tags.
    templateDisks List<Property Map>
    when template_id is used and the template define some disks, this contains the template disks description.
    templateNics List<Property Map>
    when template_id is used and the template define some NICs, this contains the template NICs description.
    templateSectionNames Map<String>
    When template_id was set this keeps the template section names only.
    templateTags Map<String>
    When template_id was set this keeps the template tags.
    uid Number
    User ID whom owns the virtual machine.
    uname String
    User Name whom owns the virtual machine.

    Look up Existing VirtualMachine Resource

    Get an existing VirtualMachine resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: VirtualMachineState, opts?: CustomResourceOptions): VirtualMachine
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            context: Optional[Mapping[str, str]] = None,
            cpu: Optional[float] = None,
            cpumodel: Optional[VirtualMachineCpumodelArgs] = None,
            default_tags: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            disks: Optional[Sequence[VirtualMachineDiskArgs]] = None,
            gid: Optional[float] = None,
            gname: Optional[str] = None,
            graphics: Optional[VirtualMachineGraphicsArgs] = None,
            group: Optional[str] = None,
            hard_shutdown: Optional[bool] = None,
            ip: Optional[str] = None,
            keep_nic_order: Optional[bool] = None,
            lcmstate: Optional[float] = None,
            lock: Optional[str] = None,
            memory: Optional[float] = None,
            name: Optional[str] = None,
            nics: Optional[Sequence[VirtualMachineNicArgs]] = None,
            on_disk_change: Optional[str] = None,
            os: Optional[VirtualMachineOsArgs] = None,
            pending: Optional[bool] = None,
            permissions: Optional[str] = None,
            raw: Optional[VirtualMachineRawArgs] = None,
            sched_ds_requirements: Optional[str] = None,
            sched_requirements: Optional[str] = None,
            state: Optional[float] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            template_disks: Optional[Sequence[VirtualMachineTemplateDiskArgs]] = None,
            template_id: Optional[float] = None,
            template_nics: Optional[Sequence[VirtualMachineTemplateNicArgs]] = None,
            template_section_names: Optional[Mapping[str, str]] = None,
            template_sections: Optional[Sequence[VirtualMachineTemplateSectionArgs]] = None,
            template_tags: Optional[Mapping[str, str]] = None,
            timeout: Optional[float] = None,
            timeouts: Optional[VirtualMachineTimeoutsArgs] = None,
            uid: Optional[float] = None,
            uname: Optional[str] = None,
            vcpu: Optional[float] = None,
            virtual_machine_id: Optional[str] = None,
            vmgroup: Optional[VirtualMachineVmgroupArgs] = None) -> VirtualMachine
    func GetVirtualMachine(ctx *Context, name string, id IDInput, state *VirtualMachineState, opts ...ResourceOption) (*VirtualMachine, error)
    public static VirtualMachine Get(string name, Input<string> id, VirtualMachineState? state, CustomResourceOptions? opts = null)
    public static VirtualMachine get(String name, Output<String> id, VirtualMachineState state, CustomResourceOptions options)
    resources:  _:    type: opennebula:VirtualMachine    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Context Dictionary<string, string>
    Array of free form key=value pairs, rendered and added to the CONTEXT variables for the VM. Recommended to include: NETWORK = "YES" and SET_HOSTNAME = "$NAME". If a template_id is set, see Instantiate from a template for details.
    Cpu double
    Amount of CPU shares assigned to the VM. Mandatory if template_id is not set.
    Cpumodel VirtualMachineCpumodel
    Definition of CPU Model type for the Virtual Machine
    DefaultTags Dictionary<string, string>
    Default tags defined in the provider configuration.
    Description string
    The description of the template.
    Disks List<VirtualMachineDisk>
    Can be specified multiple times to attach several disks. See Disk parameters below for details.
    Gid double
    Group ID which owns the virtual machine.
    Gname string
    Group Name which owns the virtual machine.
    Graphics VirtualMachineGraphics
    See Graphics parameters below for details.
    Group string
    Name of the group which owns the virtual machine. Defaults to the caller primary group.
    HardShutdown bool
    If the VM doesn't have ACPI support, it immediately poweroff/terminate/reboot/undeploy the VM. Defaults to false.
    Ip string
    Primary IP address assigned by OpenNebula
    KeepNicOrder bool
    Indicates if the provider should keep NIC list ordering at update.
    Lcmstate double
    LCM State of the virtual machine.
    Lock string
    Lock the VM with a specific lock level. Supported values: USE, MANAGE, ADMIN, ALL or UNLOCK.
    Memory double
    Amount of RAM assigned to the VM in MB. Mandatory if template_id is not set.
    Name string
    The name of the virtual machine.
    Nics List<VirtualMachineNic>
    Can be specified multiple times to attach several NICs. See Nic parameters below for details.
    OnDiskChange string
    Select the behavior for changing disk images. Supported values: RECREATE or SWAP (default). RECREATE forces recreation of the vm and SWAP adopts the standard behavior of hot-swapping the disks. NOTE: This property does not affect the behavior of adding new disks.
    Os VirtualMachineOs
    See OS parameters below for details.
    Pending bool
    Pending state during VM creation. Defaults to false.
    Permissions string
    Permissions applied on virtual machine. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    Raw VirtualMachineRaw
    Allow to pass hypervisor level tuning content. See Raw parameters below for details.
    SchedDsRequirements string
    Storage placement requirements to deploy the resource following specific rule.
    SchedRequirements string
    Scheduling requirements to deploy the resource following specific rule.
    State double
    State of the virtual machine.
    Tags Dictionary<string, string>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    TagsAll Dictionary<string, string>
    Result of the applied default_tags and then resource tags.
    TemplateDisks List<VirtualMachineTemplateDisk>
    when template_id is used and the template define some disks, this contains the template disks description.
    TemplateId double
    If set, VM are instantiated from the template ID. See Instantiate from a template for details. Changing this argument triggers a new resource.
    TemplateNics List<VirtualMachineTemplateNic>
    when template_id is used and the template define some NICs, this contains the template NICs description.
    TemplateSectionNames Dictionary<string, string>
    When template_id was set this keeps the template section names only.
    TemplateSections List<VirtualMachineTemplateSection>
    Allow to add a custom vector. See Template section parameters
    TemplateTags Dictionary<string, string>
    When template_id was set this keeps the template tags.
    Timeout double
    Timeout (in Minutes) for VM availability. Defaults to 3 minutes.

    Deprecated: Deprecated

    Timeouts VirtualMachineTimeouts
    Uid double
    User ID whom owns the virtual machine.
    Uname string
    User Name whom owns the virtual machine.
    Vcpu double
    Number of virtual CPUs assigned to the virtual machine
    VirtualMachineId string
    ID of the virtual machine.
    Vmgroup VirtualMachineVmgroup
    See VM group parameters below for details. Changing this argument triggers a new resource.
    Context map[string]string
    Array of free form key=value pairs, rendered and added to the CONTEXT variables for the VM. Recommended to include: NETWORK = "YES" and SET_HOSTNAME = "$NAME". If a template_id is set, see Instantiate from a template for details.
    Cpu float64
    Amount of CPU shares assigned to the VM. Mandatory if template_id is not set.
    Cpumodel VirtualMachineCpumodelArgs
    Definition of CPU Model type for the Virtual Machine
    DefaultTags map[string]string
    Default tags defined in the provider configuration.
    Description string
    The description of the template.
    Disks []VirtualMachineDiskArgs
    Can be specified multiple times to attach several disks. See Disk parameters below for details.
    Gid float64
    Group ID which owns the virtual machine.
    Gname string
    Group Name which owns the virtual machine.
    Graphics VirtualMachineGraphicsArgs
    See Graphics parameters below for details.
    Group string
    Name of the group which owns the virtual machine. Defaults to the caller primary group.
    HardShutdown bool
    If the VM doesn't have ACPI support, it immediately poweroff/terminate/reboot/undeploy the VM. Defaults to false.
    Ip string
    Primary IP address assigned by OpenNebula
    KeepNicOrder bool
    Indicates if the provider should keep NIC list ordering at update.
    Lcmstate float64
    LCM State of the virtual machine.
    Lock string
    Lock the VM with a specific lock level. Supported values: USE, MANAGE, ADMIN, ALL or UNLOCK.
    Memory float64
    Amount of RAM assigned to the VM in MB. Mandatory if template_id is not set.
    Name string
    The name of the virtual machine.
    Nics []VirtualMachineNicArgs
    Can be specified multiple times to attach several NICs. See Nic parameters below for details.
    OnDiskChange string
    Select the behavior for changing disk images. Supported values: RECREATE or SWAP (default). RECREATE forces recreation of the vm and SWAP adopts the standard behavior of hot-swapping the disks. NOTE: This property does not affect the behavior of adding new disks.
    Os VirtualMachineOsArgs
    See OS parameters below for details.
    Pending bool
    Pending state during VM creation. Defaults to false.
    Permissions string
    Permissions applied on virtual machine. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    Raw VirtualMachineRawArgs
    Allow to pass hypervisor level tuning content. See Raw parameters below for details.
    SchedDsRequirements string
    Storage placement requirements to deploy the resource following specific rule.
    SchedRequirements string
    Scheduling requirements to deploy the resource following specific rule.
    State float64
    State of the virtual machine.
    Tags map[string]string
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    TagsAll map[string]string
    Result of the applied default_tags and then resource tags.
    TemplateDisks []VirtualMachineTemplateDiskArgs
    when template_id is used and the template define some disks, this contains the template disks description.
    TemplateId float64
    If set, VM are instantiated from the template ID. See Instantiate from a template for details. Changing this argument triggers a new resource.
    TemplateNics []VirtualMachineTemplateNicArgs
    when template_id is used and the template define some NICs, this contains the template NICs description.
    TemplateSectionNames map[string]string
    When template_id was set this keeps the template section names only.
    TemplateSections []VirtualMachineTemplateSectionArgs
    Allow to add a custom vector. See Template section parameters
    TemplateTags map[string]string
    When template_id was set this keeps the template tags.
    Timeout float64
    Timeout (in Minutes) for VM availability. Defaults to 3 minutes.

    Deprecated: Deprecated

    Timeouts VirtualMachineTimeoutsArgs
    Uid float64
    User ID whom owns the virtual machine.
    Uname string
    User Name whom owns the virtual machine.
    Vcpu float64
    Number of virtual CPUs assigned to the virtual machine
    VirtualMachineId string
    ID of the virtual machine.
    Vmgroup VirtualMachineVmgroupArgs
    See VM group parameters below for details. Changing this argument triggers a new resource.
    context Map<String,String>
    Array of free form key=value pairs, rendered and added to the CONTEXT variables for the VM. Recommended to include: NETWORK = "YES" and SET_HOSTNAME = "$NAME". If a template_id is set, see Instantiate from a template for details.
    cpu Double
    Amount of CPU shares assigned to the VM. Mandatory if template_id is not set.
    cpumodel VirtualMachineCpumodel
    Definition of CPU Model type for the Virtual Machine
    defaultTags Map<String,String>
    Default tags defined in the provider configuration.
    description String
    The description of the template.
    disks List<VirtualMachineDisk>
    Can be specified multiple times to attach several disks. See Disk parameters below for details.
    gid Double
    Group ID which owns the virtual machine.
    gname String
    Group Name which owns the virtual machine.
    graphics VirtualMachineGraphics
    See Graphics parameters below for details.
    group String
    Name of the group which owns the virtual machine. Defaults to the caller primary group.
    hardShutdown Boolean
    If the VM doesn't have ACPI support, it immediately poweroff/terminate/reboot/undeploy the VM. Defaults to false.
    ip String
    Primary IP address assigned by OpenNebula
    keepNicOrder Boolean
    Indicates if the provider should keep NIC list ordering at update.
    lcmstate Double
    LCM State of the virtual machine.
    lock String
    Lock the VM with a specific lock level. Supported values: USE, MANAGE, ADMIN, ALL or UNLOCK.
    memory Double
    Amount of RAM assigned to the VM in MB. Mandatory if template_id is not set.
    name String
    The name of the virtual machine.
    nics List<VirtualMachineNic>
    Can be specified multiple times to attach several NICs. See Nic parameters below for details.
    onDiskChange String
    Select the behavior for changing disk images. Supported values: RECREATE or SWAP (default). RECREATE forces recreation of the vm and SWAP adopts the standard behavior of hot-swapping the disks. NOTE: This property does not affect the behavior of adding new disks.
    os VirtualMachineOs
    See OS parameters below for details.
    pending Boolean
    Pending state during VM creation. Defaults to false.
    permissions String
    Permissions applied on virtual machine. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    raw VirtualMachineRaw
    Allow to pass hypervisor level tuning content. See Raw parameters below for details.
    schedDsRequirements String
    Storage placement requirements to deploy the resource following specific rule.
    schedRequirements String
    Scheduling requirements to deploy the resource following specific rule.
    state Double
    State of the virtual machine.
    tags Map<String,String>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    tagsAll Map<String,String>
    Result of the applied default_tags and then resource tags.
    templateDisks List<VirtualMachineTemplateDisk>
    when template_id is used and the template define some disks, this contains the template disks description.
    templateId Double
    If set, VM are instantiated from the template ID. See Instantiate from a template for details. Changing this argument triggers a new resource.
    templateNics List<VirtualMachineTemplateNic>
    when template_id is used and the template define some NICs, this contains the template NICs description.
    templateSectionNames Map<String,String>
    When template_id was set this keeps the template section names only.
    templateSections List<VirtualMachineTemplateSection>
    Allow to add a custom vector. See Template section parameters
    templateTags Map<String,String>
    When template_id was set this keeps the template tags.
    timeout Double
    Timeout (in Minutes) for VM availability. Defaults to 3 minutes.

    Deprecated: Deprecated

    timeouts VirtualMachineTimeouts
    uid Double
    User ID whom owns the virtual machine.
    uname String
    User Name whom owns the virtual machine.
    vcpu Double
    Number of virtual CPUs assigned to the virtual machine
    virtualMachineId String
    ID of the virtual machine.
    vmgroup VirtualMachineVmgroup
    See VM group parameters below for details. Changing this argument triggers a new resource.
    context {[key: string]: string}
    Array of free form key=value pairs, rendered and added to the CONTEXT variables for the VM. Recommended to include: NETWORK = "YES" and SET_HOSTNAME = "$NAME". If a template_id is set, see Instantiate from a template for details.
    cpu number
    Amount of CPU shares assigned to the VM. Mandatory if template_id is not set.
    cpumodel VirtualMachineCpumodel
    Definition of CPU Model type for the Virtual Machine
    defaultTags {[key: string]: string}
    Default tags defined in the provider configuration.
    description string
    The description of the template.
    disks VirtualMachineDisk[]
    Can be specified multiple times to attach several disks. See Disk parameters below for details.
    gid number
    Group ID which owns the virtual machine.
    gname string
    Group Name which owns the virtual machine.
    graphics VirtualMachineGraphics
    See Graphics parameters below for details.
    group string
    Name of the group which owns the virtual machine. Defaults to the caller primary group.
    hardShutdown boolean
    If the VM doesn't have ACPI support, it immediately poweroff/terminate/reboot/undeploy the VM. Defaults to false.
    ip string
    Primary IP address assigned by OpenNebula
    keepNicOrder boolean
    Indicates if the provider should keep NIC list ordering at update.
    lcmstate number
    LCM State of the virtual machine.
    lock string
    Lock the VM with a specific lock level. Supported values: USE, MANAGE, ADMIN, ALL or UNLOCK.
    memory number
    Amount of RAM assigned to the VM in MB. Mandatory if template_id is not set.
    name string
    The name of the virtual machine.
    nics VirtualMachineNic[]
    Can be specified multiple times to attach several NICs. See Nic parameters below for details.
    onDiskChange string
    Select the behavior for changing disk images. Supported values: RECREATE or SWAP (default). RECREATE forces recreation of the vm and SWAP adopts the standard behavior of hot-swapping the disks. NOTE: This property does not affect the behavior of adding new disks.
    os VirtualMachineOs
    See OS parameters below for details.
    pending boolean
    Pending state during VM creation. Defaults to false.
    permissions string
    Permissions applied on virtual machine. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    raw VirtualMachineRaw
    Allow to pass hypervisor level tuning content. See Raw parameters below for details.
    schedDsRequirements string
    Storage placement requirements to deploy the resource following specific rule.
    schedRequirements string
    Scheduling requirements to deploy the resource following specific rule.
    state number
    State of the virtual machine.
    tags {[key: string]: string}
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    tagsAll {[key: string]: string}
    Result of the applied default_tags and then resource tags.
    templateDisks VirtualMachineTemplateDisk[]
    when template_id is used and the template define some disks, this contains the template disks description.
    templateId number
    If set, VM are instantiated from the template ID. See Instantiate from a template for details. Changing this argument triggers a new resource.
    templateNics VirtualMachineTemplateNic[]
    when template_id is used and the template define some NICs, this contains the template NICs description.
    templateSectionNames {[key: string]: string}
    When template_id was set this keeps the template section names only.
    templateSections VirtualMachineTemplateSection[]
    Allow to add a custom vector. See Template section parameters
    templateTags {[key: string]: string}
    When template_id was set this keeps the template tags.
    timeout number
    Timeout (in Minutes) for VM availability. Defaults to 3 minutes.

    Deprecated: Deprecated

    timeouts VirtualMachineTimeouts
    uid number
    User ID whom owns the virtual machine.
    uname string
    User Name whom owns the virtual machine.
    vcpu number
    Number of virtual CPUs assigned to the virtual machine
    virtualMachineId string
    ID of the virtual machine.
    vmgroup VirtualMachineVmgroup
    See VM group parameters below for details. Changing this argument triggers a new resource.
    context Mapping[str, str]
    Array of free form key=value pairs, rendered and added to the CONTEXT variables for the VM. Recommended to include: NETWORK = "YES" and SET_HOSTNAME = "$NAME". If a template_id is set, see Instantiate from a template for details.
    cpu float
    Amount of CPU shares assigned to the VM. Mandatory if template_id is not set.
    cpumodel VirtualMachineCpumodelArgs
    Definition of CPU Model type for the Virtual Machine
    default_tags Mapping[str, str]
    Default tags defined in the provider configuration.
    description str
    The description of the template.
    disks Sequence[VirtualMachineDiskArgs]
    Can be specified multiple times to attach several disks. See Disk parameters below for details.
    gid float
    Group ID which owns the virtual machine.
    gname str
    Group Name which owns the virtual machine.
    graphics VirtualMachineGraphicsArgs
    See Graphics parameters below for details.
    group str
    Name of the group which owns the virtual machine. Defaults to the caller primary group.
    hard_shutdown bool
    If the VM doesn't have ACPI support, it immediately poweroff/terminate/reboot/undeploy the VM. Defaults to false.
    ip str
    Primary IP address assigned by OpenNebula
    keep_nic_order bool
    Indicates if the provider should keep NIC list ordering at update.
    lcmstate float
    LCM State of the virtual machine.
    lock str
    Lock the VM with a specific lock level. Supported values: USE, MANAGE, ADMIN, ALL or UNLOCK.
    memory float
    Amount of RAM assigned to the VM in MB. Mandatory if template_id is not set.
    name str
    The name of the virtual machine.
    nics Sequence[VirtualMachineNicArgs]
    Can be specified multiple times to attach several NICs. See Nic parameters below for details.
    on_disk_change str
    Select the behavior for changing disk images. Supported values: RECREATE or SWAP (default). RECREATE forces recreation of the vm and SWAP adopts the standard behavior of hot-swapping the disks. NOTE: This property does not affect the behavior of adding new disks.
    os VirtualMachineOsArgs
    See OS parameters below for details.
    pending bool
    Pending state during VM creation. Defaults to false.
    permissions str
    Permissions applied on virtual machine. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    raw VirtualMachineRawArgs
    Allow to pass hypervisor level tuning content. See Raw parameters below for details.
    sched_ds_requirements str
    Storage placement requirements to deploy the resource following specific rule.
    sched_requirements str
    Scheduling requirements to deploy the resource following specific rule.
    state float
    State of the virtual machine.
    tags Mapping[str, str]
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    tags_all Mapping[str, str]
    Result of the applied default_tags and then resource tags.
    template_disks Sequence[VirtualMachineTemplateDiskArgs]
    when template_id is used and the template define some disks, this contains the template disks description.
    template_id float
    If set, VM are instantiated from the template ID. See Instantiate from a template for details. Changing this argument triggers a new resource.
    template_nics Sequence[VirtualMachineTemplateNicArgs]
    when template_id is used and the template define some NICs, this contains the template NICs description.
    template_section_names Mapping[str, str]
    When template_id was set this keeps the template section names only.
    template_sections Sequence[VirtualMachineTemplateSectionArgs]
    Allow to add a custom vector. See Template section parameters
    template_tags Mapping[str, str]
    When template_id was set this keeps the template tags.
    timeout float
    Timeout (in Minutes) for VM availability. Defaults to 3 minutes.

    Deprecated: Deprecated

    timeouts VirtualMachineTimeoutsArgs
    uid float
    User ID whom owns the virtual machine.
    uname str
    User Name whom owns the virtual machine.
    vcpu float
    Number of virtual CPUs assigned to the virtual machine
    virtual_machine_id str
    ID of the virtual machine.
    vmgroup VirtualMachineVmgroupArgs
    See VM group parameters below for details. Changing this argument triggers a new resource.
    context Map<String>
    Array of free form key=value pairs, rendered and added to the CONTEXT variables for the VM. Recommended to include: NETWORK = "YES" and SET_HOSTNAME = "$NAME". If a template_id is set, see Instantiate from a template for details.
    cpu Number
    Amount of CPU shares assigned to the VM. Mandatory if template_id is not set.
    cpumodel Property Map
    Definition of CPU Model type for the Virtual Machine
    defaultTags Map<String>
    Default tags defined in the provider configuration.
    description String
    The description of the template.
    disks List<Property Map>
    Can be specified multiple times to attach several disks. See Disk parameters below for details.
    gid Number
    Group ID which owns the virtual machine.
    gname String
    Group Name which owns the virtual machine.
    graphics Property Map
    See Graphics parameters below for details.
    group String
    Name of the group which owns the virtual machine. Defaults to the caller primary group.
    hardShutdown Boolean
    If the VM doesn't have ACPI support, it immediately poweroff/terminate/reboot/undeploy the VM. Defaults to false.
    ip String
    Primary IP address assigned by OpenNebula
    keepNicOrder Boolean
    Indicates if the provider should keep NIC list ordering at update.
    lcmstate Number
    LCM State of the virtual machine.
    lock String
    Lock the VM with a specific lock level. Supported values: USE, MANAGE, ADMIN, ALL or UNLOCK.
    memory Number
    Amount of RAM assigned to the VM in MB. Mandatory if template_id is not set.
    name String
    The name of the virtual machine.
    nics List<Property Map>
    Can be specified multiple times to attach several NICs. See Nic parameters below for details.
    onDiskChange String
    Select the behavior for changing disk images. Supported values: RECREATE or SWAP (default). RECREATE forces recreation of the vm and SWAP adopts the standard behavior of hot-swapping the disks. NOTE: This property does not affect the behavior of adding new disks.
    os Property Map
    See OS parameters below for details.
    pending Boolean
    Pending state during VM creation. Defaults to false.
    permissions String
    Permissions applied on virtual machine. Defaults to the UMASK in OpenNebula (in UNIX Format: owner-group-other => Use-Manage-Admin).
    raw Property Map
    Allow to pass hypervisor level tuning content. See Raw parameters below for details.
    schedDsRequirements String
    Storage placement requirements to deploy the resource following specific rule.
    schedRequirements String
    Scheduling requirements to deploy the resource following specific rule.
    state Number
    State of the virtual machine.
    tags Map<String>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    tagsAll Map<String>
    Result of the applied default_tags and then resource tags.
    templateDisks List<Property Map>
    when template_id is used and the template define some disks, this contains the template disks description.
    templateId Number
    If set, VM are instantiated from the template ID. See Instantiate from a template for details. Changing this argument triggers a new resource.
    templateNics List<Property Map>
    when template_id is used and the template define some NICs, this contains the template NICs description.
    templateSectionNames Map<String>
    When template_id was set this keeps the template section names only.
    templateSections List<Property Map>
    Allow to add a custom vector. See Template section parameters
    templateTags Map<String>
    When template_id was set this keeps the template tags.
    timeout Number
    Timeout (in Minutes) for VM availability. Defaults to 3 minutes.

    Deprecated: Deprecated

    timeouts Property Map
    uid Number
    User ID whom owns the virtual machine.
    uname String
    User Name whom owns the virtual machine.
    vcpu Number
    Number of virtual CPUs assigned to the virtual machine
    virtualMachineId String
    ID of the virtual machine.
    vmgroup Property Map
    See VM group parameters below for details. Changing this argument triggers a new resource.

    Supporting Types

    VirtualMachineCpumodel, VirtualMachineCpumodelArgs

    Model string
    Nic model driver. Example: virtio.
    Model string
    Nic model driver. Example: virtio.
    model String
    Nic model driver. Example: virtio.
    model string
    Nic model driver. Example: virtio.
    model str
    Nic model driver. Example: virtio.
    model String
    Nic model driver. Example: virtio.

    VirtualMachineDisk, VirtualMachineDiskArgs

    Cache string
    ComputedCache string
    ComputedDevPrefix string
    ComputedDiscard string
    ComputedDriver string
    OpenNebula image driver.
    ComputedIo string
    ComputedSize double
    Size (in MB) of the image attached to the virtual machine. Not possible to change a cloned image size.
    ComputedTarget string
    Target name device on the virtual machine. Depends of the image dev_prefix.
    ComputedVolatileFormat string
    Format of the Image: raw or qcow2.
    DevPrefix string
    Discard string
    DiskId double
    disk attachment identifier
    Driver string
    OpenNebula image driver.
    ImageId double
    ID of the image to attach to the virtual machine. Defaults to -1 if not set: this skip Image attchment to the VM. Conflicts with volatile_type and volatile_format.
    Io string
    Size double
    Size (in MB) of the image. If set, it will resize the image disk to the targeted size. The size must be greater than the current one.
    Target string
    Target name device on the virtual machine. Depends of the image dev_prefix.
    VolatileFormat string

    Format of the Image: raw or qcow2. Conflicts with image_id.

    Minimum 1 item. Maximum 8 items.

    A disk update will be triggered in adding or removing a disk section, or by a modification of any of these parameters: image_id, target, driver

    VolatileType string
    Type of the disk: swap or fs. Type swap is not supported in vcenter. Conflicts with image_id.
    Cache string
    ComputedCache string
    ComputedDevPrefix string
    ComputedDiscard string
    ComputedDriver string
    OpenNebula image driver.
    ComputedIo string
    ComputedSize float64
    Size (in MB) of the image attached to the virtual machine. Not possible to change a cloned image size.
    ComputedTarget string
    Target name device on the virtual machine. Depends of the image dev_prefix.
    ComputedVolatileFormat string
    Format of the Image: raw or qcow2.
    DevPrefix string
    Discard string
    DiskId float64
    disk attachment identifier
    Driver string
    OpenNebula image driver.
    ImageId float64
    ID of the image to attach to the virtual machine. Defaults to -1 if not set: this skip Image attchment to the VM. Conflicts with volatile_type and volatile_format.
    Io string
    Size float64
    Size (in MB) of the image. If set, it will resize the image disk to the targeted size. The size must be greater than the current one.
    Target string
    Target name device on the virtual machine. Depends of the image dev_prefix.
    VolatileFormat string

    Format of the Image: raw or qcow2. Conflicts with image_id.

    Minimum 1 item. Maximum 8 items.

    A disk update will be triggered in adding or removing a disk section, or by a modification of any of these parameters: image_id, target, driver

    VolatileType string
    Type of the disk: swap or fs. Type swap is not supported in vcenter. Conflicts with image_id.
    cache String
    computedCache String
    computedDevPrefix String
    computedDiscard String
    computedDriver String
    OpenNebula image driver.
    computedIo String
    computedSize Double
    Size (in MB) of the image attached to the virtual machine. Not possible to change a cloned image size.
    computedTarget String
    Target name device on the virtual machine. Depends of the image dev_prefix.
    computedVolatileFormat String
    Format of the Image: raw or qcow2.
    devPrefix String
    discard String
    diskId Double
    disk attachment identifier
    driver String
    OpenNebula image driver.
    imageId Double
    ID of the image to attach to the virtual machine. Defaults to -1 if not set: this skip Image attchment to the VM. Conflicts with volatile_type and volatile_format.
    io String
    size Double
    Size (in MB) of the image. If set, it will resize the image disk to the targeted size. The size must be greater than the current one.
    target String
    Target name device on the virtual machine. Depends of the image dev_prefix.
    volatileFormat String

    Format of the Image: raw or qcow2. Conflicts with image_id.

    Minimum 1 item. Maximum 8 items.

    A disk update will be triggered in adding or removing a disk section, or by a modification of any of these parameters: image_id, target, driver

    volatileType String
    Type of the disk: swap or fs. Type swap is not supported in vcenter. Conflicts with image_id.
    cache string
    computedCache string
    computedDevPrefix string
    computedDiscard string
    computedDriver string
    OpenNebula image driver.
    computedIo string
    computedSize number
    Size (in MB) of the image attached to the virtual machine. Not possible to change a cloned image size.
    computedTarget string
    Target name device on the virtual machine. Depends of the image dev_prefix.
    computedVolatileFormat string
    Format of the Image: raw or qcow2.
    devPrefix string
    discard string
    diskId number
    disk attachment identifier
    driver string
    OpenNebula image driver.
    imageId number
    ID of the image to attach to the virtual machine. Defaults to -1 if not set: this skip Image attchment to the VM. Conflicts with volatile_type and volatile_format.
    io string
    size number
    Size (in MB) of the image. If set, it will resize the image disk to the targeted size. The size must be greater than the current one.
    target string
    Target name device on the virtual machine. Depends of the image dev_prefix.
    volatileFormat string

    Format of the Image: raw or qcow2. Conflicts with image_id.

    Minimum 1 item. Maximum 8 items.

    A disk update will be triggered in adding or removing a disk section, or by a modification of any of these parameters: image_id, target, driver

    volatileType string
    Type of the disk: swap or fs. Type swap is not supported in vcenter. Conflicts with image_id.
    cache str
    computed_cache str
    computed_dev_prefix str
    computed_discard str
    computed_driver str
    OpenNebula image driver.
    computed_io str
    computed_size float
    Size (in MB) of the image attached to the virtual machine. Not possible to change a cloned image size.
    computed_target str
    Target name device on the virtual machine. Depends of the image dev_prefix.
    computed_volatile_format str
    Format of the Image: raw or qcow2.
    dev_prefix str
    discard str
    disk_id float
    disk attachment identifier
    driver str
    OpenNebula image driver.
    image_id float
    ID of the image to attach to the virtual machine. Defaults to -1 if not set: this skip Image attchment to the VM. Conflicts with volatile_type and volatile_format.
    io str
    size float
    Size (in MB) of the image. If set, it will resize the image disk to the targeted size. The size must be greater than the current one.
    target str
    Target name device on the virtual machine. Depends of the image dev_prefix.
    volatile_format str

    Format of the Image: raw or qcow2. Conflicts with image_id.

    Minimum 1 item. Maximum 8 items.

    A disk update will be triggered in adding or removing a disk section, or by a modification of any of these parameters: image_id, target, driver

    volatile_type str
    Type of the disk: swap or fs. Type swap is not supported in vcenter. Conflicts with image_id.
    cache String
    computedCache String
    computedDevPrefix String
    computedDiscard String
    computedDriver String
    OpenNebula image driver.
    computedIo String
    computedSize Number
    Size (in MB) of the image attached to the virtual machine. Not possible to change a cloned image size.
    computedTarget String
    Target name device on the virtual machine. Depends of the image dev_prefix.
    computedVolatileFormat String
    Format of the Image: raw or qcow2.
    devPrefix String
    discard String
    diskId Number
    disk attachment identifier
    driver String
    OpenNebula image driver.
    imageId Number
    ID of the image to attach to the virtual machine. Defaults to -1 if not set: this skip Image attchment to the VM. Conflicts with volatile_type and volatile_format.
    io String
    size Number
    Size (in MB) of the image. If set, it will resize the image disk to the targeted size. The size must be greater than the current one.
    target String
    Target name device on the virtual machine. Depends of the image dev_prefix.
    volatileFormat String

    Format of the Image: raw or qcow2. Conflicts with image_id.

    Minimum 1 item. Maximum 8 items.

    A disk update will be triggered in adding or removing a disk section, or by a modification of any of these parameters: image_id, target, driver

    volatileType String
    Type of the disk: swap or fs. Type swap is not supported in vcenter. Conflicts with image_id.

    VirtualMachineGraphics, VirtualMachineGraphicsArgs

    Listen string
    Binding address.
    Type string
    Generally set to VNC.
    Keymap string
    Keyboard mapping.
    Passwd string
    VNC's password, conflicts with random_passwd.
    Port string
    Binding Port.
    RandomPasswd bool
    Randomized VNC's password, conflicts with passwd.
    Listen string
    Binding address.
    Type string
    Generally set to VNC.
    Keymap string
    Keyboard mapping.
    Passwd string
    VNC's password, conflicts with random_passwd.
    Port string
    Binding Port.
    RandomPasswd bool
    Randomized VNC's password, conflicts with passwd.
    listen String
    Binding address.
    type String
    Generally set to VNC.
    keymap String
    Keyboard mapping.
    passwd String
    VNC's password, conflicts with random_passwd.
    port String
    Binding Port.
    randomPasswd Boolean
    Randomized VNC's password, conflicts with passwd.
    listen string
    Binding address.
    type string
    Generally set to VNC.
    keymap string
    Keyboard mapping.
    passwd string
    VNC's password, conflicts with random_passwd.
    port string
    Binding Port.
    randomPasswd boolean
    Randomized VNC's password, conflicts with passwd.
    listen str
    Binding address.
    type str
    Generally set to VNC.
    keymap str
    Keyboard mapping.
    passwd str
    VNC's password, conflicts with random_passwd.
    port str
    Binding Port.
    random_passwd bool
    Randomized VNC's password, conflicts with passwd.
    listen String
    Binding address.
    type String
    Generally set to VNC.
    keymap String
    Keyboard mapping.
    passwd String
    VNC's password, conflicts with random_passwd.
    port String
    Binding Port.
    randomPasswd Boolean
    Randomized VNC's password, conflicts with passwd.

    VirtualMachineNic, VirtualMachineNicArgs

    ComputedDns string
    DNS server set for the NIC.
    ComputedGateway string
    Default gateway set for the NIC.
    ComputedIp string
    IP of the virtual machine on this network.
    ComputedMac string
    MAC of the virtual machine on this network.
    ComputedMethod string
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    ComputedModel string
    Nic model driver.
    ComputedPhysicalDevice string
    Physical device hosting the virtual network.
    ComputedSecurityGroups List<double>
    List of security group IDs to use on the virtual.
    ComputedVirtioQueues string
    Virtio multi-queue size.
    Dns string
    DNS server set for the NIC. Please make sure INHERIT_VNET_ATTR="DNS" is added to /etc/one/oned.conf.
    Gateway string
    Default gateway set for the NIC.
    Ip string
    IP of the virtual machine on this network.
    Mac string
    MAC of the virtual machine on this network.
    Method string
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    Model string
    Nic model driver. Example: virtio.
    Network string
    network name
    NetworkId double
    ID of the virtual network to attach to the virtual machine.
    NetworkModeAuto bool
    A boolean letting the scheduler pick the Virtual Networks the VM NICs will be attached to. Can only be used at VM creation.
    NicId double
    nic attachment identifier
    PhysicalDevice string
    Physical device hosting the virtual network.
    SchedRank string

    Arithmetic expression to sort the suitable Virtual Networks for this NIC, when network_mode_auto is true. Can only be used at VM creation.

    Minimum 1 item. Maximum 8 items.

    A NIC update will be triggered in adding or removing a nic section, or by a modification of any of these parameters: network_id, ip, mac, security_groups, physical_device

    SchedRequirements string
    A boolean expression to select virtual networks (evaluates to true) to attach the NIC, when network_mode_auto is true. Can only be used at VM creation.
    SecurityGroups List<double>
    List of security group IDs to use on the virtual network.
    VirtioQueues string
    Virtio multi-queue size. Only if model is virtio.
    ComputedDns string
    DNS server set for the NIC.
    ComputedGateway string
    Default gateway set for the NIC.
    ComputedIp string
    IP of the virtual machine on this network.
    ComputedMac string
    MAC of the virtual machine on this network.
    ComputedMethod string
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    ComputedModel string
    Nic model driver.
    ComputedPhysicalDevice string
    Physical device hosting the virtual network.
    ComputedSecurityGroups []float64
    List of security group IDs to use on the virtual.
    ComputedVirtioQueues string
    Virtio multi-queue size.
    Dns string
    DNS server set for the NIC. Please make sure INHERIT_VNET_ATTR="DNS" is added to /etc/one/oned.conf.
    Gateway string
    Default gateway set for the NIC.
    Ip string
    IP of the virtual machine on this network.
    Mac string
    MAC of the virtual machine on this network.
    Method string
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    Model string
    Nic model driver. Example: virtio.
    Network string
    network name
    NetworkId float64
    ID of the virtual network to attach to the virtual machine.
    NetworkModeAuto bool
    A boolean letting the scheduler pick the Virtual Networks the VM NICs will be attached to. Can only be used at VM creation.
    NicId float64
    nic attachment identifier
    PhysicalDevice string
    Physical device hosting the virtual network.
    SchedRank string

    Arithmetic expression to sort the suitable Virtual Networks for this NIC, when network_mode_auto is true. Can only be used at VM creation.

    Minimum 1 item. Maximum 8 items.

    A NIC update will be triggered in adding or removing a nic section, or by a modification of any of these parameters: network_id, ip, mac, security_groups, physical_device

    SchedRequirements string
    A boolean expression to select virtual networks (evaluates to true) to attach the NIC, when network_mode_auto is true. Can only be used at VM creation.
    SecurityGroups []float64
    List of security group IDs to use on the virtual network.
    VirtioQueues string
    Virtio multi-queue size. Only if model is virtio.
    computedDns String
    DNS server set for the NIC.
    computedGateway String
    Default gateway set for the NIC.
    computedIp String
    IP of the virtual machine on this network.
    computedMac String
    MAC of the virtual machine on this network.
    computedMethod String
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    computedModel String
    Nic model driver.
    computedPhysicalDevice String
    Physical device hosting the virtual network.
    computedSecurityGroups List<Double>
    List of security group IDs to use on the virtual.
    computedVirtioQueues String
    Virtio multi-queue size.
    dns String
    DNS server set for the NIC. Please make sure INHERIT_VNET_ATTR="DNS" is added to /etc/one/oned.conf.
    gateway String
    Default gateway set for the NIC.
    ip String
    IP of the virtual machine on this network.
    mac String
    MAC of the virtual machine on this network.
    method String
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    model String
    Nic model driver. Example: virtio.
    network String
    network name
    networkId Double
    ID of the virtual network to attach to the virtual machine.
    networkModeAuto Boolean
    A boolean letting the scheduler pick the Virtual Networks the VM NICs will be attached to. Can only be used at VM creation.
    nicId Double
    nic attachment identifier
    physicalDevice String
    Physical device hosting the virtual network.
    schedRank String

    Arithmetic expression to sort the suitable Virtual Networks for this NIC, when network_mode_auto is true. Can only be used at VM creation.

    Minimum 1 item. Maximum 8 items.

    A NIC update will be triggered in adding or removing a nic section, or by a modification of any of these parameters: network_id, ip, mac, security_groups, physical_device

    schedRequirements String
    A boolean expression to select virtual networks (evaluates to true) to attach the NIC, when network_mode_auto is true. Can only be used at VM creation.
    securityGroups List<Double>
    List of security group IDs to use on the virtual network.
    virtioQueues String
    Virtio multi-queue size. Only if model is virtio.
    computedDns string
    DNS server set for the NIC.
    computedGateway string
    Default gateway set for the NIC.
    computedIp string
    IP of the virtual machine on this network.
    computedMac string
    MAC of the virtual machine on this network.
    computedMethod string
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    computedModel string
    Nic model driver.
    computedPhysicalDevice string
    Physical device hosting the virtual network.
    computedSecurityGroups number[]
    List of security group IDs to use on the virtual.
    computedVirtioQueues string
    Virtio multi-queue size.
    dns string
    DNS server set for the NIC. Please make sure INHERIT_VNET_ATTR="DNS" is added to /etc/one/oned.conf.
    gateway string
    Default gateway set for the NIC.
    ip string
    IP of the virtual machine on this network.
    mac string
    MAC of the virtual machine on this network.
    method string
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    model string
    Nic model driver. Example: virtio.
    network string
    network name
    networkId number
    ID of the virtual network to attach to the virtual machine.
    networkModeAuto boolean
    A boolean letting the scheduler pick the Virtual Networks the VM NICs will be attached to. Can only be used at VM creation.
    nicId number
    nic attachment identifier
    physicalDevice string
    Physical device hosting the virtual network.
    schedRank string

    Arithmetic expression to sort the suitable Virtual Networks for this NIC, when network_mode_auto is true. Can only be used at VM creation.

    Minimum 1 item. Maximum 8 items.

    A NIC update will be triggered in adding or removing a nic section, or by a modification of any of these parameters: network_id, ip, mac, security_groups, physical_device

    schedRequirements string
    A boolean expression to select virtual networks (evaluates to true) to attach the NIC, when network_mode_auto is true. Can only be used at VM creation.
    securityGroups number[]
    List of security group IDs to use on the virtual network.
    virtioQueues string
    Virtio multi-queue size. Only if model is virtio.
    computed_dns str
    DNS server set for the NIC.
    computed_gateway str
    Default gateway set for the NIC.
    computed_ip str
    IP of the virtual machine on this network.
    computed_mac str
    MAC of the virtual machine on this network.
    computed_method str
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    computed_model str
    Nic model driver.
    computed_physical_device str
    Physical device hosting the virtual network.
    computed_security_groups Sequence[float]
    List of security group IDs to use on the virtual.
    computed_virtio_queues str
    Virtio multi-queue size.
    dns str
    DNS server set for the NIC. Please make sure INHERIT_VNET_ATTR="DNS" is added to /etc/one/oned.conf.
    gateway str
    Default gateway set for the NIC.
    ip str
    IP of the virtual machine on this network.
    mac str
    MAC of the virtual machine on this network.
    method str
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    model str
    Nic model driver. Example: virtio.
    network str
    network name
    network_id float
    ID of the virtual network to attach to the virtual machine.
    network_mode_auto bool
    A boolean letting the scheduler pick the Virtual Networks the VM NICs will be attached to. Can only be used at VM creation.
    nic_id float
    nic attachment identifier
    physical_device str
    Physical device hosting the virtual network.
    sched_rank str

    Arithmetic expression to sort the suitable Virtual Networks for this NIC, when network_mode_auto is true. Can only be used at VM creation.

    Minimum 1 item. Maximum 8 items.

    A NIC update will be triggered in adding or removing a nic section, or by a modification of any of these parameters: network_id, ip, mac, security_groups, physical_device

    sched_requirements str
    A boolean expression to select virtual networks (evaluates to true) to attach the NIC, when network_mode_auto is true. Can only be used at VM creation.
    security_groups Sequence[float]
    List of security group IDs to use on the virtual network.
    virtio_queues str
    Virtio multi-queue size. Only if model is virtio.
    computedDns String
    DNS server set for the NIC.
    computedGateway String
    Default gateway set for the NIC.
    computedIp String
    IP of the virtual machine on this network.
    computedMac String
    MAC of the virtual machine on this network.
    computedMethod String
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    computedModel String
    Nic model driver.
    computedPhysicalDevice String
    Physical device hosting the virtual network.
    computedSecurityGroups List<Number>
    List of security group IDs to use on the virtual.
    computedVirtioQueues String
    Virtio multi-queue size.
    dns String
    DNS server set for the NIC. Please make sure INHERIT_VNET_ATTR="DNS" is added to /etc/one/oned.conf.
    gateway String
    Default gateway set for the NIC.
    ip String
    IP of the virtual machine on this network.
    mac String
    MAC of the virtual machine on this network.
    method String
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    model String
    Nic model driver. Example: virtio.
    network String
    network name
    networkId Number
    ID of the virtual network to attach to the virtual machine.
    networkModeAuto Boolean
    A boolean letting the scheduler pick the Virtual Networks the VM NICs will be attached to. Can only be used at VM creation.
    nicId Number
    nic attachment identifier
    physicalDevice String
    Physical device hosting the virtual network.
    schedRank String

    Arithmetic expression to sort the suitable Virtual Networks for this NIC, when network_mode_auto is true. Can only be used at VM creation.

    Minimum 1 item. Maximum 8 items.

    A NIC update will be triggered in adding or removing a nic section, or by a modification of any of these parameters: network_id, ip, mac, security_groups, physical_device

    schedRequirements String
    A boolean expression to select virtual networks (evaluates to true) to attach the NIC, when network_mode_auto is true. Can only be used at VM creation.
    securityGroups List<Number>
    List of security group IDs to use on the virtual network.
    virtioQueues String
    Virtio multi-queue size. Only if model is virtio.

    VirtualMachineOs, VirtualMachineOsArgs

    Arch string
    Hardware architecture of the Virtual machine. Must fit the host architecture.
    Boot string
    OS disk to use to boot on.
    Arch string
    Hardware architecture of the Virtual machine. Must fit the host architecture.
    Boot string
    OS disk to use to boot on.
    arch String
    Hardware architecture of the Virtual machine. Must fit the host architecture.
    boot String
    OS disk to use to boot on.
    arch string
    Hardware architecture of the Virtual machine. Must fit the host architecture.
    boot string
    OS disk to use to boot on.
    arch str
    Hardware architecture of the Virtual machine. Must fit the host architecture.
    boot str
    OS disk to use to boot on.
    arch String
    Hardware architecture of the Virtual machine. Must fit the host architecture.
    boot String
    OS disk to use to boot on.

    VirtualMachineRaw, VirtualMachineRawArgs

    Data string
    Raw data to pass to the hypervisor.
    Type string
    Hypervisor. Supported values: kvm, lxd, vmware.
    Data string
    Raw data to pass to the hypervisor.
    Type string
    Hypervisor. Supported values: kvm, lxd, vmware.
    data String
    Raw data to pass to the hypervisor.
    type String
    Hypervisor. Supported values: kvm, lxd, vmware.
    data string
    Raw data to pass to the hypervisor.
    type string
    Hypervisor. Supported values: kvm, lxd, vmware.
    data str
    Raw data to pass to the hypervisor.
    type str
    Hypervisor. Supported values: kvm, lxd, vmware.
    data String
    Raw data to pass to the hypervisor.
    type String
    Hypervisor. Supported values: kvm, lxd, vmware.

    VirtualMachineTemplateDisk, VirtualMachineTemplateDiskArgs

    ComputedCache string
    ComputedDevPrefix string
    ComputedDiscard string
    ComputedDriver string
    OpenNebula image driver.
    ComputedIo string
    ComputedSize double
    Size (in MB) of the image attached to the virtual machine. Not possible to change a cloned image size.
    ComputedTarget string
    Target name device on the virtual machine. Depends of the image dev_prefix.
    ComputedVolatileFormat string
    Format of the Image: raw or qcow2.
    DiskId double
    disk attachment identifier
    ImageId double
    ID of the image attached to the virtual machine.
    ComputedCache string
    ComputedDevPrefix string
    ComputedDiscard string
    ComputedDriver string
    OpenNebula image driver.
    ComputedIo string
    ComputedSize float64
    Size (in MB) of the image attached to the virtual machine. Not possible to change a cloned image size.
    ComputedTarget string
    Target name device on the virtual machine. Depends of the image dev_prefix.
    ComputedVolatileFormat string
    Format of the Image: raw or qcow2.
    DiskId float64
    disk attachment identifier
    ImageId float64
    ID of the image attached to the virtual machine.
    computedCache String
    computedDevPrefix String
    computedDiscard String
    computedDriver String
    OpenNebula image driver.
    computedIo String
    computedSize Double
    Size (in MB) of the image attached to the virtual machine. Not possible to change a cloned image size.
    computedTarget String
    Target name device on the virtual machine. Depends of the image dev_prefix.
    computedVolatileFormat String
    Format of the Image: raw or qcow2.
    diskId Double
    disk attachment identifier
    imageId Double
    ID of the image attached to the virtual machine.
    computedCache string
    computedDevPrefix string
    computedDiscard string
    computedDriver string
    OpenNebula image driver.
    computedIo string
    computedSize number
    Size (in MB) of the image attached to the virtual machine. Not possible to change a cloned image size.
    computedTarget string
    Target name device on the virtual machine. Depends of the image dev_prefix.
    computedVolatileFormat string
    Format of the Image: raw or qcow2.
    diskId number
    disk attachment identifier
    imageId number
    ID of the image attached to the virtual machine.
    computed_cache str
    computed_dev_prefix str
    computed_discard str
    computed_driver str
    OpenNebula image driver.
    computed_io str
    computed_size float
    Size (in MB) of the image attached to the virtual machine. Not possible to change a cloned image size.
    computed_target str
    Target name device on the virtual machine. Depends of the image dev_prefix.
    computed_volatile_format str
    Format of the Image: raw or qcow2.
    disk_id float
    disk attachment identifier
    image_id float
    ID of the image attached to the virtual machine.
    computedCache String
    computedDevPrefix String
    computedDiscard String
    computedDriver String
    OpenNebula image driver.
    computedIo String
    computedSize Number
    Size (in MB) of the image attached to the virtual machine. Not possible to change a cloned image size.
    computedTarget String
    Target name device on the virtual machine. Depends of the image dev_prefix.
    computedVolatileFormat String
    Format of the Image: raw or qcow2.
    diskId Number
    disk attachment identifier
    imageId Number
    ID of the image attached to the virtual machine.

    VirtualMachineTemplateNic, VirtualMachineTemplateNicArgs

    ComputedDns string
    DNS server set for the NIC.
    ComputedGateway string
    Default gateway set for the NIC.
    ComputedIp string
    IP of the virtual machine on this network.
    ComputedMac string
    MAC of the virtual machine on this network.
    ComputedMethod string
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    ComputedModel string
    Nic model driver.
    ComputedPhysicalDevice string
    Physical device hosting the virtual network.
    ComputedSecurityGroups List<double>
    List of security group IDs to use on the virtual.
    ComputedVirtioQueues string
    Virtio multi-queue size.
    Network string
    network name
    NetworkId double
    ID of the image attached to the virtual machine.
    NicId double
    nic attachment identifier
    ComputedDns string
    DNS server set for the NIC.
    ComputedGateway string
    Default gateway set for the NIC.
    ComputedIp string
    IP of the virtual machine on this network.
    ComputedMac string
    MAC of the virtual machine on this network.
    ComputedMethod string
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    ComputedModel string
    Nic model driver.
    ComputedPhysicalDevice string
    Physical device hosting the virtual network.
    ComputedSecurityGroups []float64
    List of security group IDs to use on the virtual.
    ComputedVirtioQueues string
    Virtio multi-queue size.
    Network string
    network name
    NetworkId float64
    ID of the image attached to the virtual machine.
    NicId float64
    nic attachment identifier
    computedDns String
    DNS server set for the NIC.
    computedGateway String
    Default gateway set for the NIC.
    computedIp String
    IP of the virtual machine on this network.
    computedMac String
    MAC of the virtual machine on this network.
    computedMethod String
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    computedModel String
    Nic model driver.
    computedPhysicalDevice String
    Physical device hosting the virtual network.
    computedSecurityGroups List<Double>
    List of security group IDs to use on the virtual.
    computedVirtioQueues String
    Virtio multi-queue size.
    network String
    network name
    networkId Double
    ID of the image attached to the virtual machine.
    nicId Double
    nic attachment identifier
    computedDns string
    DNS server set for the NIC.
    computedGateway string
    Default gateway set for the NIC.
    computedIp string
    IP of the virtual machine on this network.
    computedMac string
    MAC of the virtual machine on this network.
    computedMethod string
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    computedModel string
    Nic model driver.
    computedPhysicalDevice string
    Physical device hosting the virtual network.
    computedSecurityGroups number[]
    List of security group IDs to use on the virtual.
    computedVirtioQueues string
    Virtio multi-queue size.
    network string
    network name
    networkId number
    ID of the image attached to the virtual machine.
    nicId number
    nic attachment identifier
    computed_dns str
    DNS server set for the NIC.
    computed_gateway str
    Default gateway set for the NIC.
    computed_ip str
    IP of the virtual machine on this network.
    computed_mac str
    MAC of the virtual machine on this network.
    computed_method str
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    computed_model str
    Nic model driver.
    computed_physical_device str
    Physical device hosting the virtual network.
    computed_security_groups Sequence[float]
    List of security group IDs to use on the virtual.
    computed_virtio_queues str
    Virtio multi-queue size.
    network str
    network name
    network_id float
    ID of the image attached to the virtual machine.
    nic_id float
    nic attachment identifier
    computedDns String
    DNS server set for the NIC.
    computedGateway String
    Default gateway set for the NIC.
    computedIp String
    IP of the virtual machine on this network.
    computedMac String
    MAC of the virtual machine on this network.
    computedMethod String
    Method of obtaining IP addresses (empty or static, dhcp, skip).
    computedModel String
    Nic model driver.
    computedPhysicalDevice String
    Physical device hosting the virtual network.
    computedSecurityGroups List<Number>
    List of security group IDs to use on the virtual.
    computedVirtioQueues String
    Virtio multi-queue size.
    network String
    network name
    networkId Number
    ID of the image attached to the virtual machine.
    nicId Number
    nic attachment identifier

    VirtualMachineTemplateSection, VirtualMachineTemplateSectionArgs

    Name string
    The vector name.
    Elements Dictionary<string, string>
    Collection of custom tags.
    Name string
    The vector name.
    Elements map[string]string
    Collection of custom tags.
    name String
    The vector name.
    elements Map<String,String>
    Collection of custom tags.
    name string
    The vector name.
    elements {[key: string]: string}
    Collection of custom tags.
    name str
    The vector name.
    elements Mapping[str, str]
    Collection of custom tags.
    name String
    The vector name.
    elements Map<String>
    Collection of custom tags.

    VirtualMachineTimeouts, VirtualMachineTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    VirtualMachineVmgroup, VirtualMachineVmgroupArgs

    Role string
    role of the VM group to use.
    VmgroupId double
    ID of the VM group to use.
    Role string
    role of the VM group to use.
    VmgroupId float64
    ID of the VM group to use.
    role String
    role of the VM group to use.
    vmgroupId Double
    ID of the VM group to use.
    role string
    role of the VM group to use.
    vmgroupId number
    ID of the VM group to use.
    role str
    role of the VM group to use.
    vmgroup_id float
    ID of the VM group to use.
    role String
    role of the VM group to use.
    vmgroupId Number
    ID of the VM group to use.

    Import

    opennebula_virtual_machine can be imported using its ID:

    $ pulumi import opennebula:index/virtualMachine:VirtualMachine example 123
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    opennebula opennebula/terraform-provider-opennebula
    License
    Notes
    This Pulumi package is based on the opennebula Terraform Provider.
    opennebula logo
    opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula