Domain

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

Example Usage

using Pulumi;
using Libvirt = Pulumi.Libvirt;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = new Libvirt.Domain("default", new Libvirt.DomainArgs
        {
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-libvirt/sdk/go/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
	})
}
import pulumi
import pulumi_libvirt as libvirt

default = libvirt.Domain("default")
import * as pulumi from "@pulumi/pulumi";
import * as libvirt from "@pulumi/libvirt";

const defaultDomain = new libvirt.Domain("default", {});

Create a Domain Resource

new Domain(name: string, args?: DomainArgs, opts?: CustomResourceOptions);
@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, Any]]] = None,
           consoles: Optional[Sequence[DomainConsoleArgs]] = None,
           coreos_ignition: Optional[str] = None,
           cpu: Optional[DomainCpuArgs] = None,
           description: Optional[str] = None,
           disks: Optional[Sequence[DomainDiskArgs]] = 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[int] = 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,
           vcpu: Optional[int] = None,
           video: Optional[DomainVideoArgs] = None,
           xml: Optional[DomainXmlArgs] = None)
@overload
def Domain(resource_name: str,
           args: Optional[DomainArgs] = None,
           opts: Optional[ResourceOptions] = None)
func NewDomain(ctx *Context, name string, args *DomainArgs, opts ...ResourceOption) (*Domain, error)
public Domain(string name, DomainArgs? args = null, CustomResourceOptions? opts = null)
name 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 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 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 string
The unique name of the resource.
args DomainArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Domain Resource Properties

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

Inputs

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<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 List<ImmutableDictionary<string, object>>
Arguments to the kernel
Consoles List<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 List<DomainDiskArgs>
An array of one or more disks to attach to the domain. The disk object structure is documented below.
Emulator string
The path of the emulator to use
Filesystems List<DomainFilesystemArgs>
An array of one or more host filesystems to attach to the domain. The filesystem object structure is documented below.
Firmware string
The UEFI rom images for exercising UEFI secure boot in a qemu environment. Users should usually specify one of the standard Open Virtual Machine Firmware (OVMF) images available for their distributions. The file will be opened read-only.
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
The path of the initrd to boot.
Kernel string
The path of the kernel to boot
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 int
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<DomainNetworkInterfaceArgs>
An array of one or more network interfaces to attach to the domain. The network_interface object structure is documented below.
Nvram DomainNvramArgs
this block allows specifying the following attributes related to the nvram:
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.
Vcpu int
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 bool
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 []map[string]interface{}
Arguments to the kernel
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.
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
The UEFI rom images for exercising UEFI secure boot in a qemu environment. Users should usually specify one of the standard Open Virtual Machine Firmware (OVMF) images available for their distributions. The file will be opened read-only.
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
The path of the initrd to boot.
Kernel string
The path of the kernel to boot
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 int
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
this block allows specifying the following attributes related to the nvram:
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.
Vcpu int
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 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 {[key: string]: any}[]
Arguments to the kernel
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.
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
The UEFI rom images for exercising UEFI secure boot in a qemu environment. Users should usually specify one of the standard Open Virtual Machine Firmware (OVMF) images available for their distributions. The file will be opened read-only.
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
The path of the initrd to boot.
kernel string
The path of the kernel to boot
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 DomainNetworkInterfaceArgs[]
An array of one or more network interfaces to attach to the domain. The network_interface object structure is documented below.
nvram DomainNvramArgs
this block allows specifying the following attributes related to the nvram:
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.
vcpu number
The amount of virtual CPUs. If not specified, a single CPU will be created.
video DomainVideoArgs
xml DomainXmlArgs
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, Any]]
Arguments to the kernel
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.
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
The UEFI rom images for exercising UEFI secure boot in a qemu environment. Users should usually specify one of the standard Open Virtual Machine Firmware (OVMF) images available for their distributions. The file will be opened read-only.
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
The path of the initrd to boot.
kernel str
The path of the kernel to boot
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 int
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
this block allows specifying the following attributes related to the nvram:
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.
vcpu int
The amount of virtual CPUs. If not specified, a single CPU will be created.
video DomainVideoArgs
xml DomainXmlArgs

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 str
The provider-assigned unique ID for this managed resource.

Look up an 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, Any]]] = None,
        consoles: Optional[Sequence[DomainConsoleArgs]] = None,
        coreos_ignition: Optional[str] = None,
        cpu: Optional[DomainCpuArgs] = None,
        description: Optional[str] = None,
        disks: Optional[Sequence[DomainDiskArgs]] = 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[int] = 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,
        vcpu: Optional[int] = 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)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

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<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 List<ImmutableDictionary<string, object>>
Arguments to the kernel
Consoles List<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 List<DomainDiskArgs>
An array of one or more disks to attach to the domain. The disk object structure is documented below.
Emulator string
The path of the emulator to use
Filesystems List<DomainFilesystemArgs>
An array of one or more host filesystems to attach to the domain. The filesystem object structure is documented below.
Firmware string
The UEFI rom images for exercising UEFI secure boot in a qemu environment. Users should usually specify one of the standard Open Virtual Machine Firmware (OVMF) images available for their distributions. The file will be opened read-only.
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
The path of the initrd to boot.
Kernel string
The path of the kernel to boot
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 int
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<DomainNetworkInterfaceArgs>
An array of one or more network interfaces to attach to the domain. The network_interface object structure is documented below.
Nvram DomainNvramArgs
this block allows specifying the following attributes related to the nvram:
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.
Vcpu int
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 bool
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 []map[string]interface{}
Arguments to the kernel
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.
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
The UEFI rom images for exercising UEFI secure boot in a qemu environment. Users should usually specify one of the standard Open Virtual Machine Firmware (OVMF) images available for their distributions. The file will be opened read-only.
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
The path of the initrd to boot.
Kernel string
The path of the kernel to boot
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 int
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
this block allows specifying the following attributes related to the nvram:
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.
Vcpu int
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 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 {[key: string]: any}[]
Arguments to the kernel
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.
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
The UEFI rom images for exercising UEFI secure boot in a qemu environment. Users should usually specify one of the standard Open Virtual Machine Firmware (OVMF) images available for their distributions. The file will be opened read-only.
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
The path of the initrd to boot.
kernel string
The path of the kernel to boot
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 DomainNetworkInterfaceArgs[]
An array of one or more network interfaces to attach to the domain. The network_interface object structure is documented below.
nvram DomainNvramArgs
this block allows specifying the following attributes related to the nvram:
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.
vcpu number
The amount of virtual CPUs. If not specified, a single CPU will be created.
video DomainVideoArgs
xml DomainXmlArgs
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, Any]]
Arguments to the kernel
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.
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
The UEFI rom images for exercising UEFI secure boot in a qemu environment. Users should usually specify one of the standard Open Virtual Machine Firmware (OVMF) images available for their distributions. The file will be opened read-only.
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
The path of the initrd to boot.
kernel str
The path of the kernel to boot
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 int
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
this block allows specifying the following attributes related to the nvram:
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.
vcpu int
The amount of virtual CPUs. If not specified, a single CPU will be created.
video DomainVideoArgs
xml DomainXmlArgs

Supporting Types

DomainBootDevice

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

DomainConsole

TargetPort string
Target port
Type 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
SourceService string
Port number or a service name. Defaults to a random port.
TargetType string
for the first console and defaults to serial. Subsequent console blocks must have a different type - usually virtio.
TargetPort string
Target port
Type 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
SourceService string
Port number or a service name. Defaults to a random port.
TargetType string
for the first console and defaults to serial. Subsequent console blocks must have a different type - usually virtio.
targetPort string
Target port
type 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
sourceService string
Port number or a service name. Defaults to a random port.
targetType string
for the first console and defaults to serial. Subsequent console blocks must have a different type - usually virtio.
target_port str
Target port
type 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
source_service str
Port number or a service name. Defaults to a random port.
target_type str
for the first console and defaults to serial. Subsequent console blocks must have a different type - usually virtio.

DomainCpu

Mode string
Mode string
mode string
mode str

DomainDisk

BlockDevice string
The path to the host device to use as the block device for this disk.
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
BlockDevice string
The path to the host device to use as the block device for this disk.
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
blockDevice string
The path to the host device to use as the block device for this disk.
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
block_device str
The path to the host device to use as the block device for this disk.
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

DomainFilesystem

Source string
Target string
Accessmode string
Readonly bool
Source string
Target string
Accessmode string
Readonly bool
source string
target string
accessmode string
readonly boolean

DomainGraphics

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
Console device type. Valid values are “pty” and “tcp”.
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
Console device type. Valid values are “pty” and “tcp”.
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
Console device type. Valid values are “pty” and “tcp”.
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
Console device type. Valid values are “pty” and “tcp”.

DomainNetworkInterface

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.
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.
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.
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.
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.
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.
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.
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.

DomainNvram

File string
The filename to use as the block device for this disk (read-only)
Template string
path to the file used to override variables from the master NVRAM store.
File string
The filename to use as the block device for this disk (read-only)
Template string
path to the file used to override variables from the master NVRAM store.
file string
The filename to use as the block device for this disk (read-only)
template string
path to the file used to override variables from the master NVRAM store.
file str
The filename to use as the block device for this disk (read-only)
template str
path to the file used to override variables from the master NVRAM store.

DomainVideo

Type string
Console device type. Valid values are “pty” and “tcp”.
Type string
Console device type. Valid values are “pty” and “tcp”.
type string
Console device type. Valid values are “pty” and “tcp”.
type str
Console device type. Valid values are “pty” and “tcp”.

DomainXml

Xslt string
Xslt string
xslt string
xslt str

Package Details

Repository
https://github.com/pulumi/pulumi-libvirt
License
Apache-2.0
Notes
This Pulumi package is based on the libvirt Terraform Provider.