O'Reilly logo

KVM Virtualization Cookbook by Konstantin Ivanov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

We start this recipe with an image of a Debian OS that we installed earlier in the book; however, you can use an empty, raw, or qcow2 image, add it to the storage pool, and install the virtual machine OS on it with almost no changes to the recipe steps if you don't have that image already.

In step 1, we copy the VM image to the default libvirt storage pool location in /var/lib/libvirt/images/, but you can create your own directory, the location does not matter as long as it's defined in the storage pool configuration file. We do that in step 2.

In step 3, we define the new storage pool, by specifying a name, target directory, and the type of the pool, in this case, a directory backend pool. We then proceed to list the new ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required