1. Packages
  2. Libvirt Provider
  3. API Docs
  4. Volume
libvirt 0.9.0 published on Saturday, Nov 8, 2025 by dmacvicar
libvirt logo
libvirt 0.9.0 published on Saturday, Nov 8, 2025 by dmacvicar

    Manages a libvirt storage volume.

    Storage volumes are images (qcow2, raw, etc.) stored in a storage pool that can be attached to virtual machines.

    See the libvirt storage volume documentation for more details.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as libvirt from "@pulumi/libvirt";
    
    // Basic volume
    const example = new libvirt.Volume("example", {
        name: "example.qcow2",
        pool: "default",
        capacity: 10737418240,
        format: "qcow2",
    });
    // Volume with backing store
    const base = new libvirt.Volume("base", {
        name: "base.qcow2",
        pool: "default",
        capacity: 10737418240,
        format: "qcow2",
    });
    const overlay = new libvirt.Volume("overlay", {
        name: "overlay.qcow2",
        pool: "default",
        capacity: 10737418240,
        backingStore: {
            path: base.path,
            format: "qcow2",
        },
    });
    // Volume from HTTP URL upload
    const ubuntuBase = new libvirt.Volume("ubuntu_base", {
        name: "ubuntu-22.04.qcow2",
        pool: "default",
        format: "qcow2",
        create: {
            content: {
                url: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img",
            },
        },
    });
    // Volume from local file upload
    const fromLocal = new libvirt.Volume("from_local", {
        name: "custom-image.qcow2",
        pool: "default",
        format: "qcow2",
        create: {
            content: {
                url: "/path/to/local/image.qcow2",
            },
        },
    });
    
    import pulumi
    import pulumi_libvirt as libvirt
    
    # Basic volume
    example = libvirt.Volume("example",
        name="example.qcow2",
        pool="default",
        capacity=10737418240,
        format="qcow2")
    # Volume with backing store
    base = libvirt.Volume("base",
        name="base.qcow2",
        pool="default",
        capacity=10737418240,
        format="qcow2")
    overlay = libvirt.Volume("overlay",
        name="overlay.qcow2",
        pool="default",
        capacity=10737418240,
        backing_store={
            "path": base.path,
            "format": "qcow2",
        })
    # Volume from HTTP URL upload
    ubuntu_base = libvirt.Volume("ubuntu_base",
        name="ubuntu-22.04.qcow2",
        pool="default",
        format="qcow2",
        create={
            "content": {
                "url": "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img",
            },
        })
    # Volume from local file upload
    from_local = libvirt.Volume("from_local",
        name="custom-image.qcow2",
        pool="default",
        format="qcow2",
        create={
            "content": {
                "url": "/path/to/local/image.qcow2",
            },
        })
    
    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 {
    		// Basic volume
    		_, err := libvirt.NewVolume(ctx, "example", &libvirt.VolumeArgs{
    			Name:     pulumi.String("example.qcow2"),
    			Pool:     pulumi.String("default"),
    			Capacity: pulumi.Float64(10737418240),
    			Format:   pulumi.String("qcow2"),
    		})
    		if err != nil {
    			return err
    		}
    		// Volume with backing store
    		base, err := libvirt.NewVolume(ctx, "base", &libvirt.VolumeArgs{
    			Name:     pulumi.String("base.qcow2"),
    			Pool:     pulumi.String("default"),
    			Capacity: pulumi.Float64(10737418240),
    			Format:   pulumi.String("qcow2"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = libvirt.NewVolume(ctx, "overlay", &libvirt.VolumeArgs{
    			Name:     pulumi.String("overlay.qcow2"),
    			Pool:     pulumi.String("default"),
    			Capacity: pulumi.Float64(10737418240),
    			BackingStore: &libvirt.VolumeBackingStoreArgs{
    				Path:   base.Path,
    				Format: pulumi.String("qcow2"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Volume from HTTP URL upload
    		_, err = libvirt.NewVolume(ctx, "ubuntu_base", &libvirt.VolumeArgs{
    			Name:   pulumi.String("ubuntu-22.04.qcow2"),
    			Pool:   pulumi.String("default"),
    			Format: pulumi.String("qcow2"),
    			Create: &libvirt.VolumeCreateArgs{
    				Content: &libvirt.VolumeCreateContentArgs{
    					Url: pulumi.String("https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Volume from local file upload
    		_, err = libvirt.NewVolume(ctx, "from_local", &libvirt.VolumeArgs{
    			Name:   pulumi.String("custom-image.qcow2"),
    			Pool:   pulumi.String("default"),
    			Format: pulumi.String("qcow2"),
    			Create: &libvirt.VolumeCreateArgs{
    				Content: &libvirt.VolumeCreateContentArgs{
    					Url: pulumi.String("/path/to/local/image.qcow2"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Libvirt = Pulumi.Libvirt;
    
    return await Deployment.RunAsync(() => 
    {
        // Basic volume
        var example = new Libvirt.Volume("example", new()
        {
            Name = "example.qcow2",
            Pool = "default",
            Capacity = 10737418240,
            Format = "qcow2",
        });
    
        // Volume with backing store
        var @base = new Libvirt.Volume("base", new()
        {
            Name = "base.qcow2",
            Pool = "default",
            Capacity = 10737418240,
            Format = "qcow2",
        });
    
        var overlay = new Libvirt.Volume("overlay", new()
        {
            Name = "overlay.qcow2",
            Pool = "default",
            Capacity = 10737418240,
            BackingStore = new Libvirt.Inputs.VolumeBackingStoreArgs
            {
                Path = @base.Path,
                Format = "qcow2",
            },
        });
    
        // Volume from HTTP URL upload
        var ubuntuBase = new Libvirt.Volume("ubuntu_base", new()
        {
            Name = "ubuntu-22.04.qcow2",
            Pool = "default",
            Format = "qcow2",
            Create = new Libvirt.Inputs.VolumeCreateArgs
            {
                Content = new Libvirt.Inputs.VolumeCreateContentArgs
                {
                    Url = "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img",
                },
            },
        });
    
        // Volume from local file upload
        var fromLocal = new Libvirt.Volume("from_local", new()
        {
            Name = "custom-image.qcow2",
            Pool = "default",
            Format = "qcow2",
            Create = new Libvirt.Inputs.VolumeCreateArgs
            {
                Content = new Libvirt.Inputs.VolumeCreateContentArgs
                {
                    Url = "/path/to/local/image.qcow2",
                },
            },
        });
    
    });
    
    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.inputs.VolumeBackingStoreArgs;
    import com.pulumi.libvirt.inputs.VolumeCreateArgs;
    import com.pulumi.libvirt.inputs.VolumeCreateContentArgs;
    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) {
            // Basic volume
            var example = new Volume("example", VolumeArgs.builder()
                .name("example.qcow2")
                .pool("default")
                .capacity(10737418240.0)
                .format("qcow2")
                .build());
    
            // Volume with backing store
            var base = new Volume("base", VolumeArgs.builder()
                .name("base.qcow2")
                .pool("default")
                .capacity(10737418240.0)
                .format("qcow2")
                .build());
    
            var overlay = new Volume("overlay", VolumeArgs.builder()
                .name("overlay.qcow2")
                .pool("default")
                .capacity(10737418240.0)
                .backingStore(VolumeBackingStoreArgs.builder()
                    .path(base.path())
                    .format("qcow2")
                    .build())
                .build());
    
            // Volume from HTTP URL upload
            var ubuntuBase = new Volume("ubuntuBase", VolumeArgs.builder()
                .name("ubuntu-22.04.qcow2")
                .pool("default")
                .format("qcow2")
                .create(VolumeCreateArgs.builder()
                    .content(VolumeCreateContentArgs.builder()
                        .url("https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img")
                        .build())
                    .build())
                .build());
    
            // Volume from local file upload
            var fromLocal = new Volume("fromLocal", VolumeArgs.builder()
                .name("custom-image.qcow2")
                .pool("default")
                .format("qcow2")
                .create(VolumeCreateArgs.builder()
                    .content(VolumeCreateContentArgs.builder()
                        .url("/path/to/local/image.qcow2")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Basic volume
      example:
        type: libvirt:Volume
        properties:
          name: example.qcow2
          pool: default
          capacity: 1.073741824e+10 # 10 GB
          format: qcow2
      # Volume with backing store
      base:
        type: libvirt:Volume
        properties:
          name: base.qcow2
          pool: default
          capacity: 1.073741824e+10
          format: qcow2
      overlay:
        type: libvirt:Volume
        properties:
          name: overlay.qcow2
          pool: default
          capacity: 1.073741824e+10
          backingStore:
            path: ${base.path}
            format: qcow2
      # Volume from HTTP URL upload
      ubuntuBase:
        type: libvirt:Volume
        name: ubuntu_base
        properties:
          name: ubuntu-22.04.qcow2
          pool: default
          format: qcow2
          create:
            content:
              url: https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img
      # Volume from local file upload
      fromLocal:
        type: libvirt:Volume
        name: from_local
        properties:
          name: custom-image.qcow2
          pool: default
          format: qcow2
          create:
            content:
              url: /path/to/local/image.qcow2
    

    Create Volume Resource

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

    Constructor syntax

    new Volume(name: string, args: VolumeArgs, opts?: CustomResourceOptions);
    @overload
    def Volume(resource_name: str,
               args: VolumeArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Volume(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               pool: Optional[str] = None,
               backing_store: Optional[VolumeBackingStoreArgs] = None,
               capacity: Optional[float] = None,
               create: Optional[VolumeCreateArgs] = None,
               format: Optional[str] = None,
               name: Optional[str] = None,
               permissions: Optional[VolumePermissionsArgs] = None,
               type: Optional[str] = None)
    func NewVolume(ctx *Context, name string, args VolumeArgs, opts ...ResourceOption) (*Volume, error)
    public Volume(string name, VolumeArgs args, CustomResourceOptions? opts = null)
    public Volume(String name, VolumeArgs args)
    public Volume(String name, VolumeArgs args, CustomResourceOptions options)
    
    type: libvirt:Volume
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args VolumeArgs
    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 VolumeArgs
    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 VolumeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VolumeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VolumeArgs
    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 volumeResource = new Libvirt.Volume("volumeResource", new()
    {
        Pool = "string",
        BackingStore = new Libvirt.Inputs.VolumeBackingStoreArgs
        {
            Path = "string",
            Format = "string",
        },
        Capacity = 0,
        Create = new Libvirt.Inputs.VolumeCreateArgs
        {
            Content = new Libvirt.Inputs.VolumeCreateContentArgs
            {
                Url = "string",
            },
        },
        Format = "string",
        Name = "string",
        Permissions = new Libvirt.Inputs.VolumePermissionsArgs
        {
            Group = "string",
            Label = "string",
            Mode = "string",
            Owner = "string",
        },
        Type = "string",
    });
    
    example, err := libvirt.NewVolume(ctx, "volumeResource", &libvirt.VolumeArgs{
    	Pool: pulumi.String("string"),
    	BackingStore: &libvirt.VolumeBackingStoreArgs{
    		Path:   pulumi.String("string"),
    		Format: pulumi.String("string"),
    	},
    	Capacity: pulumi.Float64(0),
    	Create: &libvirt.VolumeCreateArgs{
    		Content: &libvirt.VolumeCreateContentArgs{
    			Url: pulumi.String("string"),
    		},
    	},
    	Format: pulumi.String("string"),
    	Name:   pulumi.String("string"),
    	Permissions: &libvirt.VolumePermissionsArgs{
    		Group: pulumi.String("string"),
    		Label: pulumi.String("string"),
    		Mode:  pulumi.String("string"),
    		Owner: pulumi.String("string"),
    	},
    	Type: pulumi.String("string"),
    })
    
    var volumeResource = new Volume("volumeResource", VolumeArgs.builder()
        .pool("string")
        .backingStore(VolumeBackingStoreArgs.builder()
            .path("string")
            .format("string")
            .build())
        .capacity(0.0)
        .create(VolumeCreateArgs.builder()
            .content(VolumeCreateContentArgs.builder()
                .url("string")
                .build())
            .build())
        .format("string")
        .name("string")
        .permissions(VolumePermissionsArgs.builder()
            .group("string")
            .label("string")
            .mode("string")
            .owner("string")
            .build())
        .type("string")
        .build());
    
    volume_resource = libvirt.Volume("volumeResource",
        pool="string",
        backing_store={
            "path": "string",
            "format": "string",
        },
        capacity=0,
        create={
            "content": {
                "url": "string",
            },
        },
        format="string",
        name="string",
        permissions={
            "group": "string",
            "label": "string",
            "mode": "string",
            "owner": "string",
        },
        type="string")
    
    const volumeResource = new libvirt.Volume("volumeResource", {
        pool: "string",
        backingStore: {
            path: "string",
            format: "string",
        },
        capacity: 0,
        create: {
            content: {
                url: "string",
            },
        },
        format: "string",
        name: "string",
        permissions: {
            group: "string",
            label: "string",
            mode: "string",
            owner: "string",
        },
        type: "string",
    });
    
    type: libvirt:Volume
    properties:
        backingStore:
            format: string
            path: string
        capacity: 0
        create:
            content:
                url: string
        format: string
        name: string
        permissions:
            group: string
            label: string
            mode: string
            owner: string
        pool: string
        type: string
    

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

    Pool string
    Name of the storage pool where the volume will be created
    BackingStore VolumeBackingStore
    Backing store configuration for copy-on-write volumes
    Capacity double
    Volume capacity in bytes. Required for empty volumes, computed when using create.content
    Create VolumeCreate
    Volume creation options for initializing volume content from external sources
    Format string
    Volume format (qcow2, raw, etc.)
    Name string
    Name of the storage volume
    Permissions VolumePermissions
    Permissions for the volume file
    Type string
    Volume type (file, block, dir, network, netdir)
    Pool string
    Name of the storage pool where the volume will be created
    BackingStore VolumeBackingStoreArgs
    Backing store configuration for copy-on-write volumes
    Capacity float64
    Volume capacity in bytes. Required for empty volumes, computed when using create.content
    Create VolumeCreateArgs
    Volume creation options for initializing volume content from external sources
    Format string
    Volume format (qcow2, raw, etc.)
    Name string
    Name of the storage volume
    Permissions VolumePermissionsArgs
    Permissions for the volume file
    Type string
    Volume type (file, block, dir, network, netdir)
    pool String
    Name of the storage pool where the volume will be created
    backingStore VolumeBackingStore
    Backing store configuration for copy-on-write volumes
    capacity Double
    Volume capacity in bytes. Required for empty volumes, computed when using create.content
    create VolumeCreate
    Volume creation options for initializing volume content from external sources
    format String
    Volume format (qcow2, raw, etc.)
    name String
    Name of the storage volume
    permissions VolumePermissions
    Permissions for the volume file
    type String
    Volume type (file, block, dir, network, netdir)
    pool string
    Name of the storage pool where the volume will be created
    backingStore VolumeBackingStore
    Backing store configuration for copy-on-write volumes
    capacity number
    Volume capacity in bytes. Required for empty volumes, computed when using create.content
    create VolumeCreate
    Volume creation options for initializing volume content from external sources
    format string
    Volume format (qcow2, raw, etc.)
    name string
    Name of the storage volume
    permissions VolumePermissions
    Permissions for the volume file
    type string
    Volume type (file, block, dir, network, netdir)
    pool str
    Name of the storage pool where the volume will be created
    backing_store VolumeBackingStoreArgs
    Backing store configuration for copy-on-write volumes
    capacity float
    Volume capacity in bytes. Required for empty volumes, computed when using create.content
    create VolumeCreateArgs
    Volume creation options for initializing volume content from external sources
    format str
    Volume format (qcow2, raw, etc.)
    name str
    Name of the storage volume
    permissions VolumePermissionsArgs
    Permissions for the volume file
    type str
    Volume type (file, block, dir, network, netdir)
    pool String
    Name of the storage pool where the volume will be created
    backingStore Property Map
    Backing store configuration for copy-on-write volumes
    capacity Number
    Volume capacity in bytes. Required for empty volumes, computed when using create.content
    create Property Map
    Volume creation options for initializing volume content from external sources
    format String
    Volume format (qcow2, raw, etc.)
    name String
    Name of the storage volume
    permissions Property Map
    Permissions for the volume file
    type String
    Volume type (file, block, dir, network, netdir)

    Outputs

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

    Allocation double
    Currently allocated size in bytes
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    Unique key of the storage volume
    Path string
    Full path to the volume on the host
    Allocation float64
    Currently allocated size in bytes
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    Unique key of the storage volume
    Path string
    Full path to the volume on the host
    allocation Double
    Currently allocated size in bytes
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    Unique key of the storage volume
    path String
    Full path to the volume on the host
    allocation number
    Currently allocated size in bytes
    id string
    The provider-assigned unique ID for this managed resource.
    key string
    Unique key of the storage volume
    path string
    Full path to the volume on the host
    allocation float
    Currently allocated size in bytes
    id str
    The provider-assigned unique ID for this managed resource.
    key str
    Unique key of the storage volume
    path str
    Full path to the volume on the host
    allocation Number
    Currently allocated size in bytes
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    Unique key of the storage volume
    path String
    Full path to the volume on the host

    Look up Existing Volume Resource

    Get an existing Volume 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?: VolumeState, opts?: CustomResourceOptions): Volume
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allocation: Optional[float] = None,
            backing_store: Optional[VolumeBackingStoreArgs] = None,
            capacity: Optional[float] = None,
            create: Optional[VolumeCreateArgs] = None,
            format: Optional[str] = None,
            key: Optional[str] = None,
            name: Optional[str] = None,
            path: Optional[str] = None,
            permissions: Optional[VolumePermissionsArgs] = None,
            pool: Optional[str] = None,
            type: Optional[str] = None) -> Volume
    func GetVolume(ctx *Context, name string, id IDInput, state *VolumeState, opts ...ResourceOption) (*Volume, error)
    public static Volume Get(string name, Input<string> id, VolumeState? state, CustomResourceOptions? opts = null)
    public static Volume get(String name, Output<String> id, VolumeState state, CustomResourceOptions options)
    resources:  _:    type: libvirt:Volume    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Allocation double
    Currently allocated size in bytes
    BackingStore VolumeBackingStore
    Backing store configuration for copy-on-write volumes
    Capacity double
    Volume capacity in bytes. Required for empty volumes, computed when using create.content
    Create VolumeCreate
    Volume creation options for initializing volume content from external sources
    Format string
    Volume format (qcow2, raw, etc.)
    Key string
    Unique key of the storage volume
    Name string
    Name of the storage volume
    Path string
    Full path to the volume on the host
    Permissions VolumePermissions
    Permissions for the volume file
    Pool string
    Name of the storage pool where the volume will be created
    Type string
    Volume type (file, block, dir, network, netdir)
    Allocation float64
    Currently allocated size in bytes
    BackingStore VolumeBackingStoreArgs
    Backing store configuration for copy-on-write volumes
    Capacity float64
    Volume capacity in bytes. Required for empty volumes, computed when using create.content
    Create VolumeCreateArgs
    Volume creation options for initializing volume content from external sources
    Format string
    Volume format (qcow2, raw, etc.)
    Key string
    Unique key of the storage volume
    Name string
    Name of the storage volume
    Path string
    Full path to the volume on the host
    Permissions VolumePermissionsArgs
    Permissions for the volume file
    Pool string
    Name of the storage pool where the volume will be created
    Type string
    Volume type (file, block, dir, network, netdir)
    allocation Double
    Currently allocated size in bytes
    backingStore VolumeBackingStore
    Backing store configuration for copy-on-write volumes
    capacity Double
    Volume capacity in bytes. Required for empty volumes, computed when using create.content
    create VolumeCreate
    Volume creation options for initializing volume content from external sources
    format String
    Volume format (qcow2, raw, etc.)
    key String
    Unique key of the storage volume
    name String
    Name of the storage volume
    path String
    Full path to the volume on the host
    permissions VolumePermissions
    Permissions for the volume file
    pool String
    Name of the storage pool where the volume will be created
    type String
    Volume type (file, block, dir, network, netdir)
    allocation number
    Currently allocated size in bytes
    backingStore VolumeBackingStore
    Backing store configuration for copy-on-write volumes
    capacity number
    Volume capacity in bytes. Required for empty volumes, computed when using create.content
    create VolumeCreate
    Volume creation options for initializing volume content from external sources
    format string
    Volume format (qcow2, raw, etc.)
    key string
    Unique key of the storage volume
    name string
    Name of the storage volume
    path string
    Full path to the volume on the host
    permissions VolumePermissions
    Permissions for the volume file
    pool string
    Name of the storage pool where the volume will be created
    type string
    Volume type (file, block, dir, network, netdir)
    allocation float
    Currently allocated size in bytes
    backing_store VolumeBackingStoreArgs
    Backing store configuration for copy-on-write volumes
    capacity float
    Volume capacity in bytes. Required for empty volumes, computed when using create.content
    create VolumeCreateArgs
    Volume creation options for initializing volume content from external sources
    format str
    Volume format (qcow2, raw, etc.)
    key str
    Unique key of the storage volume
    name str
    Name of the storage volume
    path str
    Full path to the volume on the host
    permissions VolumePermissionsArgs
    Permissions for the volume file
    pool str
    Name of the storage pool where the volume will be created
    type str
    Volume type (file, block, dir, network, netdir)
    allocation Number
    Currently allocated size in bytes
    backingStore Property Map
    Backing store configuration for copy-on-write volumes
    capacity Number
    Volume capacity in bytes. Required for empty volumes, computed when using create.content
    create Property Map
    Volume creation options for initializing volume content from external sources
    format String
    Volume format (qcow2, raw, etc.)
    key String
    Unique key of the storage volume
    name String
    Name of the storage volume
    path String
    Full path to the volume on the host
    permissions Property Map
    Permissions for the volume file
    pool String
    Name of the storage pool where the volume will be created
    type String
    Volume type (file, block, dir, network, netdir)

    Supporting Types

    VolumeBackingStore, VolumeBackingStoreArgs

    Path string
    Path to the backing volume
    Format string
    Format of the backing volume
    Path string
    Path to the backing volume
    Format string
    Format of the backing volume
    path String
    Path to the backing volume
    format String
    Format of the backing volume
    path string
    Path to the backing volume
    format string
    Format of the backing volume
    path str
    Path to the backing volume
    format str
    Format of the backing volume
    path String
    Path to the backing volume
    format String
    Format of the backing volume

    VolumeCreate, VolumeCreateArgs

    Content VolumeCreateContent
    Upload content from a URL or local file
    Content VolumeCreateContent
    Upload content from a URL or local file
    content VolumeCreateContent
    Upload content from a URL or local file
    content VolumeCreateContent
    Upload content from a URL or local file
    content VolumeCreateContent
    Upload content from a URL or local file
    content Property Map
    Upload content from a URL or local file

    VolumeCreateContent, VolumeCreateContentArgs

    Url string
    URL to download content from (supports https://, file://, or absolute paths)
    Url string
    URL to download content from (supports https://, file://, or absolute paths)
    url String
    URL to download content from (supports https://, file://, or absolute paths)
    url string
    URL to download content from (supports https://, file://, or absolute paths)
    url str
    URL to download content from (supports https://, file://, or absolute paths)
    url String
    URL to download content from (supports https://, file://, or absolute paths)

    VolumePermissions, VolumePermissionsArgs

    Group string
    Numeric group ID for the volume file group
    Label string
    SELinux label for the volume file
    Mode string
    Octal permission mode for the volume file (e.g., '0644')
    Owner string
    Numeric user ID for the volume file owner
    Group string
    Numeric group ID for the volume file group
    Label string
    SELinux label for the volume file
    Mode string
    Octal permission mode for the volume file (e.g., '0644')
    Owner string
    Numeric user ID for the volume file owner
    group String
    Numeric group ID for the volume file group
    label String
    SELinux label for the volume file
    mode String
    Octal permission mode for the volume file (e.g., '0644')
    owner String
    Numeric user ID for the volume file owner
    group string
    Numeric group ID for the volume file group
    label string
    SELinux label for the volume file
    mode string
    Octal permission mode for the volume file (e.g., '0644')
    owner string
    Numeric user ID for the volume file owner
    group str
    Numeric group ID for the volume file group
    label str
    SELinux label for the volume file
    mode str
    Octal permission mode for the volume file (e.g., '0644')
    owner str
    Numeric user ID for the volume file owner
    group String
    Numeric group ID for the volume file group
    label String
    SELinux label for the volume file
    mode String
    Octal permission mode for the volume file (e.g., '0644')
    owner String
    Numeric user ID for the volume file owner

    Package Details

    Repository
    libvirt dmacvicar/terraform-provider-libvirt
    License
    Notes
    This Pulumi package is based on the libvirt Terraform Provider.
    libvirt logo
    libvirt 0.9.0 published on Saturday, Nov 8, 2025 by dmacvicar
      Meet Neo: Your AI Platform Teammate