Add Custom Storage Pools
Using arclight, you can define Libvirt storage pools in the /var, /mnt, and /media directories. This was done to prevent full access to the operating system from the Web interface. If you need to define a storage pool outside of these limitations, you can use the terminal using Libvirt to register a storage pool. In this example we will define the /home/ubuntu/ directory as a storage pool.
Define the storage pool using the pool-define-as command from virsh. We will pass in the type of storage devices which is a directory, name which we will call myHomePool, and the filepath to the storage pool.
virsh pool-define-as --type dir --name myHomePool --target /home/ubuntu
The storage pool will now show up in arclight. If you wish to view it in the terminal you can use the following command
virsh pool-list --all
The storage pool myHomePool will not be running, you can start it using arclight, or in the terminal you can use the following command to start the storage pool. Optionally you can use pool-autostart to automatically start the pool upon the system boot and use pool-autostart –disable to remove it.
virsh pool-start myHomePool
If you choose to stop the storage pool from running, you can do this in arclight or by using the pool-destroy option.
virsh pool-destroy myHomePool
Lastly if you decide to remove the storage pool you can undefine it. This will leave the directory intact on the operating system, just removing it from the list of storage pools. Again, this can be done in arclight or by using the pool-undefine option in the terminal.
virsh pool-undefine myHomePool