I run out of space on /var/lib/libvirt/images , so need to change the path where qcow2 image is stored(/home)?.
Tried creating vm from new location but faced the following error.
[root@gant qemu]# virsh create fedora21_3.xml
error: Failed to create domain from fedora21_3.xml
error: Cannot access storage file '/home/test/qemu_images/fedora21_3.qcow2' (as uid:107, gid:107): Permission denied
Fix is we need to change the permission of whole directory path.
[root@gant qemu]# chmod 777 /home/test/
[root@gant qemu]# chmod 777 /home/test/qemu_images/
[root@gant qemu]# chmod 777 /home/test/qemu_images/fedora21_3.qcow2
[root@gant qemu]# virsh create fedora21_3.xml
Domain fedora21_3 created from fedora21_3.xml
[root@gant qemu]#
This is for a development machine , so not recommended for anything else.
Worked for me. Thanks
ReplyDelete