<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.6000.16809" name=GENERATOR>
<STYLE>@font-face {
        font-family: 宋体;
}
@font-face {
        font-family: Verdana;
}
@font-face {
        font-family: @宋体;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        FONT-WEIGHT: normal; COLOR: windowtext; FONT-STYLE: normal; FONT-FAMILY: Verdana; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
UNKNOWN {
        FONT-SIZE: 10pt
}
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>
</HEAD>
<BODY style="FONT-SIZE: 10pt; MARGIN: 10px; FONT-FAMILY: verdana">
<DIV><FONT face=Verdana color=#000080 size=2>Hi,All</FONT></DIV>
<DIV><FONT color=#000080></FONT>&nbsp;</DIV>
<DIV><FONT color=#000080>I've solve this problem by doing a </FONT></DIV>
<DIV>chcon&nbsp;--reference=/var/lib/libvirt/images&nbsp;/vm </DIV>
<DIV>&nbsp;</DIV>
<DIV>this solve selinux block kvm&nbsp;from accessing disk image outside of 
/var/lib/libvirt/images</DIV>
<DIV><FONT face=Verdana color=#000080 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000080>Thanks</FONT></DIV>
<DIV><FONT face=Verdana color=#000080 size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Verdana color=#c0c0c0 size=2>2009-12-09 </FONT></DIV><FONT 
face=Verdana color=#000080 size=2>
<HR style="WIDTH: 100px" align=left color=#b5c4df SIZE=1>
</FONT>
<DIV><FONT face=Verdana color=#c0c0c0 size=2><SPAN>rewing</SPAN> </FONT></DIV>
<HR color=#b5c4df SIZE=1>

<DIV><FONT face=Verdana size=2><STRONG>发件人:</STRONG> centos-virt-request 
</FONT></DIV>
<DIV><FONT face=Verdana size=2><STRONG>发送时间:</STRONG> 2009-12-09&nbsp; 00:57:19 
</FONT></DIV>
<DIV><FONT face=Verdana size=2><STRONG>收件人:</STRONG> centos-virt </FONT></DIV>
<DIV><FONT face=Verdana size=2><STRONG>抄送:</STRONG> </FONT></DIV>
<DIV><FONT face=Verdana size=2><STRONG>主题:</STRONG> CentOS-virt Digest, Vol 28, 
Issue 9 </FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>
<DIV>Send&nbsp;CentOS-virt&nbsp;mailing&nbsp;list&nbsp;submissions&nbsp;to</DIV>
<DIV>centos-virt@centos.org</DIV>
<DIV></DIV>
<DIV>To&nbsp;subscribe&nbsp;or&nbsp;unsubscribe&nbsp;via&nbsp;the&nbsp;World&nbsp;Wide&nbsp;Web,&nbsp;visit</DIV>
<DIV>http://lists.centos.org/mailman/listinfo/centos-virt</DIV>
<DIV>or,&nbsp;via&nbsp;email,&nbsp;send&nbsp;a&nbsp;message&nbsp;with&nbsp;subject&nbsp;or&nbsp;body&nbsp;'help'&nbsp;to</DIV>
<DIV>centos-virt-request@centos.org</DIV>
<DIV></DIV>
<DIV>You&nbsp;can&nbsp;reach&nbsp;the&nbsp;person&nbsp;managing&nbsp;the&nbsp;list&nbsp;at</DIV>
<DIV>centos-virt-owner@centos.org</DIV>
<DIV></DIV>
<DIV>When&nbsp;replying,&nbsp;please&nbsp;edit&nbsp;your&nbsp;Subject&nbsp;line&nbsp;so&nbsp;it&nbsp;is&nbsp;more&nbsp;specific</DIV>
<DIV>than&nbsp;"Re:&nbsp;Contents&nbsp;of&nbsp;CentOS-virt&nbsp;digest..."</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>Today's&nbsp;Topics:</DIV>
<DIV></DIV>
<DIV>&nbsp;&nbsp;&nbsp;1.&nbsp;virt-install&nbsp;failed&nbsp;while&nbsp;install&nbsp;windows2003&nbsp;guest&nbsp;(rewing)</DIV>
<DIV>&nbsp;&nbsp;&nbsp;2.&nbsp;Re:&nbsp;virt-install&nbsp;failed&nbsp;while&nbsp;install&nbsp;windows2003 
guest</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Markus&nbsp;Falb)</DIV>
<DIV>&nbsp;&nbsp;&nbsp;3.&nbsp;Re:&nbsp;virt-install&nbsp;failed&nbsp;while&nbsp;install&nbsp;windows2003&nbsp;guest</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Tait&nbsp;Clarridge)</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>----------------------------------------------------------------------</DIV>
<DIV></DIV>
<DIV>Message:&nbsp;1</DIV>
<DIV>Date:&nbsp;Tue,&nbsp;8&nbsp;Dec&nbsp;2009&nbsp;16:58:56&nbsp;+0800</DIV>
<DIV>From:&nbsp;"rewing"&nbsp;&lt;rewing@howfortune.com&gt;</DIV>
<DIV>Subject:&nbsp;[CentOS-virt]&nbsp;virt-install&nbsp;failed&nbsp;while&nbsp;install&nbsp;windows2003</DIV>
<DIV>guest</DIV>
<DIV>To:&nbsp;"centos-virt"&nbsp;&lt;centos-virt@centos.org&gt;</DIV>
<DIV>Message-ID:&nbsp;&lt;200912081658540620074@howfortune.com&gt;</DIV>
<DIV>Content-Type:&nbsp;text/plain;&nbsp;charset="us-ascii"</DIV>
<DIV></DIV>
<DIV>Here's&nbsp;the&nbsp;procedure:</DIV>
<DIV>#&nbsp;qemu-img&nbsp;-f&nbsp;qcow2&nbsp;/vm/win2k3.img&nbsp;8G</DIV>
<DIV>#&nbsp;virt-install&nbsp;--connect&nbsp;qemu:///system&nbsp;-n&nbsp;win2k3&nbsp;-r&nbsp;512&nbsp;--vcpus=1&nbsp;-c&nbsp;/home/temp/win2003sp2ins.iso&nbsp;-f&nbsp;/vm/win2k3.img&nbsp;-s&nbsp;4</DIV>
<DIV>--network=bridge:br0&nbsp;--mac=00:ff:ff:ff:58:58&nbsp;--noautoconsole&nbsp;--vnc&nbsp;--os-type=windows&nbsp;--os-variant=win2k3&nbsp;--hvm&nbsp;--accelerate</DIV>
<DIV></DIV>
<DIV>And&nbsp;I&nbsp;get&nbsp;error&nbsp;as&nbsp;below:</DIV>
<DIV>Starting&nbsp;install...</DIV>
<DIV>internal&nbsp;error&nbsp;unable&nbsp;to&nbsp;start&nbsp;guest:&nbsp;qemu:&nbsp;could&nbsp;not&nbsp;open&nbsp;disk&nbsp;image&nbsp;/vm/win2k3.img</DIV>
<DIV>Domain&nbsp;installation&nbsp;may&nbsp;not&nbsp;have&nbsp;been</DIV>
<DIV>&nbsp;successful.&nbsp;&nbsp;If&nbsp;it&nbsp;was,&nbsp;you&nbsp;can&nbsp;restart&nbsp;your&nbsp;domain</DIV>
<DIV>&nbsp;by&nbsp;running&nbsp;'virsh&nbsp;start&nbsp;win2k3';&nbsp;otherwise,&nbsp;please</DIV>
<DIV>&nbsp;restart&nbsp;your&nbsp;installation.</DIV>
<DIV>ERROR&nbsp;&nbsp;&nbsp;&nbsp;internal&nbsp;error&nbsp;unable&nbsp;to&nbsp;start&nbsp;guest:&nbsp;qemu:&nbsp;could&nbsp;not&nbsp;open&nbsp;disk&nbsp;image&nbsp;/vm/win2k3.img</DIV>
<DIV>Traceback&nbsp;(most&nbsp;recent&nbsp;call&nbsp;last):</DIV>
<DIV>&nbsp;&nbsp;File&nbsp;"/usr/sbin/virt-install",&nbsp;line&nbsp;861,&nbsp;in&nbsp;?</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;main()</DIV>
<DIV>&nbsp;&nbsp;File&nbsp;"/usr/sbin/virt-install",&nbsp;line&nbsp;759,&nbsp;in&nbsp;main</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;start_time,&nbsp;guest.start_install)</DIV>
<DIV>&nbsp;&nbsp;File&nbsp;"/usr/sbin/virt-install",&nbsp;line&nbsp;814,&nbsp;in&nbsp;do_install</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;dom&nbsp;=&nbsp;install_func(conscb,&nbsp;progresscb,&nbsp;wait=(not&nbsp;wait))</DIV>
<DIV>&nbsp;&nbsp;File&nbsp;"/usr/lib/python2.4/site-packages/virtinst/Guest.py",&nbsp;line&nbsp;541,&nbsp;in&nbsp;start_install</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;self._do_install(consolecb,&nbsp;meter,&nbsp;removeOld,&nbsp;wait)</DIV>
<DIV>&nbsp;&nbsp;File&nbsp;"/usr/lib/python2.4/site-packages/virtinst/Guest.py",&nbsp;line&nbsp;633,&nbsp;in&nbsp;_do_install</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;self.domain&nbsp;=&nbsp;self.conn.createLinux(install_xml,&nbsp;0)</DIV>
<DIV>&nbsp;&nbsp;File&nbsp;"/usr/lib64/python2.4/site-packages/libvirt.py",&nbsp;line&nbsp;974,&nbsp;in&nbsp;createLinux</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;ret&nbsp;is&nbsp;None:raise&nbsp;libvirtError('virDomainCreateLinux()&nbsp;failed',&nbsp;conn=self)</DIV>
<DIV>libvirtError:&nbsp;internal&nbsp;error&nbsp;unable&nbsp;to&nbsp;start&nbsp;guest:&nbsp;qemu:&nbsp;could&nbsp;not&nbsp;open&nbsp;disk&nbsp;image&nbsp;/vm/win2k3.img</DIV>
<DIV></DIV>
<DIV>any&nbsp;idea?</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>2009-12-08&nbsp;</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>rewing&nbsp;</DIV>
<DIV>--------------&nbsp;next&nbsp;part&nbsp;--------------</DIV>
<DIV>An&nbsp;HTML&nbsp;attachment&nbsp;was&nbsp;scrubbed...</DIV>
<DIV>URL:&nbsp;http://lists.centos.org/pipermail/centos-virt/attachments/20091208/55c24500/attachment-0001.html&nbsp;</DIV>
<DIV></DIV>
<DIV>------------------------------</DIV>
<DIV></DIV>
<DIV>Message:&nbsp;2</DIV>
<DIV>Date:&nbsp;Tue,&nbsp;8&nbsp;Dec&nbsp;2009&nbsp;12:41:34&nbsp;+0100</DIV>
<DIV>From:&nbsp;Markus&nbsp;Falb&nbsp;&lt;markus.falb@fasel.at&gt;</DIV>
<DIV>Subject:&nbsp;Re:&nbsp;[CentOS-virt]&nbsp;virt-install&nbsp;failed&nbsp;while&nbsp;install</DIV>
<DIV>windows2003 guest</DIV>
<DIV>To:&nbsp;Discussion&nbsp;about&nbsp;the&nbsp;virtualization&nbsp;on&nbsp;CentOS</DIV>
<DIV>&lt;centos-virt@centos.org&gt;</DIV>
<DIV>Message-ID:&nbsp;&lt;7FEF197D-7025-4E95-87DB-72AE50CEFA3E@fasel.at&gt;</DIV>
<DIV>Content-Type:&nbsp;text/plain;&nbsp;charset="us-ascii"</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>On&nbsp;8&nbsp;Dec&nbsp;2009,&nbsp;at&nbsp;09:58,&nbsp;rewing&nbsp;wrote:</DIV>
<DIV>&gt;&nbsp;libvirtError:&nbsp;internal&nbsp;error&nbsp;unable&nbsp;to&nbsp;start&nbsp;guest:&nbsp;qemu:&nbsp;could&nbsp;not&nbsp;&nbsp;</DIV>
<DIV>&gt;&nbsp;open&nbsp;disk&nbsp;image&nbsp;/vm/win2k3.img</DIV>
<DIV></DIV>
<DIV>Do&nbsp;you&nbsp;have&nbsp;selinux&nbsp;enabled&nbsp;?&nbsp;As&nbsp;far&nbsp;as&nbsp;I&nbsp;know&nbsp;the&nbsp;location&nbsp;for&nbsp;images&nbsp;&nbsp;</DIV>
<DIV>is&nbsp;restricted&nbsp;to&nbsp;/var/lib/libvirt/images&nbsp;by&nbsp;default.</DIV>
<DIV></DIV>
<DIV>--&nbsp;</DIV>
<DIV>Markus</DIV>
<DIV></DIV>
<DIV>--------------&nbsp;next&nbsp;part&nbsp;--------------</DIV>
<DIV>An&nbsp;HTML&nbsp;attachment&nbsp;was&nbsp;scrubbed...</DIV>
<DIV>URL:&nbsp;http://lists.centos.org/pipermail/centos-virt/attachments/20091208/ac8640d6/attachment-0001.html&nbsp;</DIV>
<DIV></DIV>
<DIV>------------------------------</DIV>
<DIV></DIV>
<DIV>Message:&nbsp;3</DIV>
<DIV>Date:&nbsp;Tue,&nbsp;08&nbsp;Dec&nbsp;2009&nbsp;09:11:02&nbsp;-0500</DIV>
<DIV>From:&nbsp;Tait&nbsp;Clarridge&nbsp;&lt;tait@clarridge.ca&gt;</DIV>
<DIV>Subject:&nbsp;Re:&nbsp;[CentOS-virt]&nbsp;virt-install&nbsp;failed&nbsp;while&nbsp;install</DIV>
<DIV>windows2003&nbsp;guest</DIV>
<DIV>To:&nbsp;Discussion&nbsp;about&nbsp;the&nbsp;virtualization&nbsp;on&nbsp;CentOS</DIV>
<DIV>&lt;centos-virt@centos.org&gt;</DIV>
<DIV>Message-ID:</DIV>
<DIV>&lt;1260281462.2495.1.camel@taiterltp.int.interactivemedia.com&gt;</DIV>
<DIV>Content-Type:&nbsp;text/plain;&nbsp;charset="utf-8"</DIV>
<DIV></DIV>
<DIV>On&nbsp;Tue,&nbsp;2009-12-08&nbsp;at&nbsp;12:41&nbsp;+0100,&nbsp;Markus&nbsp;Falb&nbsp;wrote:</DIV>
<DIV>&gt;&nbsp;</DIV>
<DIV>&gt;&nbsp;On&nbsp;8&nbsp;Dec&nbsp;2009,&nbsp;at&nbsp;09:58,&nbsp;rewing&nbsp;wrote:</DIV>
<DIV>&gt;&nbsp;&gt;&nbsp;libvirtError:&nbsp;internal&nbsp;error&nbsp;unable&nbsp;to&nbsp;start&nbsp;guest:&nbsp;qemu:&nbsp;could&nbsp;not&nbsp;open&nbsp;disk&nbsp;image&nbsp;/vm/win2k3.img</DIV>
<DIV>&gt;&nbsp;</DIV>
<DIV>&gt;&nbsp;</DIV>
<DIV>&gt;&nbsp;Do&nbsp;you&nbsp;have&nbsp;selinux&nbsp;enabled&nbsp;?&nbsp;As&nbsp;far&nbsp;as&nbsp;I&nbsp;know&nbsp;the&nbsp;location&nbsp;for&nbsp;images</DIV>
<DIV>&gt;&nbsp;is&nbsp;restricted&nbsp;to&nbsp;/var/lib/libvirt/images&nbsp;by&nbsp;default.</DIV>
<DIV>&gt;&nbsp;</DIV>
<DIV>&gt;&nbsp;--&nbsp;</DIV>
<DIV></DIV>
<DIV>Or&nbsp;does&nbsp;the&nbsp;actual&nbsp;disk&nbsp;image&nbsp;exist&nbsp;at&nbsp;/vm/win2k3.img&nbsp;with&nbsp;r/w&nbsp;access&nbsp;to</DIV>
<DIV>whoever&nbsp;is&nbsp;running&nbsp;the&nbsp;virt-install&nbsp;command?</DIV>
<DIV></DIV>
<DIV>Does&nbsp;the&nbsp;/vm&nbsp;directory&nbsp;exist&nbsp;and&nbsp;does&nbsp;the&nbsp;user&nbsp;have&nbsp;permissions&nbsp;to</DIV>
<DIV>access&nbsp;it?</DIV>
<DIV></DIV>
<DIV>--------------&nbsp;next&nbsp;part&nbsp;--------------</DIV>
<DIV>A&nbsp;non-text&nbsp;attachment&nbsp;was&nbsp;scrubbed...</DIV>
<DIV>Name:&nbsp;not&nbsp;available</DIV>
<DIV>Type:&nbsp;application/pgp-signature</DIV>
<DIV>Size:&nbsp;198&nbsp;bytes</DIV>
<DIV>Desc:&nbsp;This&nbsp;is&nbsp;a&nbsp;digitally&nbsp;signed&nbsp;message&nbsp;part</DIV>
<DIV>Url&nbsp;:&nbsp;http://lists.centos.org/pipermail/centos-virt/attachments/20091208/79487930/attachment-0001.bin&nbsp;</DIV>
<DIV></DIV>
<DIV>------------------------------</DIV>
<DIV></DIV>
<DIV>_______________________________________________</DIV>
<DIV>CentOS-virt&nbsp;mailing&nbsp;list</DIV>
<DIV>CentOS-virt@centos.org</DIV>
<DIV>http://lists.centos.org/mailman/listinfo/centos-virt</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>End&nbsp;of&nbsp;CentOS-virt&nbsp;Digest,&nbsp;Vol&nbsp;28,&nbsp;Issue&nbsp;9</DIV>
<DIV>******************************************</DIV>
<DIV></DIV></FONT></DIV></BODY></HTML>