Este conteúdo não está disponível no idioma selecionado.

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

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja oBlog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

© 2024 Red Hat, Inc.