Hi,All
I've solve this problem by doing a chcon --reference=/var/lib/libvirt/images /vm
this solve selinux block kvm from accessing disk image outside of /var/lib/libvirt/images
Thanks
2009-12-09
rewing
发件人: centos-virt-request 发送时间: 2009-12-09 00:57:19 收件人: centos-virt 抄送: 主题: CentOS-virt Digest, Vol 28, Issue 9
Send CentOS-virt mailing list submissions to centos-virt@centos.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.centos.org/mailman/listinfo/centos-virt or, via email, send a message with subject or body 'help' to centos-virt-request@centos.org You can reach the person managing the list at centos-virt-owner@centos.org When replying, please edit your Subject line so it is more specific than "Re: Contents of CentOS-virt digest..." Today's Topics: 1. virt-install failed while install windows2003 guest (rewing) 2. Re: virt-install failed while install windows2003 guest (Markus Falb) 3. Re: virt-install failed while install windows2003 guest (Tait Clarridge) ---------------------------------------------------------------------- Message: 1 Date: Tue, 8 Dec 2009 16:58:56 +0800 From: "rewing" rewing@howfortune.com Subject: [CentOS-virt] virt-install failed while install windows2003 guest To: "centos-virt" centos-virt@centos.org Message-ID: 200912081658540620074@howfortune.com Content-Type: text/plain; charset="us-ascii" Here's the procedure: # qemu-img -f qcow2 /vm/win2k3.img 8G # virt-install --connect qemu:///system -n win2k3 -r 512 --vcpus=1 -c /home/temp/win2003sp2ins.iso -f /vm/win2k3.img -s 4 --network=bridge:br0 --mac=00:ff:ff:ff:58:58 --noautoconsole --vnc --os-type=windows --os-variant=win2k3 --hvm --accelerate And I get error as below: Starting install... internal error unable to start guest: qemu: could not open disk image /vm/win2k3.img Domain installation may not have been successful. If it was, you can restart your domain by running 'virsh start win2k3'; otherwise, please restart your installation. ERROR internal error unable to start guest: qemu: could not open disk image /vm/win2k3.img Traceback (most recent call last): File "/usr/sbin/virt-install", line 861, in ? main() File "/usr/sbin/virt-install", line 759, in main start_time, guest.start_install) File "/usr/sbin/virt-install", line 814, in do_install dom = install_func(conscb, progresscb, wait=(not wait)) File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 541, in start_install return self._do_install(consolecb, meter, removeOld, wait) File "/usr/lib/python2.4/site-packages/virtinst/Guest.py", line 633, in _do_install self.domain = self.conn.createLinux(install_xml, 0) File "/usr/lib64/python2.4/site-packages/libvirt.py", line 974, in createLinux if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self) libvirtError: internal error unable to start guest: qemu: could not open disk image /vm/win2k3.img any idea? 2009-12-08 rewing -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.centos.org/pipermail/centos-virt/attachments/20091208/55c24500/... ------------------------------ Message: 2 Date: Tue, 8 Dec 2009 12:41:34 +0100 From: Markus Falb markus.falb@fasel.at Subject: Re: [CentOS-virt] virt-install failed while install windows2003 guest To: Discussion about the virtualization on CentOS centos-virt@centos.org Message-ID: 7FEF197D-7025-4E95-87DB-72AE50CEFA3E@fasel.at Content-Type: text/plain; charset="us-ascii" On 8 Dec 2009, at 09:58, rewing wrote:
libvirtError: internal error unable to start guest: qemu: could not open disk image /vm/win2k3.img
Do you have selinux enabled ? As far as I know the location for images is restricted to /var/lib/libvirt/images by default.