1. Packages
  2. Libvirt Provider
  3. API Docs
  4. Domain
libvirt 0.8.3 published on Tuesday, Mar 4, 2025 by dmacvicar

libvirt.Domain

Explore with Pulumi AI

Manages a VM domain resource within libvirt. For more information see the official documentation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as libvirt from "@pulumi/libvirt";

const _default = new libvirt.Domain("default", {});
Copy
import pulumi
import pulumi_libvirt as libvirt

default = libvirt.Domain("default")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/libvirt/libvirt"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := libvirt.NewDomain(ctx, "default", nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Libvirt = Pulumi.Libvirt;

return await Deployment.RunAsync(() => 
{
    var @default = new Libvirt.Domain("default");

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.libvirt.Domain;
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) {
        var default_ = new Domain("default");

    }
}
Copy
resources:
  default:
    type: libvirt:Domain
Copy

Create Domain Resource

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

Constructor syntax

new Domain(name: string, args?: DomainArgs, opts?: CustomResourceOptions);
@overload
def Domain(resource_name: str,
           args: Optional[DomainArgs] = None,
           opts: Optional[ResourceOptions] = None)

@overload
def Domain(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           arch: Optional[str] = None,
           autostart: Optional[bool] = None,
           boot_devices: Optional[Sequence[DomainBootDeviceArgs]] = None,
           cloudinit: Optional[str] = None,
           cmdlines: Optional[Sequence[Mapping[str, str]]] = None,
           consoles: Optional[Sequence[DomainConsoleArgs]] = None,
           coreos_ignition: Optional[str] = None,
           cpu: Optional[DomainCpuArgs] = None,
           description: Optional[str] = None,
           disks: Optional[Sequence[DomainDiskArgs]] = None,
           domain_id: Optional[str] = None,
           emulator: Optional[str] = None,
           filesystems: Optional[Sequence[DomainFilesystemArgs]] = None,
           firmware: Optional[str] = None,
           fw_cfg_name: Optional[str] = None,
           graphics: Optional[DomainGraphicsArgs] = None,
           initrd: Optional[str] = None,
           kernel: Optional[str] = None,
           machine: Optional[str] = None,
           memory: Optional[float] = None,
           metadata: Optional[str] = None,
           name: Optional[str] = None,
           network_interfaces: Optional[Sequence[DomainNetworkInterfaceArgs]] = None,
           nvram: Optional[DomainNvramArgs] = None,
           qemu_agent: Optional[bool] = None,
           running: Optional[bool] = None,
           timeouts: Optional[DomainTimeoutsArgs] = None,
           tpm: Optional[DomainTpmArgs] = None,
           type: Optional[str] = None,
           vcpu: Optional[float] = None,
           video: Optional[DomainVideoArgs] = None,
           xml: Optional[DomainXmlArgs] = None)
func NewDomain(ctx *Context, name string, args *DomainArgs, opts ...ResourceOption) (*Domain, error)
public Domain(string name, DomainArgs? args = null, CustomResourceOptions? opts = null)
public Domain(String name, DomainArgs args)
public Domain(String name, DomainArgs args, CustomResourceOptions options)
type: libvirt:Domain
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args DomainArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args DomainArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args DomainArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args DomainArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DomainArgs
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 domainResource = new Libvirt.Domain("domainResource", new()
{
    Arch = "string",
    Autostart = false,
    BootDevices = new[]
    {
        new Libvirt.Inputs.DomainBootDeviceArgs
        {
            Devs = new[]
            {
                "string",
            },
        },
    },
    Cloudinit = "string",
    Cmdlines = new[]
    {
        
        {
            { "string", "string" },
        },
    },
    Consoles = new[]
    {
        new Libvirt.Inputs.DomainConsoleArgs
        {
            TargetPort = "string",
            Type = "string",
            SourceHost = "string",
            SourcePath = "string",
            SourceService = "string",
            TargetType = "string",
        },
    },
    CoreosIgnition = "string",
    Cpu = new Libvirt.Inputs.DomainCpuArgs
    {
        Mode = "string",
    },
    Description = "string",
    Disks = new[]
    {
        new Libvirt.Inputs.DomainDiskArgs
        {
            BlockDevice = "string",
            File = "string",
            Scsi = false,
            Url = "string",
            VolumeId = "string",
            Wwn = "string",
        },
    },
    DomainId = "string",
    Emulator = "string",
    Filesystems = new[]
    {
        new Libvirt.Inputs.DomainFilesystemArgs
        {
            Source = "string",
            Target = "string",
            Accessmode = "string",
            Readonly = false,
        },
    },
    Firmware = "string",
    FwCfgName = "string",
    Graphics = new Libvirt.Inputs.DomainGraphicsArgs
    {
        Autoport = false,
        ListenAddress = "string",
        ListenType = "string",
        Type = "string",
        Websocket = 0,
    },
    Initrd = "string",
    Kernel = "string",
    Machine = "string",
    Memory = 0,
    Metadata = "string",
    Name = "string",
    NetworkInterfaces = new[]
    {
        new Libvirt.Inputs.DomainNetworkInterfaceArgs
        {
            Addresses = new[]
            {
                "string",
            },
            Bridge = "string",
            Hostname = "string",
            Mac = "string",
            Macvtap = "string",
            NetworkId = "string",
            NetworkName = "string",
            Passthrough = "string",
            Private = "string",
            Vepa = "string",
            WaitForLease = false,
        },
    },
    Nvram = new Libvirt.Inputs.DomainNvramArgs
    {
        File = "string",
        Template = "string",
    },
    QemuAgent = false,
    Running = false,
    Timeouts = new Libvirt.Inputs.DomainTimeoutsArgs
    {
        Create = "string",
    },
    Tpm = new Libvirt.Inputs.DomainTpmArgs
    {
        BackendDevicePath = "string",
        BackendEncryptionSecret = "string",
        BackendPersistentState = false,
        BackendType = "string",
        BackendVersion = "string",
        Model = "string",
    },
    Type = "string",
    Vcpu = 0,
    Video = new Libvirt.Inputs.DomainVideoArgs
    {
        Type = "string",
    },
    Xml = new Libvirt.Inputs.DomainXmlArgs
    {
        Xslt = "string",
    },
});
Copy
example, err := libvirt.NewDomain(ctx, "domainResource", &libvirt.DomainArgs{
	Arch:      pulumi.String("string"),
	Autostart: pulumi.Bool(false),
	BootDevices: libvirt.DomainBootDeviceArray{
		&libvirt.DomainBootDeviceArgs{
			Devs: pulumi.StringArray{
				pulumi.String("string"),
			},
		},
	},
	Cloudinit: pulumi.String("string"),
	Cmdlines: pulumi.StringMapArray{
		pulumi.StringMap{
			"string": pulumi.String("string"),
		},
	},
	Consoles: libvirt.DomainConsoleArray{
		&libvirt.DomainConsoleArgs{
			TargetPort:    pulumi.String("string"),
			Type:          pulumi.String("string"),
			SourceHost:    pulumi.String("string"),
			SourcePath:    pulumi.String("string"),
			SourceService: pulumi.String("string"),
			TargetType:    pulumi.String("string"),
		},
	},
	CoreosIgnition: pulumi.String("string"),
	Cpu: &libvirt.DomainCpuArgs{
		Mode: pulumi.String("string"),
	},
	Description: pulumi.String("string"),
	Disks: libvirt.DomainDiskArray{
		&libvirt.DomainDiskArgs{
			BlockDevice: pulumi.String("string"),
			File:        pulumi.String("string"),
			Scsi:        pulumi.Bool(false),
			Url:         pulumi.String("string"),
			VolumeId:    pulumi.String("string"),
			Wwn:         pulumi.String("string"),
		},
	},
	DomainId: pulumi.String("string"),
	Emulator: pulumi.String("string"),
	Filesystems: libvirt.DomainFilesystemArray{
		&libvirt.DomainFilesystemArgs{
			Source:     pulumi.String("string"),
			Target:     pulumi.String("string"),
			Accessmode: pulumi.String("string"),
			Readonly:   pulumi.Bool(false),
		},
	},
	Firmware:  pulumi.String("string"),
	FwCfgName: pulumi.String("string"),
	Graphics: &libvirt.DomainGraphicsArgs{
		Autoport:      pulumi.Bool(false),
		ListenAddress: pulumi.String("string"),
		ListenType:    pulumi.String("string"),
		Type:          pulumi.String("string"),
		Websocket:     pulumi.Float64(0),
	},
	Initrd:   pulumi.String("string"),
	Kernel:   pulumi.String("string"),
	Machine:  pulumi.String("string"),
	Memory:   pulumi.Float64(0),
	Metadata: pulumi.String("string"),
	Name:     pulumi.String("string"),
	NetworkInterfaces: libvirt.DomainNetworkInterfaceArray{
		&libvirt.DomainNetworkInterfaceArgs{
			Addresses: pulumi.StringArray{
				pulumi.String("string"),
			},
			Bridge:       pulumi.String("string"),
			Hostname:     pulumi.String("string"),
			Mac:          pulumi.String("string"),
			Macvtap:      pulumi.String("string"),
			NetworkId:    pulumi.String("string"),
			NetworkName:  pulumi.String("string"),
			Passthrough:  pulumi.String("string"),
			Private:      pulumi.String("string"),
			Vepa:         pulumi.String("string"),
			WaitForLease: pulumi.Bool(false),
		},
	},
	Nvram: &libvirt.DomainNvramArgs{
		File:     pulumi.String("string"),
		Template: pulumi.String("string"),
	},
	QemuAgent: pulumi.Bool(false),
	Running:   pulumi.Bool(false),
	Timeouts: &libvirt.DomainTimeoutsArgs{
		Create: pulumi.String("string"),
	},
	Tpm: &libvirt.DomainTpmArgs{
		BackendDevicePath:       pulumi.String("string"),
		BackendEncryptionSecret: pulumi.String("string"),
		BackendPersistentState:  pulumi.Bool(false),
		BackendType:             pulumi.String("string"),
		BackendVersion:          pulumi.String("string"),
		Model:                   pulumi.String("string"),
	},
	Type: pulumi.String("string"),
	Vcpu: pulumi.Float64(0),
	Video: &libvirt.DomainVideoArgs{
		Type: pulumi.String("string"),
	},
	Xml: &libvirt.DomainXmlArgs{
		Xslt: pulumi.String("string"),
	},
})
Copy
var domainResource = new Domain("domainResource", DomainArgs.builder()
    .arch("string")
    .autostart(false)
    .bootDevices(DomainBootDeviceArgs.builder()
        .devs("string")
        .build())
    .cloudinit("string")
    .cmdlines(Map.of("string", "string"))
    .consoles(DomainConsoleArgs.builder()
        .targetPort("string")
        .type("string")
        .sourceHost("string")
        .sourcePath("string")
        .sourceService("string")
        .targetType("string")
        .build())
    .coreosIgnition("string")
    .cpu(DomainCpuArgs.builder()
        .mode("string")
        .build())
    .description("string")
    .disks(DomainDiskArgs.builder()
        .blockDevice("string")
        .file("string")
        .scsi(false)
        .url("string")
        .volumeId("string")
        .wwn("string")
        .build())
    .domainId("string")
    .emulator("string")
    .filesystems(DomainFilesystemArgs.builder()
        .source("string")
        .target("string")
        .accessmode("string")
        .readonly(false)
        .build())
    .firmware("string")
    .fwCfgName("string")
    .graphics(DomainGraphicsArgs.builder()
        .autoport(false)
        .listenAddress("string")
        .listenType("string")
        .type("string")
        .websocket(0)
        .build())
    .initrd("string")
    .kernel("string")
    .machine("string")
    .memory(0)
    .metadata("string")
    .name("string")
    .networkInterfaces(DomainNetworkInterfaceArgs.builder()
        .addresses("string")
        .bridge("string")
        .hostname("string")
        .mac("string")
        .macvtap("string")
        .networkId("string")
        .networkName("string")
        .passthrough("string")
        .private_("string")
        .vepa("string")
        .waitForLease(false)
        .build())
    .nvram(DomainNvramArgs.builder()
        .file("string")
        .template("string")
        .build())
    .qemuAgent(false)
    .running(false)
    .timeouts(DomainTimeoutsArgs.builder()
        .create("string")
        .build())
    .tpm(DomainTpmArgs.builder()
        .backendDevicePath("string")
        .backendEncryptionSecret("string")
        .backendPersistentState(false)
        .backendType("string")
        .backendVersion("string")
        .model("string")
        .build())
    .type("string")
    .vcpu(0)
    .video(DomainVideoArgs.builder()
        .type("string")
        .build())
    .xml(DomainXmlArgs.builder()
        .xslt("string")
        .build())
    .build());
Copy
domain_resource = libvirt.Domain("domainResource",
    arch="string",
    autostart=False,
    boot_devices=[{
        "devs": ["string"],
    }],
    cloudinit="string",
    cmdlines=[{
        "string": "string",
    }],
    consoles=[{
        "target_port": "string",
        "type": "string",
        "source_host": "string",
        "source_path": "string",
        "source_service": "string",
        "target_type": "string",
    }],
    coreos_ignition="string",
    cpu={
        "mode": "string",
    },
    description="string",
    disks=[{
        "block_device": "string",
        "file": "string",
        "scsi": False,
        "url": "string",
        "volume_id": "string",
        "wwn": "string",
    }],
    domain_id="string",
    emulator="string",
    filesystems=[{
        "source": "string",
        "target": "string",
        "accessmode": "string",
        "readonly": False,
    }],
    firmware="string",
    fw_cfg_name="string",
    graphics={
        "autoport": False,
        "listen_address": "string",
        "listen_type": "string",
        "type": "string",
        "websocket": 0,
    },
    initrd="string",
    kernel="string",
    machine="string",
    memory=0,
    metadata="string",
    name="string",
    network_interfaces=[{
        "addresses": ["string"],
        "bridge": "string",
        "hostname": "string",
        "mac": "string",
        "macvtap": "string",
        "network_id": "string",
        "network_name": "string",
        "passthrough": "string",
        "private": "string",
        "vepa": "string",
        "wait_for_lease": False,
    }],
    nvram={
        "file": "string",
        "template": "string",
    },
    qemu_agent=False,
    running=False,
    timeouts={
        "create": "string",
    },
    tpm={
        "backend_device_path": "string",
        "backend_encryption_secret": "string",
        "backend_persistent_state": False,
        "backend_type": "string",
        "backend_version": "string",
        "model": "string",
    },
    type="string",
    vcpu=0,
    video={
        "type": "string",
    },
    xml={
        "xslt": "string",
    })
Copy
const domainResource = new libvirt.Domain("domainResource", {
    arch: "string",
    autostart: false,
    bootDevices: [{
        devs: ["string"],
    }],
    cloudinit: "string",
    cmdlines: [{
        string: "string",
    }],
    consoles: [{
        targetPort: "string",
        type: "string",
        sourceHost: "string",
        sourcePath: "string",
        sourceService: "string",
        targetType: "string",
    }],
    coreosIgnition: "string",
    cpu: {
        mode: "string",
    },
    description: "string",
    disks: [{
        blockDevice: "string",
        file: "string",
        scsi: false,
        url: "string",
        volumeId: "string",
        wwn: "string",
    }],
    domainId: "string",
    emulator: "string",
    filesystems: [{
        source: "string",
        target: "string",
        accessmode: "string",
        readonly: false,
    }],
    firmware: "string",
    fwCfgName: "string",
    graphics: {
        autoport: false,
        listenAddress: "string",
        listenType: "string",
        type: "string",
        websocket: 0,
    },
    initrd: "string",
    kernel: "string",
    machine: "string",
    memory: 0,
    metadata: "string",
    name: "string",
    networkInterfaces: [{
        addresses: ["string"],
        bridge: "string",
        hostname: "string",
        mac: "string",
        macvtap: "string",
        networkId: "string",
        networkName: "string",
        passthrough: "string",
        "private": "string",
        vepa: "string",
        waitForLease: false,
    }],
    nvram: {
        file: "string",
        template: "string",
    },
    qemuAgent: false,
    running: false,
    timeouts: {
        create: "string",
    },
    tpm: {
        backendDevicePath: "string",
        backendEncryptionSecret: "string",
        backendPersistentState: false,
        backendType: "string",
        backendVersion: "string",
        model: "string",
    },
    type: "string",
    vcpu: 0,
    video: {
        type: "string",
    },
    xml: {
        xslt: "string",
    },
});
Copy
type: libvirt:Domain
properties:
    arch: string
    autostart: false
    bootDevices:
        - devs:
            - string
    cloudinit: string
    cmdlines:
        - string: string
    consoles:
        - sourceHost: string
          sourcePath: string
          sourceService: string
          targetPort: string
          targetType: string
          type: string
    coreosIgnition: string
    cpu:
        mode: string
    description: string
    disks:
        - blockDevice: string
          file: string
          scsi: false
          url: string
          volumeId: string
          wwn: string
    domainId: string
    emulator: string
    filesystems:
        - accessmode: string
          readonly: false
          source: string
          target: string
    firmware: string
    fwCfgName: string
    graphics:
        autoport: false
        listenAddress: string
        listenType: string
        type: string
        websocket: 0
    initrd: string
    kernel: string
    machine: string
    memory: 0
    metadata: string
    name: string
    networkInterfaces:
        - addresses:
            - string
          bridge: string
          hostname: string
          mac: string
          macvtap: string
          networkId: string
          networkName: string
          passthrough: string
          private: string
          vepa: string
          waitForLease: false
    nvram:
        file: string
        template: string
    qemuAgent: false
    running: false
    timeouts:
        create: string
    tpm:
        backendDevicePath: string
        backendEncryptionSecret: string
        backendPersistentState: false
        backendType: string
        backendVersion: string
        model: string
    type: string
    vcpu: 0
    video:
        type: string
    xml:
        xslt: string
Copy

Domain 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 Domain resource accepts the following input properties:

Arch string
The architecture for the VM (probably x86_64 or i686), you normally won't need to set this unless you are building a special VM
Autostart bool
Set to true to start the domain on host boot up. If not specified false is assumed.
BootDevices List<DomainBootDevice>
A list of devices (dev) which defines boot order. Example below.
Cloudinit string
The libvirt.CloudinitDisk disk that has to be used by the domain. This is going to be attached as a CDROM ISO. Changing the cloud-init won't cause the domain to be recreated, however the change will have effect on the next reboot.
Cmdlines List<ImmutableDictionary<string, string>>
Consoles List<DomainConsole>
CoreosIgnition string
The libvirt.Ignition resource that is to be used by the CoreOS domain.
Cpu DomainCpu
Configures CPU mode. See below for more details.
Description string
The description for domain. Changing this forces a new resource to be created. This data is not used by libvirt in any way, it can contain any information the user wants.
Disks List<DomainDisk>
An array of one or more disks to attach to the domain. The disk object structure is documented below.
DomainId string
a unique identifier for the resource.

  • network_interface.<N>.addresses.<M> - M-th IP address assigned to the N-th network interface.
Emulator string
The path of the emulator to use
Filesystems List<DomainFilesystem>
An array of one or more host filesystems to attach to the domain. The filesystem object structure is documented below.
Firmware string
FwCfgName string
The name of the firmware config path where ignition file is stored: default is opt/com.coreos/config. If you are using Flatcar Linux, the value is opt/org.flatcar-linux/config.
Graphics DomainGraphics
Initrd string
Kernel string
Machine string
The machine type, you normally won't need to set this unless you are running on a platform that defaults to the wrong machine type for your template
Memory double
The amount of memory in MiB. If not specified the domain will be created with 512 MiB of memory be used.
Metadata string
Name string
A unique name for the resource, required by libvirt. Changing this forces a new resource to be created.
NetworkInterfaces List<DomainNetworkInterface>
An array of one or more network interfaces to attach to the domain. The network_interface object structure is documented below.
Nvram DomainNvram
QemuAgent bool
By default is disabled, set to true for enabling it. More info qemu-agent.
Running bool
Use false to turn off the instance. If not specified, true is assumed and the instance, if stopped, will be started at next apply.
Timeouts DomainTimeouts
Tpm DomainTpm
TPM device to attach to the domain. The tpm object structure is documented below.
Type string
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here
Vcpu double
The amount of virtual CPUs. If not specified, a single CPU will be created.
Video DomainVideo
Xml DomainXml
Arch string
The architecture for the VM (probably x86_64 or i686), you normally won't need to set this unless you are building a special VM
Autostart bool
Set to true to start the domain on host boot up. If not specified false is assumed.
BootDevices []DomainBootDeviceArgs
A list of devices (dev) which defines boot order. Example below.
Cloudinit string
The libvirt.CloudinitDisk disk that has to be used by the domain. This is going to be attached as a CDROM ISO. Changing the cloud-init won't cause the domain to be recreated, however the change will have effect on the next reboot.
Cmdlines []map[string]string
Consoles []DomainConsoleArgs
CoreosIgnition string
The libvirt.Ignition resource that is to be used by the CoreOS domain.
Cpu DomainCpuArgs
Configures CPU mode. See below for more details.
Description string
The description for domain. Changing this forces a new resource to be created. This data is not used by libvirt in any way, it can contain any information the user wants.
Disks []DomainDiskArgs
An array of one or more disks to attach to the domain. The disk object structure is documented below.
DomainId string
a unique identifier for the resource.

  • network_interface.<N>.addresses.<M> - M-th IP address assigned to the N-th network interface.
Emulator string
The path of the emulator to use
Filesystems []DomainFilesystemArgs
An array of one or more host filesystems to attach to the domain. The filesystem object structure is documented below.
Firmware string
FwCfgName string
The name of the firmware config path where ignition file is stored: default is opt/com.coreos/config. If you are using Flatcar Linux, the value is opt/org.flatcar-linux/config.
Graphics DomainGraphicsArgs
Initrd string
Kernel string
Machine string
The machine type, you normally won't need to set this unless you are running on a platform that defaults to the wrong machine type for your template
Memory float64
The amount of memory in MiB. If not specified the domain will be created with 512 MiB of memory be used.
Metadata string
Name string
A unique name for the resource, required by libvirt. Changing this forces a new resource to be created.
NetworkInterfaces []DomainNetworkInterfaceArgs
An array of one or more network interfaces to attach to the domain. The network_interface object structure is documented below.
Nvram DomainNvramArgs
QemuAgent bool
By default is disabled, set to true for enabling it. More info qemu-agent.
Running bool
Use false to turn off the instance. If not specified, true is assumed and the instance, if stopped, will be started at next apply.
Timeouts DomainTimeoutsArgs
Tpm DomainTpmArgs
TPM device to attach to the domain. The tpm object structure is documented below.
Type string
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here
Vcpu float64
The amount of virtual CPUs. If not specified, a single CPU will be created.
Video DomainVideoArgs
Xml DomainXmlArgs
arch String
The architecture for the VM (probably x86_64 or i686), you normally won't need to set this unless you are building a special VM
autostart Boolean
Set to true to start the domain on host boot up. If not specified false is assumed.
bootDevices List<DomainBootDevice>
A list of devices (dev) which defines boot order. Example below.
cloudinit String
The libvirt.CloudinitDisk disk that has to be used by the domain. This is going to be attached as a CDROM ISO. Changing the cloud-init won't cause the domain to be recreated, however the change will have effect on the next reboot.
cmdlines List<Map<String,String>>
consoles List<DomainConsole>
coreosIgnition String
The libvirt.Ignition resource that is to be used by the CoreOS domain.
cpu DomainCpu
Configures CPU mode. See below for more details.
description String
The description for domain. Changing this forces a new resource to be created. This data is not used by libvirt in any way, it can contain any information the user wants.
disks List<DomainDisk>
An array of one or more disks to attach to the domain. The disk object structure is documented below.
domainId String
a unique identifier for the resource.

  • network_interface.<N>.addresses.<M> - M-th IP address assigned to the N-th network interface.
emulator String
The path of the emulator to use
filesystems List<DomainFilesystem>
An array of one or more host filesystems to attach to the domain. The filesystem object structure is documented below.
firmware String
fwCfgName String
The name of the firmware config path where ignition file is stored: default is opt/com.coreos/config. If you are using Flatcar Linux, the value is opt/org.flatcar-linux/config.
graphics DomainGraphics
initrd String
kernel String
machine String
The machine type, you normally won't need to set this unless you are running on a platform that defaults to the wrong machine type for your template
memory Double
The amount of memory in MiB. If not specified the domain will be created with 512 MiB of memory be used.
metadata String
name String
A unique name for the resource, required by libvirt. Changing this forces a new resource to be created.
networkInterfaces List<DomainNetworkInterface>
An array of one or more network interfaces to attach to the domain. The network_interface object structure is documented below.
nvram DomainNvram
qemuAgent Boolean
By default is disabled, set to true for enabling it. More info qemu-agent.
running Boolean
Use false to turn off the instance. If not specified, true is assumed and the instance, if stopped, will be started at next apply.
timeouts DomainTimeouts
tpm DomainTpm
TPM device to attach to the domain. The tpm object structure is documented below.
type String
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here
vcpu Double
The amount of virtual CPUs. If not specified, a single CPU will be created.
video DomainVideo
xml DomainXml
arch string
The architecture for the VM (probably x86_64 or i686), you normally won't need to set this unless you are building a special VM
autostart boolean
Set to true to start the domain on host boot up. If not specified false is assumed.
bootDevices DomainBootDevice[]
A list of devices (dev) which defines boot order. Example below.
cloudinit string
The libvirt.CloudinitDisk disk that has to be used by the domain. This is going to be attached as a CDROM ISO. Changing the cloud-init won't cause the domain to be recreated, however the change will have effect on the next reboot.
cmdlines {[key: string]: string}[]
consoles DomainConsole[]
coreosIgnition string
The libvirt.Ignition resource that is to be used by the CoreOS domain.
cpu DomainCpu
Configures CPU mode. See below for more details.
description string
The description for domain. Changing this forces a new resource to be created. This data is not used by libvirt in any way, it can contain any information the user wants.
disks DomainDisk[]
An array of one or more disks to attach to the domain. The disk object structure is documented below.
domainId string
a unique identifier for the resource.

  • network_interface.<N>.addresses.<M> - M-th IP address assigned to the N-th network interface.
emulator string
The path of the emulator to use
filesystems DomainFilesystem[]
An array of one or more host filesystems to attach to the domain. The filesystem object structure is documented below.
firmware string
fwCfgName string
The name of the firmware config path where ignition file is stored: default is opt/com.coreos/config. If you are using Flatcar Linux, the value is opt/org.flatcar-linux/config.
graphics DomainGraphics
initrd string
kernel string
machine string
The machine type, you normally won't need to set this unless you are running on a platform that defaults to the wrong machine type for your template
memory number
The amount of memory in MiB. If not specified the domain will be created with 512 MiB of memory be used.
metadata string
name string
A unique name for the resource, required by libvirt. Changing this forces a new resource to be created.
networkInterfaces DomainNetworkInterface[]
An array of one or more network interfaces to attach to the domain. The network_interface object structure is documented below.
nvram DomainNvram
qemuAgent boolean
By default is disabled, set to true for enabling it. More info qemu-agent.
running boolean
Use false to turn off the instance. If not specified, true is assumed and the instance, if stopped, will be started at next apply.
timeouts DomainTimeouts
tpm DomainTpm
TPM device to attach to the domain. The tpm object structure is documented below.
type string
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here
vcpu number
The amount of virtual CPUs. If not specified, a single CPU will be created.
video DomainVideo
xml DomainXml
arch str
The architecture for the VM (probably x86_64 or i686), you normally won't need to set this unless you are building a special VM
autostart bool
Set to true to start the domain on host boot up. If not specified false is assumed.
boot_devices Sequence[DomainBootDeviceArgs]
A list of devices (dev) which defines boot order. Example below.
cloudinit str
The libvirt.CloudinitDisk disk that has to be used by the domain. This is going to be attached as a CDROM ISO. Changing the cloud-init won't cause the domain to be recreated, however the change will have effect on the next reboot.
cmdlines Sequence[Mapping[str, str]]
consoles Sequence[DomainConsoleArgs]
coreos_ignition str
The libvirt.Ignition resource that is to be used by the CoreOS domain.
cpu DomainCpuArgs
Configures CPU mode. See below for more details.
description str
The description for domain. Changing this forces a new resource to be created. This data is not used by libvirt in any way, it can contain any information the user wants.
disks Sequence[DomainDiskArgs]
An array of one or more disks to attach to the domain. The disk object structure is documented below.
domain_id str
a unique identifier for the resource.

  • network_interface.<N>.addresses.<M> - M-th IP address assigned to the N-th network interface.
emulator str
The path of the emulator to use
filesystems Sequence[DomainFilesystemArgs]
An array of one or more host filesystems to attach to the domain. The filesystem object structure is documented below.
firmware str
fw_cfg_name str
The name of the firmware config path where ignition file is stored: default is opt/com.coreos/config. If you are using Flatcar Linux, the value is opt/org.flatcar-linux/config.
graphics DomainGraphicsArgs
initrd str
kernel str
machine str
The machine type, you normally won't need to set this unless you are running on a platform that defaults to the wrong machine type for your template
memory float
The amount of memory in MiB. If not specified the domain will be created with 512 MiB of memory be used.
metadata str
name str
A unique name for the resource, required by libvirt. Changing this forces a new resource to be created.
network_interfaces Sequence[DomainNetworkInterfaceArgs]
An array of one or more network interfaces to attach to the domain. The network_interface object structure is documented below.
nvram DomainNvramArgs
qemu_agent bool
By default is disabled, set to true for enabling it. More info qemu-agent.
running bool
Use false to turn off the instance. If not specified, true is assumed and the instance, if stopped, will be started at next apply.
timeouts DomainTimeoutsArgs
tpm DomainTpmArgs
TPM device to attach to the domain. The tpm object structure is documented below.
type str
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here
vcpu float
The amount of virtual CPUs. If not specified, a single CPU will be created.
video DomainVideoArgs
xml DomainXmlArgs
arch String
The architecture for the VM (probably x86_64 or i686), you normally won't need to set this unless you are building a special VM
autostart Boolean
Set to true to start the domain on host boot up. If not specified false is assumed.
bootDevices List<Property Map>
A list of devices (dev) which defines boot order. Example below.
cloudinit String
The libvirt.CloudinitDisk disk that has to be used by the domain. This is going to be attached as a CDROM ISO. Changing the cloud-init won't cause the domain to be recreated, however the change will have effect on the next reboot.
cmdlines List<Map<String>>
consoles List<Property Map>
coreosIgnition String
The libvirt.Ignition resource that is to be used by the CoreOS domain.
cpu Property Map
Configures CPU mode. See below for more details.
description String
The description for domain. Changing this forces a new resource to be created. This data is not used by libvirt in any way, it can contain any information the user wants.
disks List<Property Map>
An array of one or more disks to attach to the domain. The disk object structure is documented below.
domainId String
a unique identifier for the resource.

  • network_interface.<N>.addresses.<M> - M-th IP address assigned to the N-th network interface.
emulator String
The path of the emulator to use
filesystems List<Property Map>
An array of one or more host filesystems to attach to the domain. The filesystem object structure is documented below.
firmware String
fwCfgName String
The name of the firmware config path where ignition file is stored: default is opt/com.coreos/config. If you are using Flatcar Linux, the value is opt/org.flatcar-linux/config.
graphics Property Map
initrd String
kernel String
machine String
The machine type, you normally won't need to set this unless you are running on a platform that defaults to the wrong machine type for your template
memory Number
The amount of memory in MiB. If not specified the domain will be created with 512 MiB of memory be used.
metadata String
name String
A unique name for the resource, required by libvirt. Changing this forces a new resource to be created.
networkInterfaces List<Property Map>
An array of one or more network interfaces to attach to the domain. The network_interface object structure is documented below.
nvram Property Map
qemuAgent Boolean
By default is disabled, set to true for enabling it. More info qemu-agent.
running Boolean
Use false to turn off the instance. If not specified, true is assumed and the instance, if stopped, will be started at next apply.
timeouts Property Map
tpm Property Map
TPM device to attach to the domain. The tpm object structure is documented below.
type String
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here
vcpu Number
The amount of virtual CPUs. If not specified, a single CPU will be created.
video Property Map
xml Property Map

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Domain Resource

Get an existing Domain 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?: DomainState, opts?: CustomResourceOptions): Domain
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arch: Optional[str] = None,
        autostart: Optional[bool] = None,
        boot_devices: Optional[Sequence[DomainBootDeviceArgs]] = None,
        cloudinit: Optional[str] = None,
        cmdlines: Optional[Sequence[Mapping[str, str]]] = None,
        consoles: Optional[Sequence[DomainConsoleArgs]] = None,
        coreos_ignition: Optional[str] = None,
        cpu: Optional[DomainCpuArgs] = None,
        description: Optional[str] = None,
        disks: Optional[Sequence[DomainDiskArgs]] = None,
        domain_id: Optional[str] = None,
        emulator: Optional[str] = None,
        filesystems: Optional[Sequence[DomainFilesystemArgs]] = None,
        firmware: Optional[str] = None,
        fw_cfg_name: Optional[str] = None,
        graphics: Optional[DomainGraphicsArgs] = None,
        initrd: Optional[str] = None,
        kernel: Optional[str] = None,
        machine: Optional[str] = None,
        memory: Optional[float] = None,
        metadata: Optional[str] = None,
        name: Optional[str] = None,
        network_interfaces: Optional[Sequence[DomainNetworkInterfaceArgs]] = None,
        nvram: Optional[DomainNvramArgs] = None,
        qemu_agent: Optional[bool] = None,
        running: Optional[bool] = None,
        timeouts: Optional[DomainTimeoutsArgs] = None,
        tpm: Optional[DomainTpmArgs] = None,
        type: Optional[str] = None,
        vcpu: Optional[float] = None,
        video: Optional[DomainVideoArgs] = None,
        xml: Optional[DomainXmlArgs] = None) -> Domain
func GetDomain(ctx *Context, name string, id IDInput, state *DomainState, opts ...ResourceOption) (*Domain, error)
public static Domain Get(string name, Input<string> id, DomainState? state, CustomResourceOptions? opts = null)
public static Domain get(String name, Output<String> id, DomainState state, CustomResourceOptions options)
resources:  _:    type: libvirt:Domain    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Arch string
The architecture for the VM (probably x86_64 or i686), you normally won't need to set this unless you are building a special VM
Autostart bool
Set to true to start the domain on host boot up. If not specified false is assumed.
BootDevices List<DomainBootDevice>
A list of devices (dev) which defines boot order. Example below.
Cloudinit string
The libvirt.CloudinitDisk disk that has to be used by the domain. This is going to be attached as a CDROM ISO. Changing the cloud-init won't cause the domain to be recreated, however the change will have effect on the next reboot.
Cmdlines List<ImmutableDictionary<string, string>>
Consoles List<DomainConsole>
CoreosIgnition string
The libvirt.Ignition resource that is to be used by the CoreOS domain.
Cpu DomainCpu
Configures CPU mode. See below for more details.
Description string
The description for domain. Changing this forces a new resource to be created. This data is not used by libvirt in any way, it can contain any information the user wants.
Disks List<DomainDisk>
An array of one or more disks to attach to the domain. The disk object structure is documented below.
DomainId string
a unique identifier for the resource.

  • network_interface.<N>.addresses.<M> - M-th IP address assigned to the N-th network interface.
Emulator string
The path of the emulator to use
Filesystems List<DomainFilesystem>
An array of one or more host filesystems to attach to the domain. The filesystem object structure is documented below.
Firmware string
FwCfgName string
The name of the firmware config path where ignition file is stored: default is opt/com.coreos/config. If you are using Flatcar Linux, the value is opt/org.flatcar-linux/config.
Graphics DomainGraphics
Initrd string
Kernel string
Machine string
The machine type, you normally won't need to set this unless you are running on a platform that defaults to the wrong machine type for your template
Memory double
The amount of memory in MiB. If not specified the domain will be created with 512 MiB of memory be used.
Metadata string
Name string
A unique name for the resource, required by libvirt. Changing this forces a new resource to be created.
NetworkInterfaces List<DomainNetworkInterface>
An array of one or more network interfaces to attach to the domain. The network_interface object structure is documented below.
Nvram DomainNvram
QemuAgent bool
By default is disabled, set to true for enabling it. More info qemu-agent.
Running bool
Use false to turn off the instance. If not specified, true is assumed and the instance, if stopped, will be started at next apply.
Timeouts DomainTimeouts
Tpm DomainTpm
TPM device to attach to the domain. The tpm object structure is documented below.
Type string
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here
Vcpu double
The amount of virtual CPUs. If not specified, a single CPU will be created.
Video DomainVideo
Xml DomainXml
Arch string
The architecture for the VM (probably x86_64 or i686), you normally won't need to set this unless you are building a special VM
Autostart bool
Set to true to start the domain on host boot up. If not specified false is assumed.
BootDevices []DomainBootDeviceArgs
A list of devices (dev) which defines boot order. Example below.
Cloudinit string
The libvirt.CloudinitDisk disk that has to be used by the domain. This is going to be attached as a CDROM ISO. Changing the cloud-init won't cause the domain to be recreated, however the change will have effect on the next reboot.
Cmdlines []map[string]string
Consoles []DomainConsoleArgs
CoreosIgnition string
The libvirt.Ignition resource that is to be used by the CoreOS domain.
Cpu DomainCpuArgs
Configures CPU mode. See below for more details.
Description string
The description for domain. Changing this forces a new resource to be created. This data is not used by libvirt in any way, it can contain any information the user wants.
Disks []DomainDiskArgs
An array of one or more disks to attach to the domain. The disk object structure is documented below.
DomainId string
a unique identifier for the resource.

  • network_interface.<N>.addresses.<M> - M-th IP address assigned to the N-th network interface.
Emulator string
The path of the emulator to use
Filesystems []DomainFilesystemArgs
An array of one or more host filesystems to attach to the domain. The filesystem object structure is documented below.
Firmware string
FwCfgName string
The name of the firmware config path where ignition file is stored: default is opt/com.coreos/config. If you are using Flatcar Linux, the value is opt/org.flatcar-linux/config.
Graphics DomainGraphicsArgs
Initrd string
Kernel string
Machine string
The machine type, you normally won't need to set this unless you are running on a platform that defaults to the wrong machine type for your template
Memory float64
The amount of memory in MiB. If not specified the domain will be created with 512 MiB of memory be used.
Metadata string
Name string
A unique name for the resource, required by libvirt. Changing this forces a new resource to be created.
NetworkInterfaces []DomainNetworkInterfaceArgs
An array of one or more network interfaces to attach to the domain. The network_interface object structure is documented below.
Nvram DomainNvramArgs
QemuAgent bool
By default is disabled, set to true for enabling it. More info qemu-agent.
Running bool
Use false to turn off the instance. If not specified, true is assumed and the instance, if stopped, will be started at next apply.
Timeouts DomainTimeoutsArgs
Tpm DomainTpmArgs
TPM device to attach to the domain. The tpm object structure is documented below.
Type string
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here
Vcpu float64
The amount of virtual CPUs. If not specified, a single CPU will be created.
Video DomainVideoArgs
Xml DomainXmlArgs
arch String
The architecture for the VM (probably x86_64 or i686), you normally won't need to set this unless you are building a special VM
autostart Boolean
Set to true to start the domain on host boot up. If not specified false is assumed.
bootDevices List<DomainBootDevice>
A list of devices (dev) which defines boot order. Example below.
cloudinit String
The libvirt.CloudinitDisk disk that has to be used by the domain. This is going to be attached as a CDROM ISO. Changing the cloud-init won't cause the domain to be recreated, however the change will have effect on the next reboot.
cmdlines List<Map<String,String>>
consoles List<DomainConsole>
coreosIgnition String
The libvirt.Ignition resource that is to be used by the CoreOS domain.
cpu DomainCpu
Configures CPU mode. See below for more details.
description String
The description for domain. Changing this forces a new resource to be created. This data is not used by libvirt in any way, it can contain any information the user wants.
disks List<DomainDisk>
An array of one or more disks to attach to the domain. The disk object structure is documented below.
domainId String
a unique identifier for the resource.

  • network_interface.<N>.addresses.<M> - M-th IP address assigned to the N-th network interface.
emulator String
The path of the emulator to use
filesystems List<DomainFilesystem>
An array of one or more host filesystems to attach to the domain. The filesystem object structure is documented below.
firmware String
fwCfgName String
The name of the firmware config path where ignition file is stored: default is opt/com.coreos/config. If you are using Flatcar Linux, the value is opt/org.flatcar-linux/config.
graphics DomainGraphics
initrd String
kernel String
machine String
The machine type, you normally won't need to set this unless you are running on a platform that defaults to the wrong machine type for your template
memory Double
The amount of memory in MiB. If not specified the domain will be created with 512 MiB of memory be used.
metadata String
name String
A unique name for the resource, required by libvirt. Changing this forces a new resource to be created.
networkInterfaces List<DomainNetworkInterface>
An array of one or more network interfaces to attach to the domain. The network_interface object structure is documented below.
nvram DomainNvram
qemuAgent Boolean
By default is disabled, set to true for enabling it. More info qemu-agent.
running Boolean
Use false to turn off the instance. If not specified, true is assumed and the instance, if stopped, will be started at next apply.
timeouts DomainTimeouts
tpm DomainTpm
TPM device to attach to the domain. The tpm object structure is documented below.
type String
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here
vcpu Double
The amount of virtual CPUs. If not specified, a single CPU will be created.
video DomainVideo
xml DomainXml
arch string
The architecture for the VM (probably x86_64 or i686), you normally won't need to set this unless you are building a special VM
autostart boolean
Set to true to start the domain on host boot up. If not specified false is assumed.
bootDevices DomainBootDevice[]
A list of devices (dev) which defines boot order. Example below.
cloudinit string
The libvirt.CloudinitDisk disk that has to be used by the domain. This is going to be attached as a CDROM ISO. Changing the cloud-init won't cause the domain to be recreated, however the change will have effect on the next reboot.
cmdlines {[key: string]: string}[]
consoles DomainConsole[]
coreosIgnition string
The libvirt.Ignition resource that is to be used by the CoreOS domain.
cpu DomainCpu
Configures CPU mode. See below for more details.
description string
The description for domain. Changing this forces a new resource to be created. This data is not used by libvirt in any way, it can contain any information the user wants.
disks DomainDisk[]
An array of one or more disks to attach to the domain. The disk object structure is documented below.
domainId string
a unique identifier for the resource.

  • network_interface.<N>.addresses.<M> - M-th IP address assigned to the N-th network interface.
emulator string
The path of the emulator to use
filesystems DomainFilesystem[]
An array of one or more host filesystems to attach to the domain. The filesystem object structure is documented below.
firmware string
fwCfgName string
The name of the firmware config path where ignition file is stored: default is opt/com.coreos/config. If you are using Flatcar Linux, the value is opt/org.flatcar-linux/config.
graphics DomainGraphics
initrd string
kernel string
machine string
The machine type, you normally won't need to set this unless you are running on a platform that defaults to the wrong machine type for your template
memory number
The amount of memory in MiB. If not specified the domain will be created with 512 MiB of memory be used.
metadata string
name string
A unique name for the resource, required by libvirt. Changing this forces a new resource to be created.
networkInterfaces DomainNetworkInterface[]
An array of one or more network interfaces to attach to the domain. The network_interface object structure is documented below.
nvram DomainNvram
qemuAgent boolean
By default is disabled, set to true for enabling it. More info qemu-agent.
running boolean
Use false to turn off the instance. If not specified, true is assumed and the instance, if stopped, will be started at next apply.
timeouts DomainTimeouts
tpm DomainTpm
TPM device to attach to the domain. The tpm object structure is documented below.
type string
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here
vcpu number
The amount of virtual CPUs. If not specified, a single CPU will be created.
video DomainVideo
xml DomainXml
arch str
The architecture for the VM (probably x86_64 or i686), you normally won't need to set this unless you are building a special VM
autostart bool
Set to true to start the domain on host boot up. If not specified false is assumed.
boot_devices Sequence[DomainBootDeviceArgs]
A list of devices (dev) which defines boot order. Example below.
cloudinit str
The libvirt.CloudinitDisk disk that has to be used by the domain. This is going to be attached as a CDROM ISO. Changing the cloud-init won't cause the domain to be recreated, however the change will have effect on the next reboot.
cmdlines Sequence[Mapping[str, str]]
consoles Sequence[DomainConsoleArgs]
coreos_ignition str
The libvirt.Ignition resource that is to be used by the CoreOS domain.
cpu DomainCpuArgs
Configures CPU mode. See below for more details.
description str
The description for domain. Changing this forces a new resource to be created. This data is not used by libvirt in any way, it can contain any information the user wants.
disks Sequence[DomainDiskArgs]
An array of one or more disks to attach to the domain. The disk object structure is documented below.
domain_id str
a unique identifier for the resource.

  • network_interface.<N>.addresses.<M> - M-th IP address assigned to the N-th network interface.
emulator str
The path of the emulator to use
filesystems Sequence[DomainFilesystemArgs]
An array of one or more host filesystems to attach to the domain. The filesystem object structure is documented below.
firmware str
fw_cfg_name str
The name of the firmware config path where ignition file is stored: default is opt/com.coreos/config. If you are using Flatcar Linux, the value is opt/org.flatcar-linux/config.
graphics DomainGraphicsArgs
initrd str
kernel str
machine str
The machine type, you normally won't need to set this unless you are running on a platform that defaults to the wrong machine type for your template
memory float
The amount of memory in MiB. If not specified the domain will be created with 512 MiB of memory be used.
metadata str
name str
A unique name for the resource, required by libvirt. Changing this forces a new resource to be created.
network_interfaces Sequence[DomainNetworkInterfaceArgs]
An array of one or more network interfaces to attach to the domain. The network_interface object structure is documented below.
nvram DomainNvramArgs
qemu_agent bool
By default is disabled, set to true for enabling it. More info qemu-agent.
running bool
Use false to turn off the instance. If not specified, true is assumed and the instance, if stopped, will be started at next apply.
timeouts DomainTimeoutsArgs
tpm DomainTpmArgs
TPM device to attach to the domain. The tpm object structure is documented below.
type str
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here
vcpu float
The amount of virtual CPUs. If not specified, a single CPU will be created.
video DomainVideoArgs
xml DomainXmlArgs
arch String
The architecture for the VM (probably x86_64 or i686), you normally won't need to set this unless you are building a special VM
autostart Boolean
Set to true to start the domain on host boot up. If not specified false is assumed.
bootDevices List<Property Map>
A list of devices (dev) which defines boot order. Example below.
cloudinit String
The libvirt.CloudinitDisk disk that has to be used by the domain. This is going to be attached as a CDROM ISO. Changing the cloud-init won't cause the domain to be recreated, however the change will have effect on the next reboot.
cmdlines List<Map<String>>
consoles List<Property Map>
coreosIgnition String
The libvirt.Ignition resource that is to be used by the CoreOS domain.
cpu Property Map
Configures CPU mode. See below for more details.
description String
The description for domain. Changing this forces a new resource to be created. This data is not used by libvirt in any way, it can contain any information the user wants.
disks List<Property Map>
An array of one or more disks to attach to the domain. The disk object structure is documented below.
domainId String
a unique identifier for the resource.

  • network_interface.<N>.addresses.<M> - M-th IP address assigned to the N-th network interface.
emulator String
The path of the emulator to use
filesystems List<Property Map>
An array of one or more host filesystems to attach to the domain. The filesystem object structure is documented below.
firmware String
fwCfgName String
The name of the firmware config path where ignition file is stored: default is opt/com.coreos/config. If you are using Flatcar Linux, the value is opt/org.flatcar-linux/config.
graphics Property Map
initrd String
kernel String
machine String
The machine type, you normally won't need to set this unless you are running on a platform that defaults to the wrong machine type for your template
memory Number
The amount of memory in MiB. If not specified the domain will be created with 512 MiB of memory be used.
metadata String
name String
A unique name for the resource, required by libvirt. Changing this forces a new resource to be created.
networkInterfaces List<Property Map>
An array of one or more network interfaces to attach to the domain. The network_interface object structure is documented below.
nvram Property Map
qemuAgent Boolean
By default is disabled, set to true for enabling it. More info qemu-agent.
running Boolean
Use false to turn off the instance. If not specified, true is assumed and the instance, if stopped, will be started at next apply.
timeouts Property Map
tpm Property Map
TPM device to attach to the domain. The tpm object structure is documented below.
type String
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here
vcpu Number
The amount of virtual CPUs. If not specified, a single CPU will be created.
video Property Map
xml Property Map

Supporting Types

DomainBootDevice
, DomainBootDeviceArgs

Devs List<string>
Devs []string
devs List<String>
devs string[]
devs Sequence[str]
devs List<String>

DomainConsole
, DomainConsoleArgs

TargetPort This property is required. string
Target port
Type This property is required. string
Console device type. Valid values are "pty" and "tcp".
SourceHost string
IP address to listen on. Defaults to 127.0.0.1.
SourcePath string

Source path

Additional attributes when type is "tcp":

SourceService string

Port number or a service name. Defaults to a random port.

Note that you can repeat the console block to create more than one console. This works the same way as with the disk blocks (see above).

See libvirt Domain XML Console element for more information.

TargetType string

for the first console and defaults to serial. Subsequent console blocks must have a different type - usually virtio.

Additional attributes when type is "pty":

TargetPort This property is required. string
Target port
Type This property is required. string
Console device type. Valid values are "pty" and "tcp".
SourceHost string
IP address to listen on. Defaults to 127.0.0.1.
SourcePath string

Source path

Additional attributes when type is "tcp":

SourceService string

Port number or a service name. Defaults to a random port.

Note that you can repeat the console block to create more than one console. This works the same way as with the disk blocks (see above).

See libvirt Domain XML Console element for more information.

TargetType string

for the first console and defaults to serial. Subsequent console blocks must have a different type - usually virtio.

Additional attributes when type is "pty":

targetPort This property is required. String
Target port
type This property is required. String
Console device type. Valid values are "pty" and "tcp".
sourceHost String
IP address to listen on. Defaults to 127.0.0.1.
sourcePath String

Source path

Additional attributes when type is "tcp":

sourceService String

Port number or a service name. Defaults to a random port.

Note that you can repeat the console block to create more than one console. This works the same way as with the disk blocks (see above).

See libvirt Domain XML Console element for more information.

targetType String

for the first console and defaults to serial. Subsequent console blocks must have a different type - usually virtio.

Additional attributes when type is "pty":

targetPort This property is required. string
Target port
type This property is required. string
Console device type. Valid values are "pty" and "tcp".
sourceHost string
IP address to listen on. Defaults to 127.0.0.1.
sourcePath string

Source path

Additional attributes when type is "tcp":

sourceService string

Port number or a service name. Defaults to a random port.

Note that you can repeat the console block to create more than one console. This works the same way as with the disk blocks (see above).

See libvirt Domain XML Console element for more information.

targetType string

for the first console and defaults to serial. Subsequent console blocks must have a different type - usually virtio.

Additional attributes when type is "pty":

target_port This property is required. str
Target port
type This property is required. str
Console device type. Valid values are "pty" and "tcp".
source_host str
IP address to listen on. Defaults to 127.0.0.1.
source_path str

Source path

Additional attributes when type is "tcp":

source_service str

Port number or a service name. Defaults to a random port.

Note that you can repeat the console block to create more than one console. This works the same way as with the disk blocks (see above).

See libvirt Domain XML Console element for more information.

target_type str

for the first console and defaults to serial. Subsequent console blocks must have a different type - usually virtio.

Additional attributes when type is "pty":

targetPort This property is required. String
Target port
type This property is required. String
Console device type. Valid values are "pty" and "tcp".
sourceHost String
IP address to listen on. Defaults to 127.0.0.1.
sourcePath String

Source path

Additional attributes when type is "tcp":

sourceService String

Port number or a service name. Defaults to a random port.

Note that you can repeat the console block to create more than one console. This works the same way as with the disk blocks (see above).

See libvirt Domain XML Console element for more information.

targetType String

for the first console and defaults to serial. Subsequent console blocks must have a different type - usually virtio.

Additional attributes when type is "pty":

DomainCpu
, DomainCpuArgs

Mode string
Mode string
mode String
mode string
mode str
mode String

DomainDisk
, DomainDiskArgs

BlockDevice string

The path to the host device to use as the block device for this disk.

While volume_id, url, file and block_device are optional, it is intended that you use one of them.

File string
The filename to use as the block device for this disk (read-only)
Scsi bool
Use a scsi controller for this disk. The controller model is set to virtio-scsi
Url string
The http url to use as the block device for this disk (read-only)
VolumeId string
The volume id to use for this disk.
Wwn string

Specify a WWN to use for the disk if the disk is using a scsi controller, if not specified then a random wwn is generated for the disk

import * as pulumi from "@pulumi/pulumi";
import * as libvirt from "@pulumi/libvirt";

const leap = new libvirt.Volume("leap", {source: "http://someurl/openSUSE_Leap-42.1.qcow2"}); const mydisk = new libvirt.Volume("mydisk", {baseVolumeId: leap.volumeId}); const domain1 = new libvirt.Domain("domain1", {disks: [ { volumeId: mydisk.volumeId, scsi: true, }, { url: "http://foo.com/install.iso", }, { file: "/absolute/path/to/disk.iso", }, { blockDevice: "/dev/mapper/36005076802810e55400000000000145f", }, ]});

import pulumi
import pulumi_libvirt as libvirt

leap = libvirt.Volume("leap", source="http://someurl/openSUSE_Leap-42.1.qcow2")
mydisk = libvirt.Volume("mydisk", base_volume_id=leap.volume_id)
domain1 = libvirt.Domain("domain1", disks=[
    {
        "volume_id": mydisk.volume_id,
        "scsi": True,
    },
    {
        "url": "http://foo.com/install.iso",
    },
    {
        "file": "/absolute/path/to/disk.iso",
    },
    {
        "block_device": "/dev/mapper/36005076802810e55400000000000145f",
    },
])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Libvirt = Pulumi.Libvirt;

return await Deployment.RunAsync(() => 
{
    var leap = new Libvirt.Volume("leap", new()
    {
        Source = "http://someurl/openSUSE_Leap-42.1.qcow2",
    });

    var mydisk = new Libvirt.Volume("mydisk", new()
    {
        BaseVolumeId = leap.VolumeId,
    });

    var domain1 = new Libvirt.Domain("domain1", new()
    {
        Disks = new[]
        {
            new Libvirt.Inputs.DomainDiskArgs
            {
                VolumeId = mydisk.VolumeId,
                Scsi = true,
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                Url = "http://foo.com/install.iso",
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                File = "/absolute/path/to/disk.iso",
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                BlockDevice = "/dev/mapper/36005076802810e55400000000000145f",
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/libvirt/libvirt"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		leap, err := libvirt.NewVolume(ctx, "leap", &libvirt.VolumeArgs{
			Source: pulumi.String("http://someurl/openSUSE_Leap-42.1.qcow2"),
		})
		if err != nil {
			return err
		}
		mydisk, err := libvirt.NewVolume(ctx, "mydisk", &libvirt.VolumeArgs{
			BaseVolumeId: leap.VolumeId,
		})
		if err != nil {
			return err
		}
		_, err = libvirt.NewDomain(ctx, "domain1", &libvirt.DomainArgs{
			Disks: libvirt.DomainDiskArray{
				&libvirt.DomainDiskArgs{
					VolumeId: mydisk.VolumeId,
					Scsi:     pulumi.Bool(true),
				},
				&libvirt.DomainDiskArgs{
					Url: pulumi.String("http://foo.com/install.iso"),
				},
				&libvirt.DomainDiskArgs{
					File: pulumi.String("/absolute/path/to/disk.iso"),
				},
				&libvirt.DomainDiskArgs{
					BlockDevice: pulumi.String("/dev/mapper/36005076802810e55400000000000145f"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.libvirt.Volume;
import com.pulumi.libvirt.VolumeArgs;
import com.pulumi.libvirt.Domain;
import com.pulumi.libvirt.DomainArgs;
import com.pulumi.libvirt.inputs.DomainDiskArgs;
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) {
        var leap = new Volume("leap", VolumeArgs.builder()
            .source("http://someurl/openSUSE_Leap-42.1.qcow2")
            .build());

        var mydisk = new Volume("mydisk", VolumeArgs.builder()
            .baseVolumeId(leap.volumeId())
            .build());

        var domain1 = new Domain("domain1", DomainArgs.builder()
            .disks(            
                DomainDiskArgs.builder()
                    .volumeId(mydisk.volumeId())
                    .scsi("true")
                    .build(),
                DomainDiskArgs.builder()
                    .url("http://foo.com/install.iso")
                    .build(),
                DomainDiskArgs.builder()
                    .file("/absolute/path/to/disk.iso")
                    .build(),
                DomainDiskArgs.builder()
                    .blockDevice("/dev/mapper/36005076802810e55400000000000145f")
                    .build())
            .build());

    }
}
resources:
  leap:
    type: libvirt:Volume
    properties:
      source: http://someurl/openSUSE_Leap-42.1.qcow2
  mydisk:
    type: libvirt:Volume
    properties:
      baseVolumeId: ${leap.volumeId}
  domain1:
    type: libvirt:Domain
    properties:
      disks:
        - volumeId: ${mydisk.volumeId}
          scsi: 'true'
        - url: http://foo.com/install.iso
        - file: /absolute/path/to/disk.iso
        - blockDevice: /dev/mapper/36005076802810e55400000000000145f

Also note that the disk block is actually a list of maps, so it is possible to declare several of them by using either the literal list and map syntax as in the following examples:

BlockDevice string

The path to the host device to use as the block device for this disk.

While volume_id, url, file and block_device are optional, it is intended that you use one of them.

File string
The filename to use as the block device for this disk (read-only)
Scsi bool
Use a scsi controller for this disk. The controller model is set to virtio-scsi
Url string
The http url to use as the block device for this disk (read-only)
VolumeId string
The volume id to use for this disk.
Wwn string

Specify a WWN to use for the disk if the disk is using a scsi controller, if not specified then a random wwn is generated for the disk

import * as pulumi from "@pulumi/pulumi";
import * as libvirt from "@pulumi/libvirt";

const leap = new libvirt.Volume("leap", {source: "http://someurl/openSUSE_Leap-42.1.qcow2"}); const mydisk = new libvirt.Volume("mydisk", {baseVolumeId: leap.volumeId}); const domain1 = new libvirt.Domain("domain1", {disks: [ { volumeId: mydisk.volumeId, scsi: true, }, { url: "http://foo.com/install.iso", }, { file: "/absolute/path/to/disk.iso", }, { blockDevice: "/dev/mapper/36005076802810e55400000000000145f", }, ]});

import pulumi
import pulumi_libvirt as libvirt

leap = libvirt.Volume("leap", source="http://someurl/openSUSE_Leap-42.1.qcow2")
mydisk = libvirt.Volume("mydisk", base_volume_id=leap.volume_id)
domain1 = libvirt.Domain("domain1", disks=[
    {
        "volume_id": mydisk.volume_id,
        "scsi": True,
    },
    {
        "url": "http://foo.com/install.iso",
    },
    {
        "file": "/absolute/path/to/disk.iso",
    },
    {
        "block_device": "/dev/mapper/36005076802810e55400000000000145f",
    },
])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Libvirt = Pulumi.Libvirt;

return await Deployment.RunAsync(() => 
{
    var leap = new Libvirt.Volume("leap", new()
    {
        Source = "http://someurl/openSUSE_Leap-42.1.qcow2",
    });

    var mydisk = new Libvirt.Volume("mydisk", new()
    {
        BaseVolumeId = leap.VolumeId,
    });

    var domain1 = new Libvirt.Domain("domain1", new()
    {
        Disks = new[]
        {
            new Libvirt.Inputs.DomainDiskArgs
            {
                VolumeId = mydisk.VolumeId,
                Scsi = true,
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                Url = "http://foo.com/install.iso",
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                File = "/absolute/path/to/disk.iso",
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                BlockDevice = "/dev/mapper/36005076802810e55400000000000145f",
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/libvirt/libvirt"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		leap, err := libvirt.NewVolume(ctx, "leap", &libvirt.VolumeArgs{
			Source: pulumi.String("http://someurl/openSUSE_Leap-42.1.qcow2"),
		})
		if err != nil {
			return err
		}
		mydisk, err := libvirt.NewVolume(ctx, "mydisk", &libvirt.VolumeArgs{
			BaseVolumeId: leap.VolumeId,
		})
		if err != nil {
			return err
		}
		_, err = libvirt.NewDomain(ctx, "domain1", &libvirt.DomainArgs{
			Disks: libvirt.DomainDiskArray{
				&libvirt.DomainDiskArgs{
					VolumeId: mydisk.VolumeId,
					Scsi:     pulumi.Bool(true),
				},
				&libvirt.DomainDiskArgs{
					Url: pulumi.String("http://foo.com/install.iso"),
				},
				&libvirt.DomainDiskArgs{
					File: pulumi.String("/absolute/path/to/disk.iso"),
				},
				&libvirt.DomainDiskArgs{
					BlockDevice: pulumi.String("/dev/mapper/36005076802810e55400000000000145f"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.libvirt.Volume;
import com.pulumi.libvirt.VolumeArgs;
import com.pulumi.libvirt.Domain;
import com.pulumi.libvirt.DomainArgs;
import com.pulumi.libvirt.inputs.DomainDiskArgs;
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) {
        var leap = new Volume("leap", VolumeArgs.builder()
            .source("http://someurl/openSUSE_Leap-42.1.qcow2")
            .build());

        var mydisk = new Volume("mydisk", VolumeArgs.builder()
            .baseVolumeId(leap.volumeId())
            .build());

        var domain1 = new Domain("domain1", DomainArgs.builder()
            .disks(            
                DomainDiskArgs.builder()
                    .volumeId(mydisk.volumeId())
                    .scsi("true")
                    .build(),
                DomainDiskArgs.builder()
                    .url("http://foo.com/install.iso")
                    .build(),
                DomainDiskArgs.builder()
                    .file("/absolute/path/to/disk.iso")
                    .build(),
                DomainDiskArgs.builder()
                    .blockDevice("/dev/mapper/36005076802810e55400000000000145f")
                    .build())
            .build());

    }
}
resources:
  leap:
    type: libvirt:Volume
    properties:
      source: http://someurl/openSUSE_Leap-42.1.qcow2
  mydisk:
    type: libvirt:Volume
    properties:
      baseVolumeId: ${leap.volumeId}
  domain1:
    type: libvirt:Domain
    properties:
      disks:
        - volumeId: ${mydisk.volumeId}
          scsi: 'true'
        - url: http://foo.com/install.iso
        - file: /absolute/path/to/disk.iso
        - blockDevice: /dev/mapper/36005076802810e55400000000000145f

Also note that the disk block is actually a list of maps, so it is possible to declare several of them by using either the literal list and map syntax as in the following examples:

blockDevice String

The path to the host device to use as the block device for this disk.

While volume_id, url, file and block_device are optional, it is intended that you use one of them.

file String
The filename to use as the block device for this disk (read-only)
scsi Boolean
Use a scsi controller for this disk. The controller model is set to virtio-scsi
url String
The http url to use as the block device for this disk (read-only)
volumeId String
The volume id to use for this disk.
wwn String

Specify a WWN to use for the disk if the disk is using a scsi controller, if not specified then a random wwn is generated for the disk

import * as pulumi from "@pulumi/pulumi";
import * as libvirt from "@pulumi/libvirt";

const leap = new libvirt.Volume("leap", {source: "http://someurl/openSUSE_Leap-42.1.qcow2"}); const mydisk = new libvirt.Volume("mydisk", {baseVolumeId: leap.volumeId}); const domain1 = new libvirt.Domain("domain1", {disks: [ { volumeId: mydisk.volumeId, scsi: true, }, { url: "http://foo.com/install.iso", }, { file: "/absolute/path/to/disk.iso", }, { blockDevice: "/dev/mapper/36005076802810e55400000000000145f", }, ]});

import pulumi
import pulumi_libvirt as libvirt

leap = libvirt.Volume("leap", source="http://someurl/openSUSE_Leap-42.1.qcow2")
mydisk = libvirt.Volume("mydisk", base_volume_id=leap.volume_id)
domain1 = libvirt.Domain("domain1", disks=[
    {
        "volume_id": mydisk.volume_id,
        "scsi": True,
    },
    {
        "url": "http://foo.com/install.iso",
    },
    {
        "file": "/absolute/path/to/disk.iso",
    },
    {
        "block_device": "/dev/mapper/36005076802810e55400000000000145f",
    },
])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Libvirt = Pulumi.Libvirt;

return await Deployment.RunAsync(() => 
{
    var leap = new Libvirt.Volume("leap", new()
    {
        Source = "http://someurl/openSUSE_Leap-42.1.qcow2",
    });

    var mydisk = new Libvirt.Volume("mydisk", new()
    {
        BaseVolumeId = leap.VolumeId,
    });

    var domain1 = new Libvirt.Domain("domain1", new()
    {
        Disks = new[]
        {
            new Libvirt.Inputs.DomainDiskArgs
            {
                VolumeId = mydisk.VolumeId,
                Scsi = true,
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                Url = "http://foo.com/install.iso",
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                File = "/absolute/path/to/disk.iso",
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                BlockDevice = "/dev/mapper/36005076802810e55400000000000145f",
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/libvirt/libvirt"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		leap, err := libvirt.NewVolume(ctx, "leap", &libvirt.VolumeArgs{
			Source: pulumi.String("http://someurl/openSUSE_Leap-42.1.qcow2"),
		})
		if err != nil {
			return err
		}
		mydisk, err := libvirt.NewVolume(ctx, "mydisk", &libvirt.VolumeArgs{
			BaseVolumeId: leap.VolumeId,
		})
		if err != nil {
			return err
		}
		_, err = libvirt.NewDomain(ctx, "domain1", &libvirt.DomainArgs{
			Disks: libvirt.DomainDiskArray{
				&libvirt.DomainDiskArgs{
					VolumeId: mydisk.VolumeId,
					Scsi:     pulumi.Bool(true),
				},
				&libvirt.DomainDiskArgs{
					Url: pulumi.String("http://foo.com/install.iso"),
				},
				&libvirt.DomainDiskArgs{
					File: pulumi.String("/absolute/path/to/disk.iso"),
				},
				&libvirt.DomainDiskArgs{
					BlockDevice: pulumi.String("/dev/mapper/36005076802810e55400000000000145f"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.libvirt.Volume;
import com.pulumi.libvirt.VolumeArgs;
import com.pulumi.libvirt.Domain;
import com.pulumi.libvirt.DomainArgs;
import com.pulumi.libvirt.inputs.DomainDiskArgs;
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) {
        var leap = new Volume("leap", VolumeArgs.builder()
            .source("http://someurl/openSUSE_Leap-42.1.qcow2")
            .build());

        var mydisk = new Volume("mydisk", VolumeArgs.builder()
            .baseVolumeId(leap.volumeId())
            .build());

        var domain1 = new Domain("domain1", DomainArgs.builder()
            .disks(            
                DomainDiskArgs.builder()
                    .volumeId(mydisk.volumeId())
                    .scsi("true")
                    .build(),
                DomainDiskArgs.builder()
                    .url("http://foo.com/install.iso")
                    .build(),
                DomainDiskArgs.builder()
                    .file("/absolute/path/to/disk.iso")
                    .build(),
                DomainDiskArgs.builder()
                    .blockDevice("/dev/mapper/36005076802810e55400000000000145f")
                    .build())
            .build());

    }
}
resources:
  leap:
    type: libvirt:Volume
    properties:
      source: http://someurl/openSUSE_Leap-42.1.qcow2
  mydisk:
    type: libvirt:Volume
    properties:
      baseVolumeId: ${leap.volumeId}
  domain1:
    type: libvirt:Domain
    properties:
      disks:
        - volumeId: ${mydisk.volumeId}
          scsi: 'true'
        - url: http://foo.com/install.iso
        - file: /absolute/path/to/disk.iso
        - blockDevice: /dev/mapper/36005076802810e55400000000000145f

Also note that the disk block is actually a list of maps, so it is possible to declare several of them by using either the literal list and map syntax as in the following examples:

blockDevice string

The path to the host device to use as the block device for this disk.

While volume_id, url, file and block_device are optional, it is intended that you use one of them.

file string
The filename to use as the block device for this disk (read-only)
scsi boolean
Use a scsi controller for this disk. The controller model is set to virtio-scsi
url string
The http url to use as the block device for this disk (read-only)
volumeId string
The volume id to use for this disk.
wwn string

Specify a WWN to use for the disk if the disk is using a scsi controller, if not specified then a random wwn is generated for the disk

import * as pulumi from "@pulumi/pulumi";
import * as libvirt from "@pulumi/libvirt";

const leap = new libvirt.Volume("leap", {source: "http://someurl/openSUSE_Leap-42.1.qcow2"}); const mydisk = new libvirt.Volume("mydisk", {baseVolumeId: leap.volumeId}); const domain1 = new libvirt.Domain("domain1", {disks: [ { volumeId: mydisk.volumeId, scsi: true, }, { url: "http://foo.com/install.iso", }, { file: "/absolute/path/to/disk.iso", }, { blockDevice: "/dev/mapper/36005076802810e55400000000000145f", }, ]});

import pulumi
import pulumi_libvirt as libvirt

leap = libvirt.Volume("leap", source="http://someurl/openSUSE_Leap-42.1.qcow2")
mydisk = libvirt.Volume("mydisk", base_volume_id=leap.volume_id)
domain1 = libvirt.Domain("domain1", disks=[
    {
        "volume_id": mydisk.volume_id,
        "scsi": True,
    },
    {
        "url": "http://foo.com/install.iso",
    },
    {
        "file": "/absolute/path/to/disk.iso",
    },
    {
        "block_device": "/dev/mapper/36005076802810e55400000000000145f",
    },
])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Libvirt = Pulumi.Libvirt;

return await Deployment.RunAsync(() => 
{
    var leap = new Libvirt.Volume("leap", new()
    {
        Source = "http://someurl/openSUSE_Leap-42.1.qcow2",
    });

    var mydisk = new Libvirt.Volume("mydisk", new()
    {
        BaseVolumeId = leap.VolumeId,
    });

    var domain1 = new Libvirt.Domain("domain1", new()
    {
        Disks = new[]
        {
            new Libvirt.Inputs.DomainDiskArgs
            {
                VolumeId = mydisk.VolumeId,
                Scsi = true,
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                Url = "http://foo.com/install.iso",
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                File = "/absolute/path/to/disk.iso",
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                BlockDevice = "/dev/mapper/36005076802810e55400000000000145f",
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/libvirt/libvirt"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		leap, err := libvirt.NewVolume(ctx, "leap", &libvirt.VolumeArgs{
			Source: pulumi.String("http://someurl/openSUSE_Leap-42.1.qcow2"),
		})
		if err != nil {
			return err
		}
		mydisk, err := libvirt.NewVolume(ctx, "mydisk", &libvirt.VolumeArgs{
			BaseVolumeId: leap.VolumeId,
		})
		if err != nil {
			return err
		}
		_, err = libvirt.NewDomain(ctx, "domain1", &libvirt.DomainArgs{
			Disks: libvirt.DomainDiskArray{
				&libvirt.DomainDiskArgs{
					VolumeId: mydisk.VolumeId,
					Scsi:     pulumi.Bool(true),
				},
				&libvirt.DomainDiskArgs{
					Url: pulumi.String("http://foo.com/install.iso"),
				},
				&libvirt.DomainDiskArgs{
					File: pulumi.String("/absolute/path/to/disk.iso"),
				},
				&libvirt.DomainDiskArgs{
					BlockDevice: pulumi.String("/dev/mapper/36005076802810e55400000000000145f"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.libvirt.Volume;
import com.pulumi.libvirt.VolumeArgs;
import com.pulumi.libvirt.Domain;
import com.pulumi.libvirt.DomainArgs;
import com.pulumi.libvirt.inputs.DomainDiskArgs;
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) {
        var leap = new Volume("leap", VolumeArgs.builder()
            .source("http://someurl/openSUSE_Leap-42.1.qcow2")
            .build());

        var mydisk = new Volume("mydisk", VolumeArgs.builder()
            .baseVolumeId(leap.volumeId())
            .build());

        var domain1 = new Domain("domain1", DomainArgs.builder()
            .disks(            
                DomainDiskArgs.builder()
                    .volumeId(mydisk.volumeId())
                    .scsi("true")
                    .build(),
                DomainDiskArgs.builder()
                    .url("http://foo.com/install.iso")
                    .build(),
                DomainDiskArgs.builder()
                    .file("/absolute/path/to/disk.iso")
                    .build(),
                DomainDiskArgs.builder()
                    .blockDevice("/dev/mapper/36005076802810e55400000000000145f")
                    .build())
            .build());

    }
}
resources:
  leap:
    type: libvirt:Volume
    properties:
      source: http://someurl/openSUSE_Leap-42.1.qcow2
  mydisk:
    type: libvirt:Volume
    properties:
      baseVolumeId: ${leap.volumeId}
  domain1:
    type: libvirt:Domain
    properties:
      disks:
        - volumeId: ${mydisk.volumeId}
          scsi: 'true'
        - url: http://foo.com/install.iso
        - file: /absolute/path/to/disk.iso
        - blockDevice: /dev/mapper/36005076802810e55400000000000145f

Also note that the disk block is actually a list of maps, so it is possible to declare several of them by using either the literal list and map syntax as in the following examples:

block_device str

The path to the host device to use as the block device for this disk.

While volume_id, url, file and block_device are optional, it is intended that you use one of them.

file str
The filename to use as the block device for this disk (read-only)
scsi bool
Use a scsi controller for this disk. The controller model is set to virtio-scsi
url str
The http url to use as the block device for this disk (read-only)
volume_id str
The volume id to use for this disk.
wwn str

Specify a WWN to use for the disk if the disk is using a scsi controller, if not specified then a random wwn is generated for the disk

import * as pulumi from "@pulumi/pulumi";
import * as libvirt from "@pulumi/libvirt";

const leap = new libvirt.Volume("leap", {source: "http://someurl/openSUSE_Leap-42.1.qcow2"}); const mydisk = new libvirt.Volume("mydisk", {baseVolumeId: leap.volumeId}); const domain1 = new libvirt.Domain("domain1", {disks: [ { volumeId: mydisk.volumeId, scsi: true, }, { url: "http://foo.com/install.iso", }, { file: "/absolute/path/to/disk.iso", }, { blockDevice: "/dev/mapper/36005076802810e55400000000000145f", }, ]});

import pulumi
import pulumi_libvirt as libvirt

leap = libvirt.Volume("leap", source="http://someurl/openSUSE_Leap-42.1.qcow2")
mydisk = libvirt.Volume("mydisk", base_volume_id=leap.volume_id)
domain1 = libvirt.Domain("domain1", disks=[
    {
        "volume_id": mydisk.volume_id,
        "scsi": True,
    },
    {
        "url": "http://foo.com/install.iso",
    },
    {
        "file": "/absolute/path/to/disk.iso",
    },
    {
        "block_device": "/dev/mapper/36005076802810e55400000000000145f",
    },
])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Libvirt = Pulumi.Libvirt;

return await Deployment.RunAsync(() => 
{
    var leap = new Libvirt.Volume("leap", new()
    {
        Source = "http://someurl/openSUSE_Leap-42.1.qcow2",
    });

    var mydisk = new Libvirt.Volume("mydisk", new()
    {
        BaseVolumeId = leap.VolumeId,
    });

    var domain1 = new Libvirt.Domain("domain1", new()
    {
        Disks = new[]
        {
            new Libvirt.Inputs.DomainDiskArgs
            {
                VolumeId = mydisk.VolumeId,
                Scsi = true,
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                Url = "http://foo.com/install.iso",
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                File = "/absolute/path/to/disk.iso",
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                BlockDevice = "/dev/mapper/36005076802810e55400000000000145f",
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/libvirt/libvirt"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		leap, err := libvirt.NewVolume(ctx, "leap", &libvirt.VolumeArgs{
			Source: pulumi.String("http://someurl/openSUSE_Leap-42.1.qcow2"),
		})
		if err != nil {
			return err
		}
		mydisk, err := libvirt.NewVolume(ctx, "mydisk", &libvirt.VolumeArgs{
			BaseVolumeId: leap.VolumeId,
		})
		if err != nil {
			return err
		}
		_, err = libvirt.NewDomain(ctx, "domain1", &libvirt.DomainArgs{
			Disks: libvirt.DomainDiskArray{
				&libvirt.DomainDiskArgs{
					VolumeId: mydisk.VolumeId,
					Scsi:     pulumi.Bool(true),
				},
				&libvirt.DomainDiskArgs{
					Url: pulumi.String("http://foo.com/install.iso"),
				},
				&libvirt.DomainDiskArgs{
					File: pulumi.String("/absolute/path/to/disk.iso"),
				},
				&libvirt.DomainDiskArgs{
					BlockDevice: pulumi.String("/dev/mapper/36005076802810e55400000000000145f"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.libvirt.Volume;
import com.pulumi.libvirt.VolumeArgs;
import com.pulumi.libvirt.Domain;
import com.pulumi.libvirt.DomainArgs;
import com.pulumi.libvirt.inputs.DomainDiskArgs;
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) {
        var leap = new Volume("leap", VolumeArgs.builder()
            .source("http://someurl/openSUSE_Leap-42.1.qcow2")
            .build());

        var mydisk = new Volume("mydisk", VolumeArgs.builder()
            .baseVolumeId(leap.volumeId())
            .build());

        var domain1 = new Domain("domain1", DomainArgs.builder()
            .disks(            
                DomainDiskArgs.builder()
                    .volumeId(mydisk.volumeId())
                    .scsi("true")
                    .build(),
                DomainDiskArgs.builder()
                    .url("http://foo.com/install.iso")
                    .build(),
                DomainDiskArgs.builder()
                    .file("/absolute/path/to/disk.iso")
                    .build(),
                DomainDiskArgs.builder()
                    .blockDevice("/dev/mapper/36005076802810e55400000000000145f")
                    .build())
            .build());

    }
}
resources:
  leap:
    type: libvirt:Volume
    properties:
      source: http://someurl/openSUSE_Leap-42.1.qcow2
  mydisk:
    type: libvirt:Volume
    properties:
      baseVolumeId: ${leap.volumeId}
  domain1:
    type: libvirt:Domain
    properties:
      disks:
        - volumeId: ${mydisk.volumeId}
          scsi: 'true'
        - url: http://foo.com/install.iso
        - file: /absolute/path/to/disk.iso
        - blockDevice: /dev/mapper/36005076802810e55400000000000145f

Also note that the disk block is actually a list of maps, so it is possible to declare several of them by using either the literal list and map syntax as in the following examples:

blockDevice String

The path to the host device to use as the block device for this disk.

While volume_id, url, file and block_device are optional, it is intended that you use one of them.

file String
The filename to use as the block device for this disk (read-only)
scsi Boolean
Use a scsi controller for this disk. The controller model is set to virtio-scsi
url String
The http url to use as the block device for this disk (read-only)
volumeId String
The volume id to use for this disk.
wwn String

Specify a WWN to use for the disk if the disk is using a scsi controller, if not specified then a random wwn is generated for the disk

import * as pulumi from "@pulumi/pulumi";
import * as libvirt from "@pulumi/libvirt";

const leap = new libvirt.Volume("leap", {source: "http://someurl/openSUSE_Leap-42.1.qcow2"}); const mydisk = new libvirt.Volume("mydisk", {baseVolumeId: leap.volumeId}); const domain1 = new libvirt.Domain("domain1", {disks: [ { volumeId: mydisk.volumeId, scsi: true, }, { url: "http://foo.com/install.iso", }, { file: "/absolute/path/to/disk.iso", }, { blockDevice: "/dev/mapper/36005076802810e55400000000000145f", }, ]});

import pulumi
import pulumi_libvirt as libvirt

leap = libvirt.Volume("leap", source="http://someurl/openSUSE_Leap-42.1.qcow2")
mydisk = libvirt.Volume("mydisk", base_volume_id=leap.volume_id)
domain1 = libvirt.Domain("domain1", disks=[
    {
        "volume_id": mydisk.volume_id,
        "scsi": True,
    },
    {
        "url": "http://foo.com/install.iso",
    },
    {
        "file": "/absolute/path/to/disk.iso",
    },
    {
        "block_device": "/dev/mapper/36005076802810e55400000000000145f",
    },
])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Libvirt = Pulumi.Libvirt;

return await Deployment.RunAsync(() => 
{
    var leap = new Libvirt.Volume("leap", new()
    {
        Source = "http://someurl/openSUSE_Leap-42.1.qcow2",
    });

    var mydisk = new Libvirt.Volume("mydisk", new()
    {
        BaseVolumeId = leap.VolumeId,
    });

    var domain1 = new Libvirt.Domain("domain1", new()
    {
        Disks = new[]
        {
            new Libvirt.Inputs.DomainDiskArgs
            {
                VolumeId = mydisk.VolumeId,
                Scsi = true,
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                Url = "http://foo.com/install.iso",
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                File = "/absolute/path/to/disk.iso",
            },
            new Libvirt.Inputs.DomainDiskArgs
            {
                BlockDevice = "/dev/mapper/36005076802810e55400000000000145f",
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/libvirt/libvirt"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		leap, err := libvirt.NewVolume(ctx, "leap", &libvirt.VolumeArgs{
			Source: pulumi.String("http://someurl/openSUSE_Leap-42.1.qcow2"),
		})
		if err != nil {
			return err
		}
		mydisk, err := libvirt.NewVolume(ctx, "mydisk", &libvirt.VolumeArgs{
			BaseVolumeId: leap.VolumeId,
		})
		if err != nil {
			return err
		}
		_, err = libvirt.NewDomain(ctx, "domain1", &libvirt.DomainArgs{
			Disks: libvirt.DomainDiskArray{
				&libvirt.DomainDiskArgs{
					VolumeId: mydisk.VolumeId,
					Scsi:     pulumi.Bool(true),
				},
				&libvirt.DomainDiskArgs{
					Url: pulumi.String("http://foo.com/install.iso"),
				},
				&libvirt.DomainDiskArgs{
					File: pulumi.String("/absolute/path/to/disk.iso"),
				},
				&libvirt.DomainDiskArgs{
					BlockDevice: pulumi.String("/dev/mapper/36005076802810e55400000000000145f"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.libvirt.Volume;
import com.pulumi.libvirt.VolumeArgs;
import com.pulumi.libvirt.Domain;
import com.pulumi.libvirt.DomainArgs;
import com.pulumi.libvirt.inputs.DomainDiskArgs;
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) {
        var leap = new Volume("leap", VolumeArgs.builder()
            .source("http://someurl/openSUSE_Leap-42.1.qcow2")
            .build());

        var mydisk = new Volume("mydisk", VolumeArgs.builder()
            .baseVolumeId(leap.volumeId())
            .build());

        var domain1 = new Domain("domain1", DomainArgs.builder()
            .disks(            
                DomainDiskArgs.builder()
                    .volumeId(mydisk.volumeId())
                    .scsi("true")
                    .build(),
                DomainDiskArgs.builder()
                    .url("http://foo.com/install.iso")
                    .build(),
                DomainDiskArgs.builder()
                    .file("/absolute/path/to/disk.iso")
                    .build(),
                DomainDiskArgs.builder()
                    .blockDevice("/dev/mapper/36005076802810e55400000000000145f")
                    .build())
            .build());

    }
}
resources:
  leap:
    type: libvirt:Volume
    properties:
      source: http://someurl/openSUSE_Leap-42.1.qcow2
  mydisk:
    type: libvirt:Volume
    properties:
      baseVolumeId: ${leap.volumeId}
  domain1:
    type: libvirt:Domain
    properties:
      disks:
        - volumeId: ${mydisk.volumeId}
          scsi: 'true'
        - url: http://foo.com/install.iso
        - file: /absolute/path/to/disk.iso
        - blockDevice: /dev/mapper/36005076802810e55400000000000145f

Also note that the disk block is actually a list of maps, so it is possible to declare several of them by using either the literal list and map syntax as in the following examples:

DomainFilesystem
, DomainFilesystemArgs

Source This property is required. string
the directory of the host to be shared with the guest.
Target This property is required. string
an arbitrary string tag that is exported to the guest as a hint for where to mount the source.
Accessmode string
specifies the security mode for accessing the source. By default the mapped mode is chosen.
Readonly bool

enables exporting filesystem as a readonly mount for guest, by default read-only access is given.

Example:

import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic;
using System.Linq;
using Pulumi;

return await Deployment.RunAsync(() => { });

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
    }
}
{}

The exported filesystems can be mounted inside of the guest in this way:

Source This property is required. string
the directory of the host to be shared with the guest.
Target This property is required. string
an arbitrary string tag that is exported to the guest as a hint for where to mount the source.
Accessmode string
specifies the security mode for accessing the source. By default the mapped mode is chosen.
Readonly bool

enables exporting filesystem as a readonly mount for guest, by default read-only access is given.

Example:

import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic;
using System.Linq;
using Pulumi;

return await Deployment.RunAsync(() => { });

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
    }
}
{}

The exported filesystems can be mounted inside of the guest in this way:

source This property is required. String
the directory of the host to be shared with the guest.
target This property is required. String
an arbitrary string tag that is exported to the guest as a hint for where to mount the source.
accessmode String
specifies the security mode for accessing the source. By default the mapped mode is chosen.
readonly Boolean

enables exporting filesystem as a readonly mount for guest, by default read-only access is given.

Example:

import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic;
using System.Linq;
using Pulumi;

return await Deployment.RunAsync(() => { });

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
    }
}
{}

The exported filesystems can be mounted inside of the guest in this way:

source This property is required. string
the directory of the host to be shared with the guest.
target This property is required. string
an arbitrary string tag that is exported to the guest as a hint for where to mount the source.
accessmode string
specifies the security mode for accessing the source. By default the mapped mode is chosen.
readonly boolean

enables exporting filesystem as a readonly mount for guest, by default read-only access is given.

Example:

import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic;
using System.Linq;
using Pulumi;

return await Deployment.RunAsync(() => { });

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
    }
}
{}

The exported filesystems can be mounted inside of the guest in this way:

source This property is required. str
the directory of the host to be shared with the guest.
target This property is required. str
an arbitrary string tag that is exported to the guest as a hint for where to mount the source.
accessmode str
specifies the security mode for accessing the source. By default the mapped mode is chosen.
readonly bool

enables exporting filesystem as a readonly mount for guest, by default read-only access is given.

Example:

import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic;
using System.Linq;
using Pulumi;

return await Deployment.RunAsync(() => { });

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
    }
}
{}

The exported filesystems can be mounted inside of the guest in this way:

source This property is required. String
the directory of the host to be shared with the guest.
target This property is required. String
an arbitrary string tag that is exported to the guest as a hint for where to mount the source.
accessmode String
specifies the security mode for accessing the source. By default the mapped mode is chosen.
readonly Boolean

enables exporting filesystem as a readonly mount for guest, by default read-only access is given.

Example:

import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic;
using System.Linq;
using Pulumi;

return await Deployment.RunAsync(() => { });

package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
    }
}
{}

The exported filesystems can be mounted inside of the guest in this way:

DomainGraphics
, DomainGraphicsArgs

Autoport bool
defaults to "yes"
ListenAddress string
IP Address where the VNC listener should be started if listen_type is set to address. Defaults to 127.0.0.1
ListenType string
"listen type", defaults to "none"
Type string
the type of graphics emulation (default is "spice")
Websocket double

Port to listen on for VNC WebSocket functionality (-1 meaning auto-allocation)

On occasion we have found it necessary to set a type of vnc and a listen_type of address with certain builds of QEMU.

With listen_address it is possible to specify a listener address for the virtual machines VNC server. Usually this is an IP of the host system.

The graphics block will look as follows:

Autoport bool
defaults to "yes"
ListenAddress string
IP Address where the VNC listener should be started if listen_type is set to address. Defaults to 127.0.0.1
ListenType string
"listen type", defaults to "none"
Type string
the type of graphics emulation (default is "spice")
Websocket float64

Port to listen on for VNC WebSocket functionality (-1 meaning auto-allocation)

On occasion we have found it necessary to set a type of vnc and a listen_type of address with certain builds of QEMU.

With listen_address it is possible to specify a listener address for the virtual machines VNC server. Usually this is an IP of the host system.

The graphics block will look as follows:

autoport Boolean
defaults to "yes"
listenAddress String
IP Address where the VNC listener should be started if listen_type is set to address. Defaults to 127.0.0.1
listenType String
"listen type", defaults to "none"
type String
the type of graphics emulation (default is "spice")
websocket Double

Port to listen on for VNC WebSocket functionality (-1 meaning auto-allocation)

On occasion we have found it necessary to set a type of vnc and a listen_type of address with certain builds of QEMU.

With listen_address it is possible to specify a listener address for the virtual machines VNC server. Usually this is an IP of the host system.

The graphics block will look as follows:

autoport boolean
defaults to "yes"
listenAddress string
IP Address where the VNC listener should be started if listen_type is set to address. Defaults to 127.0.0.1
listenType string
"listen type", defaults to "none"
type string
the type of graphics emulation (default is "spice")
websocket number

Port to listen on for VNC WebSocket functionality (-1 meaning auto-allocation)

On occasion we have found it necessary to set a type of vnc and a listen_type of address with certain builds of QEMU.

With listen_address it is possible to specify a listener address for the virtual machines VNC server. Usually this is an IP of the host system.

The graphics block will look as follows:

autoport bool
defaults to "yes"
listen_address str
IP Address where the VNC listener should be started if listen_type is set to address. Defaults to 127.0.0.1
listen_type str
"listen type", defaults to "none"
type str
the type of graphics emulation (default is "spice")
websocket float

Port to listen on for VNC WebSocket functionality (-1 meaning auto-allocation)

On occasion we have found it necessary to set a type of vnc and a listen_type of address with certain builds of QEMU.

With listen_address it is possible to specify a listener address for the virtual machines VNC server. Usually this is an IP of the host system.

The graphics block will look as follows:

autoport Boolean
defaults to "yes"
listenAddress String
IP Address where the VNC listener should be started if listen_type is set to address. Defaults to 127.0.0.1
listenType String
"listen type", defaults to "none"
type String
the type of graphics emulation (default is "spice")
websocket Number

Port to listen on for VNC WebSocket functionality (-1 meaning auto-allocation)

On occasion we have found it necessary to set a type of vnc and a listen_type of address with certain builds of QEMU.

With listen_address it is possible to specify a listener address for the virtual machines VNC server. Usually this is an IP of the host system.

The graphics block will look as follows:

DomainNetworkInterface
, DomainNetworkInterfaceArgs

Addresses List<string>
An IP address for this domain in this network.
Bridge string
Provides a bridge from the VM directly to the LAN. This assumes there is a bridge device on the host which has one or more of the hosts physical NICs enslaved. The guest VM will have an associated tun device created and enslaved to the bridge. The IP range / network configuration is whatever is used on the LAN. This provides the guest VM full incoming & outgoing net access just like a physical machine.
Hostname string
A hostname that will be assigned to this domain resource in this network.
Mac string
The specific MAC address to use for this interface.
Macvtap string
Packets whose destination is on the same host as where they originate from are directly delivered to the target macvtap device. Both origin and destination devices need to be in bridge mode for direct delivery. If either one of them is in vepa mode, a VEPA capable bridge is required.
NetworkId string
NetworkName string
Passthrough string
This feature attaches a virtual function of a SRIOV capable NIC directly to a VM without losing the migration capability. All packets are sent to the VF/IF of the configured network device. Depending on the capabilities of the device additional prerequisites or limitations may apply; for example, on Linux this requires kernel 2.6.38 or newer.
Private string

All packets are sent to the external bridge and will only be delivered to a target VM on the same host if they are sent through an external router or gateway and that device sends them back to the host. This procedure is followed if either the source or destination device is in private mode.

Example of a macvtap interface:

Vepa string
All VMs' packets are sent to the external bridge. Packets whose destination is a VM on the same host as where the packet originates from are sent back to the host by the VEPA capable bridge (today's bridges are typically not VEPA capable).
WaitForLease bool

When creating the domain resource, wait until the network interface gets a DHCP lease from libvirt, so that the computed IP addresses will be available when the domain is up and the plan applied.

When connecting to a LAN, users can specify a target device with:

Addresses []string
An IP address for this domain in this network.
Bridge string
Provides a bridge from the VM directly to the LAN. This assumes there is a bridge device on the host which has one or more of the hosts physical NICs enslaved. The guest VM will have an associated tun device created and enslaved to the bridge. The IP range / network configuration is whatever is used on the LAN. This provides the guest VM full incoming & outgoing net access just like a physical machine.
Hostname string
A hostname that will be assigned to this domain resource in this network.
Mac string
The specific MAC address to use for this interface.
Macvtap string
Packets whose destination is on the same host as where they originate from are directly delivered to the target macvtap device. Both origin and destination devices need to be in bridge mode for direct delivery. If either one of them is in vepa mode, a VEPA capable bridge is required.
NetworkId string
NetworkName string
Passthrough string
This feature attaches a virtual function of a SRIOV capable NIC directly to a VM without losing the migration capability. All packets are sent to the VF/IF of the configured network device. Depending on the capabilities of the device additional prerequisites or limitations may apply; for example, on Linux this requires kernel 2.6.38 or newer.
Private string

All packets are sent to the external bridge and will only be delivered to a target VM on the same host if they are sent through an external router or gateway and that device sends them back to the host. This procedure is followed if either the source or destination device is in private mode.

Example of a macvtap interface:

Vepa string
All VMs' packets are sent to the external bridge. Packets whose destination is a VM on the same host as where the packet originates from are sent back to the host by the VEPA capable bridge (today's bridges are typically not VEPA capable).
WaitForLease bool

When creating the domain resource, wait until the network interface gets a DHCP lease from libvirt, so that the computed IP addresses will be available when the domain is up and the plan applied.

When connecting to a LAN, users can specify a target device with:

addresses List<String>
An IP address for this domain in this network.
bridge String
Provides a bridge from the VM directly to the LAN. This assumes there is a bridge device on the host which has one or more of the hosts physical NICs enslaved. The guest VM will have an associated tun device created and enslaved to the bridge. The IP range / network configuration is whatever is used on the LAN. This provides the guest VM full incoming & outgoing net access just like a physical machine.
hostname String
A hostname that will be assigned to this domain resource in this network.
mac String
The specific MAC address to use for this interface.
macvtap String
Packets whose destination is on the same host as where they originate from are directly delivered to the target macvtap device. Both origin and destination devices need to be in bridge mode for direct delivery. If either one of them is in vepa mode, a VEPA capable bridge is required.
networkId String
networkName String
passthrough String
This feature attaches a virtual function of a SRIOV capable NIC directly to a VM without losing the migration capability. All packets are sent to the VF/IF of the configured network device. Depending on the capabilities of the device additional prerequisites or limitations may apply; for example, on Linux this requires kernel 2.6.38 or newer.
private_ String

All packets are sent to the external bridge and will only be delivered to a target VM on the same host if they are sent through an external router or gateway and that device sends them back to the host. This procedure is followed if either the source or destination device is in private mode.

Example of a macvtap interface:

vepa String
All VMs' packets are sent to the external bridge. Packets whose destination is a VM on the same host as where the packet originates from are sent back to the host by the VEPA capable bridge (today's bridges are typically not VEPA capable).
waitForLease Boolean

When creating the domain resource, wait until the network interface gets a DHCP lease from libvirt, so that the computed IP addresses will be available when the domain is up and the plan applied.

When connecting to a LAN, users can specify a target device with:

addresses string[]
An IP address for this domain in this network.
bridge string
Provides a bridge from the VM directly to the LAN. This assumes there is a bridge device on the host which has one or more of the hosts physical NICs enslaved. The guest VM will have an associated tun device created and enslaved to the bridge. The IP range / network configuration is whatever is used on the LAN. This provides the guest VM full incoming & outgoing net access just like a physical machine.
hostname string
A hostname that will be assigned to this domain resource in this network.
mac string
The specific MAC address to use for this interface.
macvtap string
Packets whose destination is on the same host as where they originate from are directly delivered to the target macvtap device. Both origin and destination devices need to be in bridge mode for direct delivery. If either one of them is in vepa mode, a VEPA capable bridge is required.
networkId string
networkName string
passthrough string
This feature attaches a virtual function of a SRIOV capable NIC directly to a VM without losing the migration capability. All packets are sent to the VF/IF of the configured network device. Depending on the capabilities of the device additional prerequisites or limitations may apply; for example, on Linux this requires kernel 2.6.38 or newer.
private string

All packets are sent to the external bridge and will only be delivered to a target VM on the same host if they are sent through an external router or gateway and that device sends them back to the host. This procedure is followed if either the source or destination device is in private mode.

Example of a macvtap interface:

vepa string
All VMs' packets are sent to the external bridge. Packets whose destination is a VM on the same host as where the packet originates from are sent back to the host by the VEPA capable bridge (today's bridges are typically not VEPA capable).
waitForLease boolean

When creating the domain resource, wait until the network interface gets a DHCP lease from libvirt, so that the computed IP addresses will be available when the domain is up and the plan applied.

When connecting to a LAN, users can specify a target device with:

addresses Sequence[str]
An IP address for this domain in this network.
bridge str
Provides a bridge from the VM directly to the LAN. This assumes there is a bridge device on the host which has one or more of the hosts physical NICs enslaved. The guest VM will have an associated tun device created and enslaved to the bridge. The IP range / network configuration is whatever is used on the LAN. This provides the guest VM full incoming & outgoing net access just like a physical machine.
hostname str
A hostname that will be assigned to this domain resource in this network.
mac str
The specific MAC address to use for this interface.
macvtap str
Packets whose destination is on the same host as where they originate from are directly delivered to the target macvtap device. Both origin and destination devices need to be in bridge mode for direct delivery. If either one of them is in vepa mode, a VEPA capable bridge is required.
network_id str
network_name str
passthrough str
This feature attaches a virtual function of a SRIOV capable NIC directly to a VM without losing the migration capability. All packets are sent to the VF/IF of the configured network device. Depending on the capabilities of the device additional prerequisites or limitations may apply; for example, on Linux this requires kernel 2.6.38 or newer.
private str

All packets are sent to the external bridge and will only be delivered to a target VM on the same host if they are sent through an external router or gateway and that device sends them back to the host. This procedure is followed if either the source or destination device is in private mode.

Example of a macvtap interface:

vepa str
All VMs' packets are sent to the external bridge. Packets whose destination is a VM on the same host as where the packet originates from are sent back to the host by the VEPA capable bridge (today's bridges are typically not VEPA capable).
wait_for_lease bool

When creating the domain resource, wait until the network interface gets a DHCP lease from libvirt, so that the computed IP addresses will be available when the domain is up and the plan applied.

When connecting to a LAN, users can specify a target device with:

addresses List<String>
An IP address for this domain in this network.
bridge String
Provides a bridge from the VM directly to the LAN. This assumes there is a bridge device on the host which has one or more of the hosts physical NICs enslaved. The guest VM will have an associated tun device created and enslaved to the bridge. The IP range / network configuration is whatever is used on the LAN. This provides the guest VM full incoming & outgoing net access just like a physical machine.
hostname String
A hostname that will be assigned to this domain resource in this network.
mac String
The specific MAC address to use for this interface.
macvtap String
Packets whose destination is on the same host as where they originate from are directly delivered to the target macvtap device. Both origin and destination devices need to be in bridge mode for direct delivery. If either one of them is in vepa mode, a VEPA capable bridge is required.
networkId String
networkName String
passthrough String
This feature attaches a virtual function of a SRIOV capable NIC directly to a VM without losing the migration capability. All packets are sent to the VF/IF of the configured network device. Depending on the capabilities of the device additional prerequisites or limitations may apply; for example, on Linux this requires kernel 2.6.38 or newer.
private String

All packets are sent to the external bridge and will only be delivered to a target VM on the same host if they are sent through an external router or gateway and that device sends them back to the host. This procedure is followed if either the source or destination device is in private mode.

Example of a macvtap interface:

vepa String
All VMs' packets are sent to the external bridge. Packets whose destination is a VM on the same host as where the packet originates from are sent back to the host by the VEPA capable bridge (today's bridges are typically not VEPA capable).
waitForLease Boolean

When creating the domain resource, wait until the network interface gets a DHCP lease from libvirt, so that the computed IP addresses will be available when the domain is up and the plan applied.

When connecting to a LAN, users can specify a target device with:

DomainNvram
, DomainNvramArgs

File string
Template string

path to the file used to override variables from the master NVRAM store.

So you should typically use the firmware as this,

File string
Template string

path to the file used to override variables from the master NVRAM store.

So you should typically use the firmware as this,

file String
template String

path to the file used to override variables from the master NVRAM store.

So you should typically use the firmware as this,

file string
template string

path to the file used to override variables from the master NVRAM store.

So you should typically use the firmware as this,

file str
template str

path to the file used to override variables from the master NVRAM store.

So you should typically use the firmware as this,

file String
template String

path to the file used to override variables from the master NVRAM store.

So you should typically use the firmware as this,

DomainTimeouts
, DomainTimeoutsArgs

Create string
Create string
create String
create string
create str
create String

DomainTpm
, DomainTpmArgs

BackendDevicePath string

Path to TPM device on the host, ex: /dev/tpm0

Additional attributes when backend_type is "emulator":

BackendEncryptionSecret string
Secret object for encrypting the TPM state
BackendPersistentState bool
Keep the TPM state when a transient domain is powered off or undefined
BackendType string

TPM backend, either passthrough or emulator (default: emulator)

Additional attributes when backend_type is "passthrough":

BackendVersion string
TPM version
Model string
TPM model provided to the guest
BackendDevicePath string

Path to TPM device on the host, ex: /dev/tpm0

Additional attributes when backend_type is "emulator":

BackendEncryptionSecret string
Secret object for encrypting the TPM state
BackendPersistentState bool
Keep the TPM state when a transient domain is powered off or undefined
BackendType string

TPM backend, either passthrough or emulator (default: emulator)

Additional attributes when backend_type is "passthrough":

BackendVersion string
TPM version
Model string
TPM model provided to the guest
backendDevicePath String

Path to TPM device on the host, ex: /dev/tpm0

Additional attributes when backend_type is "emulator":

backendEncryptionSecret String
Secret object for encrypting the TPM state
backendPersistentState Boolean
Keep the TPM state when a transient domain is powered off or undefined
backendType String

TPM backend, either passthrough or emulator (default: emulator)

Additional attributes when backend_type is "passthrough":

backendVersion String
TPM version
model String
TPM model provided to the guest
backendDevicePath string

Path to TPM device on the host, ex: /dev/tpm0

Additional attributes when backend_type is "emulator":

backendEncryptionSecret string
Secret object for encrypting the TPM state
backendPersistentState boolean
Keep the TPM state when a transient domain is powered off or undefined
backendType string

TPM backend, either passthrough or emulator (default: emulator)

Additional attributes when backend_type is "passthrough":

backendVersion string
TPM version
model string
TPM model provided to the guest
backend_device_path str

Path to TPM device on the host, ex: /dev/tpm0

Additional attributes when backend_type is "emulator":

backend_encryption_secret str
Secret object for encrypting the TPM state
backend_persistent_state bool
Keep the TPM state when a transient domain is powered off or undefined
backend_type str

TPM backend, either passthrough or emulator (default: emulator)

Additional attributes when backend_type is "passthrough":

backend_version str
TPM version
model str
TPM model provided to the guest
backendDevicePath String

Path to TPM device on the host, ex: /dev/tpm0

Additional attributes when backend_type is "emulator":

backendEncryptionSecret String
Secret object for encrypting the TPM state
backendPersistentState Boolean
Keep the TPM state when a transient domain is powered off or undefined
backendType String

TPM backend, either passthrough or emulator (default: emulator)

Additional attributes when backend_type is "passthrough":

backendVersion String
TPM version
model String
TPM model provided to the guest

DomainVideo
, DomainVideoArgs

Type string
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here
Type string
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here
type String
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here
type string
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here
type str
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here
type String
The type of hypervisor to use for the domain. Defaults to kvm, other values can be found here

DomainXml
, DomainXmlArgs

Xslt string
Xslt string
xslt String
xslt string
xslt str
xslt String

Package Details

Repository
libvirt dmacvicar/terraform-provider-libvirt
License
Notes
This Pulumi package is based on the libvirt Terraform Provider.