13.9. Removing virtual machine storage by using the web console
If you no longer require a virtual disk attached to a virtual machine (VM), or if you want to free up host storage resources, you can use the web console to do any of the following:
- Detach the virtual disk from the VM.
- Delete the virtual disk and its content.
- Deactivate the storage pool related to the virtual disk.
- Delete the storage pool related to the virtual disk.
Prerequisites
You have installed the RHEL 10 web console.
For instructions, see Installing and enabling the web console.
- The web console VM plugin is installed on your system.
Procedure
To detach a virtual disk from a VM, use the following steps:
In the interface, click the VM from which you want to detach a disk.
A new page opens with an Overview section with basic information about the selected VM and a Console section to access the VM’s graphical interface.
Scroll to .
The Disks section displays information about the disks assigned to the VM, as well as options to Add or Edit disks.
- On the right side of the row for the disk that you want to detach, click the Menu button .
In the drop-down menu that appears, click the button.
A
Remove disk from VM?confirmation dialog box appears.In the confirmation dialog box, click . Optionally, if you also want to remove the disk image, click .
The virtual disk is detached from the VM.
To delete the disk, do one of the following:
If the disk is managed as a storage volume, click at the top of the Virtual Machines tab.
Click the name of the storage pool that contains the disk. Click . Select the storage volume you want to remove. Click . # virsh vol-delete --pool RHEL-storage-pool test-disk2-
If the disk is a file not managed as a storage volume (for example if it was created by
qemu-img), you must use a graphical file manager or the command line to delete it. The RHEL web console currently does not support deleting individual files.
To deactivate a storage pool, use the following steps.
When you deactivate a storage pool, no new volumes can be created in that pool. However, any VMs that have volumes in that pool will continue to run. This is useful, for example, if you want to limit the number of volumes that can be created in a pool to increase system performance.
- Click at the top of the Virtual Machines tab. The Storage Pools window appears, showing a list of configured storage pools.
Click on the storage pool row.
The storage pool is deactivated.
To completely remove a storage pool, use the following steps:
Click on the Virtual Machines tab.
The Storage Pools window appears, showing a list of configured storage pools.
Click the Menu button of the storage pool you want to delete and click .
A confirmation dialog appears.
- Optional: To delete the storage volumes inside the pool, select the corresponding check boxes in the dialog.
Click .
The storage pool is deleted. If you selected the checkbox in the previous step, the associated storage volumes are deleted as well.
Verification
To confirm that your changes to VM storage have been successful, inspect the current state of virtual storage on your host.
For instructions, see Viewing virtual machine storage information by using the web console.