virt-manager 0.6.0 added support for managing different types of storage through libvirt. Storage management was added to libvirt in version 0.4.0 to tackle some large problems, namely remote guest creation.
A quick run down of how storage support works: the two main concepts are storage 'pools' and storage 'volumes':
- A Pool is some storage resource that can be carved up into individual units (A physical disk, a filesystem directory, an LVM volume group, etc.).
- A Volume is the individual unit that is carved out of the pool (A partition on a disk, a file in a directory, a logical volume in a volume group, etc) As such, a volume is always associated with some storage pool.
The main way in virt-manager to view and provision storage is through the new 'Storage Manager'. This storage is fundamentally tied to a host machine/connection, so we reach this through the 'Connection Details' window. Edit->Connection Details..., and Click on the 'Storage Pools' tab:
Here we see the list of storage pools on the left. We can start, stop, and delete storage pools using the buttons on the bottom left. If a pool is selected, and it is 'active', we should see it's associated storage volumes in the list on the right.
By default, no pools will be present, so lets create one. We will create a pool named 'default' which points to /var/lib/libvirt/images, the prefered location for local file images (on Fedora. We set selinux contexts here). Click on the '+' symbol on the bottom left to add a pool:
Enter 'default' as the pool name, and select 'dir: Filesystem Directory' in the 'Type' drop down. Hit 'Forward'
In the 'Target Path' field, enter '/var/lib/libvirt/images'. Hit 'Finish'. The pool should now show up in the pool list.
The options on the second screen of the wizard are activated pending what type pool you are creating. A brief run down of the options:
- Target Path: Where the pool's volumes will be accessed from.
- Format: Some pool types have an associated format, such as filesystem format for a Filesystem pool.
- Hostname: NFS and iSCSI pools require a hostname for where the source is located.
- Source Path: The underlying device used for the pool. This is the physical disk path for a Disk pool, the Volume Group path for a logical pool, or the mountable path on the nfs server.
- Build: Determines whether the underlying pool source should be formatted (such as a disk pool), or created (such as a directory pool). Use with caution.
More to come!