4.5. disk
disk resource type groups all virtual hard disk resources in a Red Hat Enterprise Virtualization environment.
Table 4.6. Disk parameters
| Name | Type | Description | Required | User Creatable | User Updatable |
|---|---|---|---|---|---|
--provisioned_size
|
int
|
The reserved storage space for the disk. This space is preallocated for the disk to use, even if the disk
size is less than the provisioned_size
|
Yes
|
Yes
|
Yes
|
--interface
|
string
|
The interface type of the disk. Either
ide or virtio.
|
Yes
|
Yes
|
Yes
|
--format
|
string
|
The underlying storage format. Copy On Write (
cow) allows snapshots, with a small performance overhead. Raw (raw) does not allow snapshots, but offers improved performance.
|
Yes
|
Yes
|
Yes
|
--size
|
int
|
The actual size of the disk.
|
No
|
Yes
|
Yes
|
--sparse
|
Boolean
| true if the physical storage for the disk should not be preallocated.
|
No
|
Yes
|
Yes
|
--bootable
|
Boolean
| true if this disk is to be marked as bootable.
|
No
|
Yes
|
Yes
|
--shareable
|
Boolean
| true if this disk is shareable.
|
No
|
Yes
|
Yes
|
--allow_snapshot
|
Boolean
| true if this disk allows snapshots.
|
No
|
Yes
|
Yes
|
--propagate_errors
|
Boolean
| true if disk errors should not cause virtual machine to be paused and, instead, disk errors should be propagated to the guest OS.
|
No
|
Yes
|
Yes
|
--wipe_after_delete
|
boolean
| true if the underlying physical storage for the disk should be zeroed when the disk is deleted. This increases security but is a more intensive operation and may prolong delete times.
|
No
|
Yes
|
Yes
|
--storage_domains-storage_domain
|
collection
|
Defines a specific storage domain for the disk.
|
No
|
Yes
|
No
|
--storage_domains-storage_domain parameter is a collection that uses the sub-parameters in the following table.
Table 4.7. --storage_domains-storage_domain parameters
| Name | Type | Description |
|---|---|---|
storage_domain.id|name
|
string
|
A reference to a storage domain for the disk.
|
Table 4.8. Additional command options
| Option | Description |
|---|---|
--vm-identifier | Adds the disk to a vm as a sub-resource. |
--alias | Identifies a disk name when using a show command. Use --alias instead of the --name parameter for disk-specific queries. |
Example 4.11. Creating a new disk
[RHEVM shell (connected)]# add disk --name MyDisk --provisioned_size 8589934592 --interface virtio --format cow
Example 4.12. Updating a storage domain
[RHEVM shell (connected)]# update disk MyDisk --shareable true
Example 4.13. Deleting a storage domain
[RHEVM shell (connected)]# remove disk MyDisk
Table 4.9. Virtual machine disk actions
| Action | Description |
|---|---|
activate | Activate a disk on a virtual machine. |
deactivate | Deactivate a disk on a virtual machine. |

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.