1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/virt-hot-plug-and-hot-unplug-commands.adoc
2025-10-15 14:19:34 +00:00

26 lines
924 B
Plaintext

:_newdoc-version: 2.18.5
:_template-generated: 2025-08-13
:_mod-docs-content-type: REFERENCE
[id="hot-plug-and-hot-unplug-commands_{context}"]
= Hot plug and hot unplug commands
[role="_abstract"]
You can use the following `virtctl` commands to add or remove resources from running virtual machines (VMs) and VM instances (VMIs).
.Hot plug and hot unplug commands
[width="100%",cols="1a,2a",options="header"]
|===
|Command |Description
|`virtctl addvolume <vm_name> --volume-name=<datavolume_or_PVC> [--persist] [--serial=<label>]`
|Hot plug a data volume or persistent volume claim (PVC).
Optional:
* `--persist` mounts the virtual disk permanently on a VM. *This flag does not apply to VMIs.*
* `--serial=<label>` adds a label to the VM. If you do not specify a label, the default label is the data volume or PVC name.
|`virtctl removevolume <vm_name> --volume-name=<virtual_disk>`
|Hot unplug a virtual disk.
|===