KVM 101 : Virtual machine storage pools and storage volumes

Beside the default storage pool created when KVM is installed on, we could set up our directory-based storage.

We will start by defining a storage pool - disks -, that is going to be "mounted" on the /disks directory:

To check if our pool was created correctly, we use the below:

We can change its state using the below:

Then we check it:

The directory /disks was created with Autostart parameter set to "no".
If we want our pool to start automatically when we turn on the machine we use the following:

To get information about our pool, we use:

To create a storage volume disk_1.img in the storage pool disks, we use the below command - 5G, raw format -:

To get information about our 
storage volume disk_1.img, we use:

We could see the recently created volume using the below command:

We now need to format it, we pick the qcow2 format:

To get information about our newly created volume, we use:

To delete a storage pools, we start by listing them using:

Then we could stop it using the below:

The last steps is undefining it using the below command:


To finish our cleanup, we will need to remove the /disks directory.


Leave as a comment: