[CentOS] KVM Setup for Win7 Pro on CentOS 5.x

Sun Aug 19 07:25:26 UTC 2012
Gordon Messmer <yinyang at eburg.com>

On 08/16/2012 09:36 AM, Bill Campbell wrote:
> I assume that I can replace /var/lib/libvirt/images with a
> symlink to another file system with adequate space.
>
> Would it be safe to symlink the entire /var/lib/libvrt directory
> to another file system?

As has been pointed out, SELinux may prevent that from working with a 
simple symlink.  You have two options that will work:

1: Create a symlink and set the context of the link destination to the 
same context used for /var/lib/libvirt/images.  Use semanage to make the 
changes permanent, or else a restorecon might break the system:
http://docs.fedoraproject.org/en-US/Fedora/13/html/Security-Enhanced_Linux/sect-Security-Enhanced_Linux-SELinux_Contexts_Labeling_Files-Persistent_Changes_semanage_fcontext.html

2: Use a "bind" mount instead of a symlink.  Enter a line in /etc/fstab 
like this one:
   /bigger/fs	/var/lib/libvirt/images	none	bind	0 0
Then, mount /var/lib/libvirt/images and "restorecon -r -v 
/var/lib/libvirt/images"