Ask Your Question

While using libvirt, how can I use a location other than /var/lib/libvirt/images/ to store my images?

asked 2011-11-10 11:25:17 -0500

FranciscoD_ gravatar image

updated 2011-11-25 22:24:41 -0500

mether gravatar image

I have separate / and /home partitions. My / partition isn't so big and I'd like to use a location in /home for my image files. How can I do this? I don't see an option in libvirt. Since I haven't found a solution yet, I'm unable to use libvirt. I still use qemu-kvm directly from the command line.

edit retag flag offensive close merge delete


Or make a symlink, thats it.

ln -sf /var/lib/libvirt/images /home/xxx/my_images
lzap gravatar imagelzap ( 2011-11-10 13:12:20 -0500 )edit

3 Answers

Sort by » oldest newest most voted

answered 2011-11-10 13:58:09 -0500

René Rask gravatar image

If you start virt-manager and connect to your libvirtd instance. There is an "Connection Details" in the edit menu. In the storage section you can add a new storage pool with the "+" sign.

If you want to change the default storage pool location, I don't know of other ways than manually editing /etc/libvirtd/storage/defauls.xml (shutdown libvirtd first and start it after) or linking the images directory to somewhere else.

edit flag offensive delete link more


I created a new pool and now I can use images from there. Thanks! :)

FranciscoD_ gravatar imageFranciscoD_ ( 2011-11-11 00:36:29 -0500 )edit

answered 2013-10-31 17:00:25 -0500

hsn gravatar image

Here you go:

Following text is repeated from that resource

Adding an alternative storage pool

If the default storage location of /var/lib/libvirt/images does not have enough space for the volumes that you wish to assign to virtual machines, you can add a second storage pool. These steps may prove helpful:

virsh pool-dumpxml default > pool.xml
edit pool.xml # with new name and path
virsh pool-create pool.xml
virsh pool-refresh name

One side note: You will need to delete the UUID field in the xml file if you intend to keep the default pool - no two pools defined can have the same UUID - but keep the brackets like so: '<uuid></uuid>'

edit flag offensive delete link more

answered 2011-11-10 12:33:39 -0500

SoumyaC gravatar image

I found a pointer to something we used sometime back in RHEL -

Changing libvirt image location folder

I am sure it will help you.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2011-11-10 11:25:17 -0500

Seen: 61,958 times

Last updated: Oct 31 '13