Ask Your Question
1

How to change the default location for virt-manager machines?

asked 2013-09-09 13:02:11 -0500

Eldakhli gravatar image

updated 2013-09-09 22:18:49 -0500

FranciscoD_ gravatar image

How to change the default location for virt-manager machines from "/var/lib/libvirt/images" to another partition on the hard disk like "/rum/media/user1/partition1"

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-09-09 14:25:22 -0500

sudormmiusrf gravatar image

You could just mount your partition at /var/lib/libvirt/images/ and restore the SELinux context

mount /dev/sdb1 /var/lib/libvirt/images/

restorecon /var/lib/libvirt/images/

edit flag offensive delete link more

Comments

1

You would want to make the changes persistent across reboots by adding the correct line in /etc/fstab. If you have existing images in the directory, move them before mounting the new disk.

Amit Caleechurn gravatar imageAmit Caleechurn ( 2013-09-09 16:44:10 -0500 )edit
1

answered 2013-09-09 16:09:28 -0500

Amit Caleechurn gravatar image

I would suggest the following using virsh:

virsh
pool-destroy default
pool-undefine default
pool-define-as --name default --type dir --target /rum/media/user1/partition1
pool-autostart default
pool-build default
pool-start default

Fire up virt-manager and verify under Edit-> Connection Details-> Storage tab that your default storage pool points to /rum/media/user1/partition1

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-09-09 13:02:11 -0500

Seen: 18,271 times

Last updated: Sep 09 '13