Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> KVM changing default images folder problems
defau1t
 Posted: Nov 4 2012, 06:42 PM
Quote Post


SLF Newbie


Group: Members
Posts: 7
Member No.: 885
Joined: 30-September 11









Hello, I tried to change the default images folder from /var/lib/libvirt/images to /home/kyle/KVM. Steps taken were:

CODE
mkdir /home/kyle/KVM
su root
chcon -R --reference /var/lib/libvirt/images /home/kyle/KVM
rmdir /var/lib/libvirt/images
ln -s /home/kyle/KVM /var/lib/libvirt/images


From what I understand this is making a new directory on the home partition, copying the selinux settings from the original /images directory to the /KVM directory, removing the original directory, and then making /images a linked directory to /KVM, although please correct me if I'm wrong.

Now when I try to create a new VM, I get the following error::

CODE
Unable to complete install: 'internal error Process exited while reading console log output: char device redirected to /dev/pts/1
qemu-kvm: -drive file=/var/lib/libvirt/images/server1.example.com.img,if=none,id=drive-virtio-disk0,format=raw,cache=none: could not open disk image /var/lib/libvirt/images/server1.example.com.img: Permission denied
'

Traceback (most recent call last):
 File "/usr/share/virt-manager/virtManager/asyncjob.py", line 44, in cb_wrapper
   callback(asyncjob, *args, **kwargs)
 File "/usr/share/virt-manager/virtManager/create.py", line 1903, in do_install
   guest.start_install(False, meter=meter)
 File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1223, in start_install
   noboot)
 File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 1291, in _create_guest
   dom = self.conn.createLinux(start_xml or final_xml, 0)
 File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2467, in createLinux
   if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error Process exited while reading console log output: char device redirected to /dev/pts/1
qemu-kvm: -drive file=/var/lib/libvirt/images/server1.example.com.img,if=none,id=drive-virtio-disk0,format=raw,cache=none: could not open disk image /var/lib/libvirt/images/server1.example.com.img: Permission denied



I'm not sure if maybe I missed a step in changing the default directory or what, but any help would be greatly appreciated.
PM
^
defau1t
 Posted: Dec 12 2012, 12:19 AM
Quote Post


SLF Newbie


Group: Members
Posts: 7
Member No.: 885
Joined: 30-September 11









Haven't been able to really mess around with this until recently, but I found a solution. Just had to delete the default Storage pool and then create a new storage pool using the original directory, and that seemed to work. Really easy, wish I had tried that earlier.
PM
^
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll