ZRS
On this page

Add a disk

VM disks are image files in libvirt storage pools. Attaching a new disk creates a blank image, attaching an existing disk uses the selected image directly.

Before adding a disk #

Stop the VM and wait for Shutdown. Adding a disk requires a saved VM configuration, an active storage pool, and no saved memory state.

If no storage pool is available, create a storage pool first.

Create a blank disk #

  1. Open the VM and select Add disk in Disks.
  2. Set Source to New disk.
  3. Select the Storage pool, then enter a Name and Capacity (GiB).
  4. Select the Format, qcow2 or raw.
  5. Select Add disk.

The disk appears in the VM’s Disks section. Start the VM, then partition, format, and mount the new disk inside the guest as needed. Attaching a disk does not create a guest filesystem.

Attach an existing image #

  1. Select Add disk and set Source to Existing disk.
  2. Select the Storage pool and Volume.
  3. Select Attach.

The picker excludes images that cannot be attached, including images already attached to this VM or used by snapshots. Image library templates are copied during VM creation rather than attached through this picker.

An image attached to another VM requires an additional confirmation. An existing image may contain data. Do not format it unless that data should be erased.

Detach a disk #

Stop the VM, open the disk’s actions, and select Detach. Confirm the removal. Detaching removes the disk from the VM configuration and keeps the image file in storage.

Disks with external snapshots must have those snapshots deleted before detaching.

On this page