1. Packages
  2. Libvirt Provider
  3. API Docs
  4. Volume
libvirt 0.9.1 published on Monday, Dec 1, 2025 by dmacvicar
libvirt logo
libvirt 0.9.1 published on Monday, Dec 1, 2025 by dmacvicar

    Storage volume within a storage pool

    Example Usage

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    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,
               allocation_unit: Optional[str] = None,
               backing_store: Optional[VolumeBackingStoreArgs] = None,
               capacity: Optional[float] = None,
               capacity_unit: Optional[str] = None,
               create: Optional[VolumeCreateArgs] = None,
               name: Optional[str] = None,
               physical_unit: Optional[str] = None,
               target: Optional[VolumeTargetArgs] = 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",
        AllocationUnit = "string",
        BackingStore = new Libvirt.Inputs.VolumeBackingStoreArgs
        {
            Path = "string",
            Format = new Libvirt.Inputs.VolumeBackingStoreFormatArgs
            {
                Type = "string",
            },
            Permissions = new Libvirt.Inputs.VolumeBackingStorePermissionsArgs
            {
                Group = "string",
                Label = "string",
                Mode = "string",
                Owner = "string",
            },
        },
        Capacity = 0,
        CapacityUnit = "string",
        Create = new Libvirt.Inputs.VolumeCreateArgs
        {
            Content = new Libvirt.Inputs.VolumeCreateContentArgs
            {
                Url = "string",
            },
        },
        Name = "string",
        PhysicalUnit = "string",
        Target = new Libvirt.Inputs.VolumeTargetArgs
        {
            ClusterSize = 0,
            ClusterSizeUnit = "string",
            Compat = "string",
            Encryption = new Libvirt.Inputs.VolumeTargetEncryptionArgs
            {
                Format = "string",
                Cipher = new Libvirt.Inputs.VolumeTargetEncryptionCipherArgs
                {
                    Hash = "string",
                    Mode = "string",
                    Name = "string",
                    Size = 0,
                },
                Ivgen = new Libvirt.Inputs.VolumeTargetEncryptionIvgenArgs
                {
                    Hash = "string",
                    Name = "string",
                },
                Secret = new Libvirt.Inputs.VolumeTargetEncryptionSecretArgs
                {
                    Type = "string",
                    Uuid = "string",
                },
            },
            Features = new[]
            {
                null,
            },
            Format = new Libvirt.Inputs.VolumeTargetFormatArgs
            {
                Type = "string",
            },
            Path = "string",
            Permissions = new Libvirt.Inputs.VolumeTargetPermissionsArgs
            {
                Group = "string",
                Label = "string",
                Mode = "string",
                Owner = "string",
            },
            Timestamps = new Libvirt.Inputs.VolumeTargetTimestampsArgs
            {
                Atime = "string",
                Ctime = "string",
                Mtime = "string",
            },
        },
        Type = "string",
    });
    
    example, err := libvirt.NewVolume(ctx, "volumeResource", &libvirt.VolumeArgs{
    	Pool:           pulumi.String("string"),
    	AllocationUnit: pulumi.String("string"),
    	BackingStore: &libvirt.VolumeBackingStoreArgs{
    		Path: pulumi.String("string"),
    		Format: &libvirt.VolumeBackingStoreFormatArgs{
    			Type: pulumi.String("string"),
    		},
    		Permissions: &libvirt.VolumeBackingStorePermissionsArgs{
    			Group: pulumi.String("string"),
    			Label: pulumi.String("string"),
    			Mode:  pulumi.String("string"),
    			Owner: pulumi.String("string"),
    		},
    	},
    	Capacity:     pulumi.Float64(0),
    	CapacityUnit: pulumi.String("string"),
    	Create: &libvirt.VolumeCreateArgs{
    		Content: &libvirt.VolumeCreateContentArgs{
    			Url: pulumi.String("string"),
    		},
    	},
    	Name:         pulumi.String("string"),
    	PhysicalUnit: pulumi.String("string"),
    	Target: &libvirt.VolumeTargetArgs{
    		ClusterSize:     pulumi.Float64(0),
    		ClusterSizeUnit: pulumi.String("string"),
    		Compat:          pulumi.String("string"),
    		Encryption: &libvirt.VolumeTargetEncryptionArgs{
    			Format: pulumi.String("string"),
    			Cipher: &libvirt.VolumeTargetEncryptionCipherArgs{
    				Hash: pulumi.String("string"),
    				Mode: pulumi.String("string"),
    				Name: pulumi.String("string"),
    				Size: pulumi.Float64(0),
    			},
    			Ivgen: &libvirt.VolumeTargetEncryptionIvgenArgs{
    				Hash: pulumi.String("string"),
    				Name: pulumi.String("string"),
    			},
    			Secret: &libvirt.VolumeTargetEncryptionSecretArgs{
    				Type: pulumi.String("string"),
    				Uuid: pulumi.String("string"),
    			},
    		},
    		Features: libvirt.VolumeTargetFeatureArray{
    			&libvirt.VolumeTargetFeatureArgs{},
    		},
    		Format: &libvirt.VolumeTargetFormatArgs{
    			Type: pulumi.String("string"),
    		},
    		Path: pulumi.String("string"),
    		Permissions: &libvirt.VolumeTargetPermissionsArgs{
    			Group: pulumi.String("string"),
    			Label: pulumi.String("string"),
    			Mode:  pulumi.String("string"),
    			Owner: pulumi.String("string"),
    		},
    		Timestamps: &libvirt.VolumeTargetTimestampsArgs{
    			Atime: pulumi.String("string"),
    			Ctime: pulumi.String("string"),
    			Mtime: pulumi.String("string"),
    		},
    	},
    	Type: pulumi.String("string"),
    })
    
    var volumeResource = new Volume("volumeResource", VolumeArgs.builder()
        .pool("string")
        .allocationUnit("string")
        .backingStore(VolumeBackingStoreArgs.builder()
            .path("string")
            .format(VolumeBackingStoreFormatArgs.builder()
                .type("string")
                .build())
            .permissions(VolumeBackingStorePermissionsArgs.builder()
                .group("string")
                .label("string")
                .mode("string")
                .owner("string")
                .build())
            .build())
        .capacity(0.0)
        .capacityUnit("string")
        .create(VolumeCreateArgs.builder()
            .content(VolumeCreateContentArgs.builder()
                .url("string")
                .build())
            .build())
        .name("string")
        .physicalUnit("string")
        .target(VolumeTargetArgs.builder()
            .clusterSize(0.0)
            .clusterSizeUnit("string")
            .compat("string")
            .encryption(VolumeTargetEncryptionArgs.builder()
                .format("string")
                .cipher(VolumeTargetEncryptionCipherArgs.builder()
                    .hash("string")
                    .mode("string")
                    .name("string")
                    .size(0.0)
                    .build())
                .ivgen(VolumeTargetEncryptionIvgenArgs.builder()
                    .hash("string")
                    .name("string")
                    .build())
                .secret(VolumeTargetEncryptionSecretArgs.builder()
                    .type("string")
                    .uuid("string")
                    .build())
                .build())
            .features(VolumeTargetFeatureArgs.builder()
                .build())
            .format(VolumeTargetFormatArgs.builder()
                .type("string")
                .build())
            .path("string")
            .permissions(VolumeTargetPermissionsArgs.builder()
                .group("string")
                .label("string")
                .mode("string")
                .owner("string")
                .build())
            .timestamps(VolumeTargetTimestampsArgs.builder()
                .atime("string")
                .ctime("string")
                .mtime("string")
                .build())
            .build())
        .type("string")
        .build());
    
    volume_resource = libvirt.Volume("volumeResource",
        pool="string",
        allocation_unit="string",
        backing_store={
            "path": "string",
            "format": {
                "type": "string",
            },
            "permissions": {
                "group": "string",
                "label": "string",
                "mode": "string",
                "owner": "string",
            },
        },
        capacity=0,
        capacity_unit="string",
        create={
            "content": {
                "url": "string",
            },
        },
        name="string",
        physical_unit="string",
        target={
            "cluster_size": 0,
            "cluster_size_unit": "string",
            "compat": "string",
            "encryption": {
                "format": "string",
                "cipher": {
                    "hash": "string",
                    "mode": "string",
                    "name": "string",
                    "size": 0,
                },
                "ivgen": {
                    "hash": "string",
                    "name": "string",
                },
                "secret": {
                    "type": "string",
                    "uuid": "string",
                },
            },
            "features": [{}],
            "format": {
                "type": "string",
            },
            "path": "string",
            "permissions": {
                "group": "string",
                "label": "string",
                "mode": "string",
                "owner": "string",
            },
            "timestamps": {
                "atime": "string",
                "ctime": "string",
                "mtime": "string",
            },
        },
        type="string")
    
    const volumeResource = new libvirt.Volume("volumeResource", {
        pool: "string",
        allocationUnit: "string",
        backingStore: {
            path: "string",
            format: {
                type: "string",
            },
            permissions: {
                group: "string",
                label: "string",
                mode: "string",
                owner: "string",
            },
        },
        capacity: 0,
        capacityUnit: "string",
        create: {
            content: {
                url: "string",
            },
        },
        name: "string",
        physicalUnit: "string",
        target: {
            clusterSize: 0,
            clusterSizeUnit: "string",
            compat: "string",
            encryption: {
                format: "string",
                cipher: {
                    hash: "string",
                    mode: "string",
                    name: "string",
                    size: 0,
                },
                ivgen: {
                    hash: "string",
                    name: "string",
                },
                secret: {
                    type: "string",
                    uuid: "string",
                },
            },
            features: [{}],
            format: {
                type: "string",
            },
            path: "string",
            permissions: {
                group: "string",
                label: "string",
                mode: "string",
                owner: "string",
            },
            timestamps: {
                atime: "string",
                ctime: "string",
                mtime: "string",
            },
        },
        type: "string",
    });
    
    type: libvirt:Volume
    properties:
        allocationUnit: string
        backingStore:
            format:
                type: string
            path: string
            permissions:
                group: string
                label: string
                mode: string
                owner: string
        capacity: 0
        capacityUnit: string
        create:
            content:
                url: string
        name: string
        physicalUnit: string
        pool: string
        target:
            clusterSize: 0
            clusterSizeUnit: string
            compat: string
            encryption:
                cipher:
                    hash: string
                    mode: string
                    name: string
                    size: 0
                format: string
                ivgen:
                    hash: string
                    name: string
                secret:
                    type: string
                    uuid: string
            features:
                - {}
            format:
                type: string
            path: string
            permissions:
                group: string
                label: string
                mode: string
                owner: string
            timestamps:
                atime: string
                ctime: string
                mtime: 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
    AllocationUnit string
    Specifies the units for the allocated space in the storage volume.
    BackingStore VolumeBackingStore
    Backing store configuration for copy-on-write volumes
    Capacity double
    Volume capacity in bytes (required unless using create.content)
    CapacityUnit string
    Specifies the units for the total capacity in the storage volume.
    Create VolumeCreate
    Volume creation options for initializing volume content from external sources
    Name string
    Sets the name for the storage volume, which must be unique within the pool.
    PhysicalUnit string
    Specifies the units for the physical size in the storage volume.
    Target VolumeTarget
    Type string
    Specifies the type of the storage volume, allowing for distinction of different volume types.
    Pool string
    Name of the storage pool where the volume will be created
    AllocationUnit string
    Specifies the units for the allocated space in the storage volume.
    BackingStore VolumeBackingStoreArgs
    Backing store configuration for copy-on-write volumes
    Capacity float64
    Volume capacity in bytes (required unless using create.content)
    CapacityUnit string
    Specifies the units for the total capacity in the storage volume.
    Create VolumeCreateArgs
    Volume creation options for initializing volume content from external sources
    Name string
    Sets the name for the storage volume, which must be unique within the pool.
    PhysicalUnit string
    Specifies the units for the physical size in the storage volume.
    Target VolumeTargetArgs
    Type string
    Specifies the type of the storage volume, allowing for distinction of different volume types.
    pool String
    Name of the storage pool where the volume will be created
    allocationUnit String
    Specifies the units for the allocated space in the storage volume.
    backingStore VolumeBackingStore
    Backing store configuration for copy-on-write volumes
    capacity Double
    Volume capacity in bytes (required unless using create.content)
    capacityUnit String
    Specifies the units for the total capacity in the storage volume.
    create VolumeCreate
    Volume creation options for initializing volume content from external sources
    name String
    Sets the name for the storage volume, which must be unique within the pool.
    physicalUnit String
    Specifies the units for the physical size in the storage volume.
    target VolumeTarget
    type String
    Specifies the type of the storage volume, allowing for distinction of different volume types.
    pool string
    Name of the storage pool where the volume will be created
    allocationUnit string
    Specifies the units for the allocated space in the storage volume.
    backingStore VolumeBackingStore
    Backing store configuration for copy-on-write volumes
    capacity number
    Volume capacity in bytes (required unless using create.content)
    capacityUnit string
    Specifies the units for the total capacity in the storage volume.
    create VolumeCreate
    Volume creation options for initializing volume content from external sources
    name string
    Sets the name for the storage volume, which must be unique within the pool.
    physicalUnit string
    Specifies the units for the physical size in the storage volume.
    target VolumeTarget
    type string
    Specifies the type of the storage volume, allowing for distinction of different volume types.
    pool str
    Name of the storage pool where the volume will be created
    allocation_unit str
    Specifies the units for the allocated space in the storage volume.
    backing_store VolumeBackingStoreArgs
    Backing store configuration for copy-on-write volumes
    capacity float
    Volume capacity in bytes (required unless using create.content)
    capacity_unit str
    Specifies the units for the total capacity in the storage volume.
    create VolumeCreateArgs
    Volume creation options for initializing volume content from external sources
    name str
    Sets the name for the storage volume, which must be unique within the pool.
    physical_unit str
    Specifies the units for the physical size in the storage volume.
    target VolumeTargetArgs
    type str
    Specifies the type of the storage volume, allowing for distinction of different volume types.
    pool String
    Name of the storage pool where the volume will be created
    allocationUnit String
    Specifies the units for the allocated space in the storage volume.
    backingStore Property Map
    Backing store configuration for copy-on-write volumes
    capacity Number
    Volume capacity in bytes (required unless using create.content)
    capacityUnit String
    Specifies the units for the total capacity in the storage volume.
    create Property Map
    Volume creation options for initializing volume content from external sources
    name String
    Sets the name for the storage volume, which must be unique within the pool.
    physicalUnit String
    Specifies the units for the physical size in the storage volume.
    target Property Map
    type String
    Specifies the type of the storage volume, allowing for distinction of different volume types.

    Outputs

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

    Allocation double
    Configures the total amount of space allocated for the storage volume.
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    Defines a unique key identifier for the storage volume.
    Path string
    Volume path on the host filesystem (same as target.path)
    Physical double
    Configures the physical size of the storage volume.
    Allocation float64
    Configures the total amount of space allocated for the storage volume.
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    Defines a unique key identifier for the storage volume.
    Path string
    Volume path on the host filesystem (same as target.path)
    Physical float64
    Configures the physical size of the storage volume.
    allocation Double
    Configures the total amount of space allocated for the storage volume.
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    Defines a unique key identifier for the storage volume.
    path String
    Volume path on the host filesystem (same as target.path)
    physical Double
    Configures the physical size of the storage volume.
    allocation number
    Configures the total amount of space allocated for the storage volume.
    id string
    The provider-assigned unique ID for this managed resource.
    key string
    Defines a unique key identifier for the storage volume.
    path string
    Volume path on the host filesystem (same as target.path)
    physical number
    Configures the physical size of the storage volume.
    allocation float
    Configures the total amount of space allocated for the storage volume.
    id str
    The provider-assigned unique ID for this managed resource.
    key str
    Defines a unique key identifier for the storage volume.
    path str
    Volume path on the host filesystem (same as target.path)
    physical float
    Configures the physical size of the storage volume.
    allocation Number
    Configures the total amount of space allocated for the storage volume.
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    Defines a unique key identifier for the storage volume.
    path String
    Volume path on the host filesystem (same as target.path)
    physical Number
    Configures the physical size of the storage volume.

    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,
            allocation_unit: Optional[str] = None,
            backing_store: Optional[VolumeBackingStoreArgs] = None,
            capacity: Optional[float] = None,
            capacity_unit: Optional[str] = None,
            create: Optional[VolumeCreateArgs] = None,
            key: Optional[str] = None,
            name: Optional[str] = None,
            path: Optional[str] = None,
            physical: Optional[float] = None,
            physical_unit: Optional[str] = None,
            pool: Optional[str] = None,
            target: Optional[VolumeTargetArgs] = 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
    Configures the total amount of space allocated for the storage volume.
    AllocationUnit string
    Specifies the units for the allocated space in the storage volume.
    BackingStore VolumeBackingStore
    Backing store configuration for copy-on-write volumes
    Capacity double
    Volume capacity in bytes (required unless using create.content)
    CapacityUnit string
    Specifies the units for the total capacity in the storage volume.
    Create VolumeCreate
    Volume creation options for initializing volume content from external sources
    Key string
    Defines a unique key identifier for the storage volume.
    Name string
    Sets the name for the storage volume, which must be unique within the pool.
    Path string
    Volume path on the host filesystem (same as target.path)
    Physical double
    Configures the physical size of the storage volume.
    PhysicalUnit string
    Specifies the units for the physical size in the storage volume.
    Pool string
    Name of the storage pool where the volume will be created
    Target VolumeTarget
    Type string
    Specifies the type of the storage volume, allowing for distinction of different volume types.
    Allocation float64
    Configures the total amount of space allocated for the storage volume.
    AllocationUnit string
    Specifies the units for the allocated space in the storage volume.
    BackingStore VolumeBackingStoreArgs
    Backing store configuration for copy-on-write volumes
    Capacity float64
    Volume capacity in bytes (required unless using create.content)
    CapacityUnit string
    Specifies the units for the total capacity in the storage volume.
    Create VolumeCreateArgs
    Volume creation options for initializing volume content from external sources
    Key string
    Defines a unique key identifier for the storage volume.
    Name string
    Sets the name for the storage volume, which must be unique within the pool.
    Path string
    Volume path on the host filesystem (same as target.path)
    Physical float64
    Configures the physical size of the storage volume.
    PhysicalUnit string
    Specifies the units for the physical size in the storage volume.
    Pool string
    Name of the storage pool where the volume will be created
    Target VolumeTargetArgs
    Type string
    Specifies the type of the storage volume, allowing for distinction of different volume types.
    allocation Double
    Configures the total amount of space allocated for the storage volume.
    allocationUnit String
    Specifies the units for the allocated space in the storage volume.
    backingStore VolumeBackingStore
    Backing store configuration for copy-on-write volumes
    capacity Double
    Volume capacity in bytes (required unless using create.content)
    capacityUnit String
    Specifies the units for the total capacity in the storage volume.
    create VolumeCreate
    Volume creation options for initializing volume content from external sources
    key String
    Defines a unique key identifier for the storage volume.
    name String
    Sets the name for the storage volume, which must be unique within the pool.
    path String
    Volume path on the host filesystem (same as target.path)
    physical Double
    Configures the physical size of the storage volume.
    physicalUnit String
    Specifies the units for the physical size in the storage volume.
    pool String
    Name of the storage pool where the volume will be created
    target VolumeTarget
    type String
    Specifies the type of the storage volume, allowing for distinction of different volume types.
    allocation number
    Configures the total amount of space allocated for the storage volume.
    allocationUnit string
    Specifies the units for the allocated space in the storage volume.
    backingStore VolumeBackingStore
    Backing store configuration for copy-on-write volumes
    capacity number
    Volume capacity in bytes (required unless using create.content)
    capacityUnit string
    Specifies the units for the total capacity in the storage volume.
    create VolumeCreate
    Volume creation options for initializing volume content from external sources
    key string
    Defines a unique key identifier for the storage volume.
    name string
    Sets the name for the storage volume, which must be unique within the pool.
    path string
    Volume path on the host filesystem (same as target.path)
    physical number
    Configures the physical size of the storage volume.
    physicalUnit string
    Specifies the units for the physical size in the storage volume.
    pool string
    Name of the storage pool where the volume will be created
    target VolumeTarget
    type string
    Specifies the type of the storage volume, allowing for distinction of different volume types.
    allocation float
    Configures the total amount of space allocated for the storage volume.
    allocation_unit str
    Specifies the units for the allocated space in the storage volume.
    backing_store VolumeBackingStoreArgs
    Backing store configuration for copy-on-write volumes
    capacity float
    Volume capacity in bytes (required unless using create.content)
    capacity_unit str
    Specifies the units for the total capacity in the storage volume.
    create VolumeCreateArgs
    Volume creation options for initializing volume content from external sources
    key str
    Defines a unique key identifier for the storage volume.
    name str
    Sets the name for the storage volume, which must be unique within the pool.
    path str
    Volume path on the host filesystem (same as target.path)
    physical float
    Configures the physical size of the storage volume.
    physical_unit str
    Specifies the units for the physical size in the storage volume.
    pool str
    Name of the storage pool where the volume will be created
    target VolumeTargetArgs
    type str
    Specifies the type of the storage volume, allowing for distinction of different volume types.
    allocation Number
    Configures the total amount of space allocated for the storage volume.
    allocationUnit String
    Specifies the units for the allocated space in the storage volume.
    backingStore Property Map
    Backing store configuration for copy-on-write volumes
    capacity Number
    Volume capacity in bytes (required unless using create.content)
    capacityUnit String
    Specifies the units for the total capacity in the storage volume.
    create Property Map
    Volume creation options for initializing volume content from external sources
    key String
    Defines a unique key identifier for the storage volume.
    name String
    Sets the name for the storage volume, which must be unique within the pool.
    path String
    Volume path on the host filesystem (same as target.path)
    physical Number
    Configures the physical size of the storage volume.
    physicalUnit String
    Specifies the units for the physical size in the storage volume.
    pool String
    Name of the storage pool where the volume will be created
    target Property Map
    type String
    Specifies the type of the storage volume, allowing for distinction of different volume types.

    Supporting Types

    VolumeBackingStore, VolumeBackingStoreArgs

    Path string
    Defines the path to the backing store for the storage volume.
    Format VolumeBackingStoreFormat
    Sets the format type for the backing store of the storage volume.
    Permissions VolumeBackingStorePermissions
    Configures the permissions for the backing store of the storage volume.
    Path string
    Defines the path to the backing store for the storage volume.
    Format VolumeBackingStoreFormat
    Sets the format type for the backing store of the storage volume.
    Permissions VolumeBackingStorePermissions
    Configures the permissions for the backing store of the storage volume.
    path String
    Defines the path to the backing store for the storage volume.
    format VolumeBackingStoreFormat
    Sets the format type for the backing store of the storage volume.
    permissions VolumeBackingStorePermissions
    Configures the permissions for the backing store of the storage volume.
    path string
    Defines the path to the backing store for the storage volume.
    format VolumeBackingStoreFormat
    Sets the format type for the backing store of the storage volume.
    permissions VolumeBackingStorePermissions
    Configures the permissions for the backing store of the storage volume.
    path str
    Defines the path to the backing store for the storage volume.
    format VolumeBackingStoreFormat
    Sets the format type for the backing store of the storage volume.
    permissions VolumeBackingStorePermissions
    Configures the permissions for the backing store of the storage volume.
    path String
    Defines the path to the backing store for the storage volume.
    format Property Map
    Sets the format type for the backing store of the storage volume.
    permissions Property Map
    Configures the permissions for the backing store of the storage volume.

    VolumeBackingStoreFormat, VolumeBackingStoreFormatArgs

    Type string
    Specifies the type of the backing store format used for the storage volume.
    Type string
    Specifies the type of the backing store format used for the storage volume.
    type String
    Specifies the type of the backing store format used for the storage volume.
    type string
    Specifies the type of the backing store format used for the storage volume.
    type str
    Specifies the type of the backing store format used for the storage volume.
    type String
    Specifies the type of the backing store format used for the storage volume.

    VolumeBackingStorePermissions, VolumeBackingStorePermissionsArgs

    Group string
    Sets the group ownership for the backing store permissions of the volume.
    Label string
    Configures the label associated with the backing store permissions.
    Mode string
    Specifies the mode (file permissions) for the backing store of the volume.
    Owner string
    Defines the owner of the backing store permissions for the volume.
    Group string
    Sets the group ownership for the backing store permissions of the volume.
    Label string
    Configures the label associated with the backing store permissions.
    Mode string
    Specifies the mode (file permissions) for the backing store of the volume.
    Owner string
    Defines the owner of the backing store permissions for the volume.
    group String
    Sets the group ownership for the backing store permissions of the volume.
    label String
    Configures the label associated with the backing store permissions.
    mode String
    Specifies the mode (file permissions) for the backing store of the volume.
    owner String
    Defines the owner of the backing store permissions for the volume.
    group string
    Sets the group ownership for the backing store permissions of the volume.
    label string
    Configures the label associated with the backing store permissions.
    mode string
    Specifies the mode (file permissions) for the backing store of the volume.
    owner string
    Defines the owner of the backing store permissions for the volume.
    group str
    Sets the group ownership for the backing store permissions of the volume.
    label str
    Configures the label associated with the backing store permissions.
    mode str
    Specifies the mode (file permissions) for the backing store of the volume.
    owner str
    Defines the owner of the backing store permissions for the volume.
    group String
    Sets the group ownership for the backing store permissions of the volume.
    label String
    Configures the label associated with the backing store permissions.
    mode String
    Specifies the mode (file permissions) for the backing store of the volume.
    owner String
    Defines the owner of the backing store permissions for the 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
    Url string
    URL to download content from
    url String
    URL to download content from
    url string
    URL to download content from
    url str
    URL to download content from
    url String
    URL to download content from

    VolumeTarget, VolumeTargetArgs

    ClusterSize double
    Configures the cluster size of the storage volume.
    ClusterSizeUnit string
    Specifies the units for the cluster size of the storage volume.
    Compat string
    Sets compatibility settings for the storage volume target.
    Encryption VolumeTargetEncryption
    Configures the encryption settings for the storage volume.
    Features List<VolumeTargetFeature>
    Enables specific features for the storage volume target.
    Format VolumeTargetFormat
    Sets the format type for the backing store of the storage volume.
    Path string
    Volume path on the host filesystem
    Permissions VolumeTargetPermissions
    Configures the permissions for the backing store of the storage volume.
    Timestamps VolumeTargetTimestamps
    Records the timestamp information for the storage volume target.
    ClusterSize float64
    Configures the cluster size of the storage volume.
    ClusterSizeUnit string
    Specifies the units for the cluster size of the storage volume.
    Compat string
    Sets compatibility settings for the storage volume target.
    Encryption VolumeTargetEncryption
    Configures the encryption settings for the storage volume.
    Features []VolumeTargetFeature
    Enables specific features for the storage volume target.
    Format VolumeTargetFormat
    Sets the format type for the backing store of the storage volume.
    Path string
    Volume path on the host filesystem
    Permissions VolumeTargetPermissions
    Configures the permissions for the backing store of the storage volume.
    Timestamps VolumeTargetTimestamps
    Records the timestamp information for the storage volume target.
    clusterSize Double
    Configures the cluster size of the storage volume.
    clusterSizeUnit String
    Specifies the units for the cluster size of the storage volume.
    compat String
    Sets compatibility settings for the storage volume target.
    encryption VolumeTargetEncryption
    Configures the encryption settings for the storage volume.
    features List<VolumeTargetFeature>
    Enables specific features for the storage volume target.
    format VolumeTargetFormat
    Sets the format type for the backing store of the storage volume.
    path String
    Volume path on the host filesystem
    permissions VolumeTargetPermissions
    Configures the permissions for the backing store of the storage volume.
    timestamps VolumeTargetTimestamps
    Records the timestamp information for the storage volume target.
    clusterSize number
    Configures the cluster size of the storage volume.
    clusterSizeUnit string
    Specifies the units for the cluster size of the storage volume.
    compat string
    Sets compatibility settings for the storage volume target.
    encryption VolumeTargetEncryption
    Configures the encryption settings for the storage volume.
    features VolumeTargetFeature[]
    Enables specific features for the storage volume target.
    format VolumeTargetFormat
    Sets the format type for the backing store of the storage volume.
    path string
    Volume path on the host filesystem
    permissions VolumeTargetPermissions
    Configures the permissions for the backing store of the storage volume.
    timestamps VolumeTargetTimestamps
    Records the timestamp information for the storage volume target.
    cluster_size float
    Configures the cluster size of the storage volume.
    cluster_size_unit str
    Specifies the units for the cluster size of the storage volume.
    compat str
    Sets compatibility settings for the storage volume target.
    encryption VolumeTargetEncryption
    Configures the encryption settings for the storage volume.
    features Sequence[VolumeTargetFeature]
    Enables specific features for the storage volume target.
    format VolumeTargetFormat
    Sets the format type for the backing store of the storage volume.
    path str
    Volume path on the host filesystem
    permissions VolumeTargetPermissions
    Configures the permissions for the backing store of the storage volume.
    timestamps VolumeTargetTimestamps
    Records the timestamp information for the storage volume target.
    clusterSize Number
    Configures the cluster size of the storage volume.
    clusterSizeUnit String
    Specifies the units for the cluster size of the storage volume.
    compat String
    Sets compatibility settings for the storage volume target.
    encryption Property Map
    Configures the encryption settings for the storage volume.
    features List<Property Map>
    Enables specific features for the storage volume target.
    format Property Map
    Sets the format type for the backing store of the storage volume.
    path String
    Volume path on the host filesystem
    permissions Property Map
    Configures the permissions for the backing store of the storage volume.
    timestamps Property Map
    Records the timestamp information for the storage volume target.

    VolumeTargetEncryption, VolumeTargetEncryptionArgs

    Format string
    Defines the format of the encryption for the storage volume.
    Cipher VolumeTargetEncryptionCipher
    Sets the encryption cipher for the storage volume to be applied.
    Ivgen VolumeTargetEncryptionIvgen
    Controls the initialization vector generation settings for the encryption.
    Secret VolumeTargetEncryptionSecret
    Provides the configuration for the secret used in the encryption process.
    Format string
    Defines the format of the encryption for the storage volume.
    Cipher VolumeTargetEncryptionCipher
    Sets the encryption cipher for the storage volume to be applied.
    Ivgen VolumeTargetEncryptionIvgen
    Controls the initialization vector generation settings for the encryption.
    Secret VolumeTargetEncryptionSecret
    Provides the configuration for the secret used in the encryption process.
    format String
    Defines the format of the encryption for the storage volume.
    cipher VolumeTargetEncryptionCipher
    Sets the encryption cipher for the storage volume to be applied.
    ivgen VolumeTargetEncryptionIvgen
    Controls the initialization vector generation settings for the encryption.
    secret VolumeTargetEncryptionSecret
    Provides the configuration for the secret used in the encryption process.
    format string
    Defines the format of the encryption for the storage volume.
    cipher VolumeTargetEncryptionCipher
    Sets the encryption cipher for the storage volume to be applied.
    ivgen VolumeTargetEncryptionIvgen
    Controls the initialization vector generation settings for the encryption.
    secret VolumeTargetEncryptionSecret
    Provides the configuration for the secret used in the encryption process.
    format str
    Defines the format of the encryption for the storage volume.
    cipher VolumeTargetEncryptionCipher
    Sets the encryption cipher for the storage volume to be applied.
    ivgen VolumeTargetEncryptionIvgen
    Controls the initialization vector generation settings for the encryption.
    secret VolumeTargetEncryptionSecret
    Provides the configuration for the secret used in the encryption process.
    format String
    Defines the format of the encryption for the storage volume.
    cipher Property Map
    Sets the encryption cipher for the storage volume to be applied.
    ivgen Property Map
    Controls the initialization vector generation settings for the encryption.
    secret Property Map
    Provides the configuration for the secret used in the encryption process.

    VolumeTargetEncryptionCipher, VolumeTargetEncryptionCipherArgs

    Hash string
    Specifies the hash algorithm used with the encryption cipher.
    Mode string
    Defines the mode for the encryption cipher of the storage volume.
    Name string
    Sets the name of the encryption cipher for the storage volume.
    Size double
    Sets the size of the encryption cipher for the storage volume.
    Hash string
    Specifies the hash algorithm used with the encryption cipher.
    Mode string
    Defines the mode for the encryption cipher of the storage volume.
    Name string
    Sets the name of the encryption cipher for the storage volume.
    Size float64
    Sets the size of the encryption cipher for the storage volume.
    hash String
    Specifies the hash algorithm used with the encryption cipher.
    mode String
    Defines the mode for the encryption cipher of the storage volume.
    name String
    Sets the name of the encryption cipher for the storage volume.
    size Double
    Sets the size of the encryption cipher for the storage volume.
    hash string
    Specifies the hash algorithm used with the encryption cipher.
    mode string
    Defines the mode for the encryption cipher of the storage volume.
    name string
    Sets the name of the encryption cipher for the storage volume.
    size number
    Sets the size of the encryption cipher for the storage volume.
    hash str
    Specifies the hash algorithm used with the encryption cipher.
    mode str
    Defines the mode for the encryption cipher of the storage volume.
    name str
    Sets the name of the encryption cipher for the storage volume.
    size float
    Sets the size of the encryption cipher for the storage volume.
    hash String
    Specifies the hash algorithm used with the encryption cipher.
    mode String
    Defines the mode for the encryption cipher of the storage volume.
    name String
    Sets the name of the encryption cipher for the storage volume.
    size Number
    Sets the size of the encryption cipher for the storage volume.

    VolumeTargetEncryptionIvgen, VolumeTargetEncryptionIvgenArgs

    Hash string
    Specifies the hashing algorithm used for the initialization vector generation.
    Name string
    Sets the name of the initialization vector generator for the encryption.
    Hash string
    Specifies the hashing algorithm used for the initialization vector generation.
    Name string
    Sets the name of the initialization vector generator for the encryption.
    hash String
    Specifies the hashing algorithm used for the initialization vector generation.
    name String
    Sets the name of the initialization vector generator for the encryption.
    hash string
    Specifies the hashing algorithm used for the initialization vector generation.
    name string
    Sets the name of the initialization vector generator for the encryption.
    hash str
    Specifies the hashing algorithm used for the initialization vector generation.
    name str
    Sets the name of the initialization vector generator for the encryption.
    hash String
    Specifies the hashing algorithm used for the initialization vector generation.
    name String
    Sets the name of the initialization vector generator for the encryption.

    VolumeTargetEncryptionSecret, VolumeTargetEncryptionSecretArgs

    Type string
    Defines the type of the secret used for encryption purposes.
    Uuid string
    Sets the universally unique identifier (UUID) for the encryption secret.
    Type string
    Defines the type of the secret used for encryption purposes.
    Uuid string
    Sets the universally unique identifier (UUID) for the encryption secret.
    type String
    Defines the type of the secret used for encryption purposes.
    uuid String
    Sets the universally unique identifier (UUID) for the encryption secret.
    type string
    Defines the type of the secret used for encryption purposes.
    uuid string
    Sets the universally unique identifier (UUID) for the encryption secret.
    type str
    Defines the type of the secret used for encryption purposes.
    uuid str
    Sets the universally unique identifier (UUID) for the encryption secret.
    type String
    Defines the type of the secret used for encryption purposes.
    uuid String
    Sets the universally unique identifier (UUID) for the encryption secret.

    VolumeTargetFormat, VolumeTargetFormatArgs

    Type string
    Specifies the type of the backing store format used for the storage volume.
    Type string
    Specifies the type of the backing store format used for the storage volume.
    type String
    Specifies the type of the backing store format used for the storage volume.
    type string
    Specifies the type of the backing store format used for the storage volume.
    type str
    Specifies the type of the backing store format used for the storage volume.
    type String
    Specifies the type of the backing store format used for the storage volume.

    VolumeTargetPermissions, VolumeTargetPermissionsArgs

    Group string
    Sets the group ownership for the backing store permissions of the volume.
    Label string
    Configures the label associated with the backing store permissions.
    Mode string
    Specifies the mode (file permissions) for the backing store of the volume.
    Owner string
    Defines the owner of the backing store permissions for the volume.
    Group string
    Sets the group ownership for the backing store permissions of the volume.
    Label string
    Configures the label associated with the backing store permissions.
    Mode string
    Specifies the mode (file permissions) for the backing store of the volume.
    Owner string
    Defines the owner of the backing store permissions for the volume.
    group String
    Sets the group ownership for the backing store permissions of the volume.
    label String
    Configures the label associated with the backing store permissions.
    mode String
    Specifies the mode (file permissions) for the backing store of the volume.
    owner String
    Defines the owner of the backing store permissions for the volume.
    group string
    Sets the group ownership for the backing store permissions of the volume.
    label string
    Configures the label associated with the backing store permissions.
    mode string
    Specifies the mode (file permissions) for the backing store of the volume.
    owner string
    Defines the owner of the backing store permissions for the volume.
    group str
    Sets the group ownership for the backing store permissions of the volume.
    label str
    Configures the label associated with the backing store permissions.
    mode str
    Specifies the mode (file permissions) for the backing store of the volume.
    owner str
    Defines the owner of the backing store permissions for the volume.
    group String
    Sets the group ownership for the backing store permissions of the volume.
    label String
    Configures the label associated with the backing store permissions.
    mode String
    Specifies the mode (file permissions) for the backing store of the volume.
    owner String
    Defines the owner of the backing store permissions for the volume.

    VolumeTargetTimestamps, VolumeTargetTimestampsArgs

    Atime string
    Sets the last access time timestamp for the storage volume target.
    Ctime string
    Specifies the last status change time for the storage volume target.
    Mtime string
    Sets the last modification time for the storage volume target.
    Atime string
    Sets the last access time timestamp for the storage volume target.
    Ctime string
    Specifies the last status change time for the storage volume target.
    Mtime string
    Sets the last modification time for the storage volume target.
    atime String
    Sets the last access time timestamp for the storage volume target.
    ctime String
    Specifies the last status change time for the storage volume target.
    mtime String
    Sets the last modification time for the storage volume target.
    atime string
    Sets the last access time timestamp for the storage volume target.
    ctime string
    Specifies the last status change time for the storage volume target.
    mtime string
    Sets the last modification time for the storage volume target.
    atime str
    Sets the last access time timestamp for the storage volume target.
    ctime str
    Specifies the last status change time for the storage volume target.
    mtime str
    Sets the last modification time for the storage volume target.
    atime String
    Sets the last access time timestamp for the storage volume target.
    ctime String
    Specifies the last status change time for the storage volume target.
    mtime String
    Sets the last modification time for the storage volume target.

    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.1 published on Monday, Dec 1, 2025 by dmacvicar
      Meet Neo: Your AI Platform Teammate