4.5. disk


The disk resource type groups all virtual hard disk resources in a Red Hat 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
The --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.
The following table lists additional disk options for resource-based commands.
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
The following table lists actions for a virtual disk resource.
Table 4.9. Virtual disk actions
Action Description
activate Activate a disk on a virtual machine.
deactivate Deactivate a disk on a virtual machine.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.