Storage pool to multiple disks resource pooling using, Libvirt, storage can be managed in a unified storage pool, to simplify the operation.
Virtual machine operations, storage pools and volumes is not required, administrators ensure proper configuration and connection.
Currently I have three storage pools circumstances
find their configuration file
there are some parameters, but does not recommend changes to direct XML, by virsh pool-edit iso changes will not abnormal.
virsh pool-edit iso
Found is to open a vi
Had about the operation of the storage pool
pool-list
poolL-info
Catalog-based storage pool
Prepare a directory, set the directory permissions, SELinux configuration directory context, operating isolate virtual machine and a virtual machine.
semanage fcontext -a -t virt_image_t '/guest_images(/.*)?'
Because / guest_images this directory is created by hand, not the default directory, and there is no default security context, we need to be manually set.
This command will give / guest_images directory and all contents of the directory to set the default security context type is virt_image_t
Create a storage pool, there are two methods:
通过virt-manager创建存储池
Just select the target path / guest_images
delete the pool when the pool must be stopped, there is a plus sign to the right of the dot stops, then the rightmost delete, delete the pool.
通过virsh创建存储池
virsh pool-define as guest_images dir --target "/guest_images"
Start up
settings automatically enabled
virsh pool-autostart guest_images
This is to create a storage pool through virsh
Also, we need to stop removing the pool pool
virsh pool-destroy guest_images
virsh pool-delete guest_images
But the profile still further, to clear all use undefine
virsh pool-undefine guest_images
Partition based storage pool
libvirtd will automatically mount the partition