Installation guide

Chapter 26. Storage pools
210
The directory /guest_images is used in this example.
# virsh pool-define-as guest_images_fs fs - - /dev/sdc1 - "/guest_images"
Pool guest_images_fs defined
The new pool and mount points are now created.
2. Verify the new pool
List the present storage pools.
# virsh pool-list --all
Name State Autostart
-----------------------------------------
default active yes
guest_images_fs inactive no
3. Ceate the mount point
Use the virsh pool-build command to create a mount point for a pre-formatted file system
storage pool.
# virsh pool-build guest_images_fs
Pool guest_images_fs built
# ls -la /guest_images
total 8
drwx------. 2 root root 4096 May 31 19:38 .
dr-xr-xr-x. 25 root root 4096 May 31 19:38 ..
# virsh pool-list --all
Name State Autostart
-----------------------------------------
default active yes
guest_images_fs inactive no
4. Start the storage pool
Use the virsh pool-start command to mount the file system onto the mount point and make
the pool available for use.
# virsh pool-start guest_images_fs
Pool guest_images_fs started
# virsh pool-list --all
Name State Autostart
-----------------------------------------
default active yes
guest_images_fs active no
5. Turn on autostart
By default, a storage pool is defined with virsh is not set to automatically start each time the
libvirtd starts. Turn on automatic start with the virsh pool-autostart command. The
storage pool is now automatically started each time libvirtd starts.
# virsh pool-autostart guest_images_fs
Pool guest_images_fs marked as autostarted
# virsh pool-list --all
Name State Autostart
-----------------------------------------
default active yes