<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hey Mike, did you ever have any success figuring out this issue? I am having the same problem  (on CentOS 7) with a custom data acquisition PCI card. It seems like the solution might have something to do with delaying the start of libvirtd
 in systemd until the PCI card (or vfio?) is ready, but I don’t know how to do that. Can anyone else offer assistance?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My output:<o:p></o:p></p>
<div style="mso-element:para-border-div;border:none;border-left:solid windowtext 1.0pt;padding:0in 0in 0in 4.0pt;margin-left:.5in;margin-right:0in">
<p class="MsoNormal" style="border:none;padding:0in"><span style="font-size:10.0pt;font-family:Consolas">2016-03-29T18:29:26.191010Z qemu-kvm: -device vfio-pci,host=05:00.0,id=hostdev0,bus=pci.0,addr=0x7: vfio: Error: Failed to setup INTx fd: Device or resource
 busy<o:p></o:p></span></p>
<p class="MsoNormal" style="border:none;padding:0in"><span style="font-size:10.0pt;font-family:Consolas">2016-03-29T18:29:26.289154Z qemu-kvm: -device vfio-pci,host=05:00.0,id=hostdev0,bus=pci.0,addr=0x7: Device initialization failed.<o:p></o:p></span></p>
<p class="MsoNormal" style="border:none;padding:0in"><span style="font-size:10.0pt;font-family:Consolas">2016-03-29T18:29:26.289195Z qemu-kvm: -device vfio-pci,host=05:00.0,id=hostdev0,bus=pci.0,addr=0x7: Device 'vfio-pci' could not be initialized<o:p></o:p></span></p>
<p class="MsoNormal" style="border:none;padding:0in"><span style="font-size:10.0pt;font-family:Consolas">2016-03-29 18:29:26.337+0000: shutting down<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Randy<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><--Original Message--><o:p></o:p></p>
<pre><span style="color:black">Hey all,<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<p class="MsoNormal"><tt><span style="font-size:10.0pt;color:black">I'm getting an error starting a libvirt managed qemu/kvm VM at physical</span></tt><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><tt><span style="font-size:10.0pt;color:black">host
 boot time, but manually starting it afterwards works fine. This is</span></tt><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><tt><span style="font-size:10.0pt;color:black">on a Ubuntu
 Wily i7-4790 box running Linux 4.2 and libvirt 1.2.16.</span></tt><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><tt><span style="font-size:10.0pt;color:black">There is a legacy (5V)
 PCI card being passed through to the VM, the</span></tt><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><tt><span style="font-size:10.0pt;color:black">error seems to relate to that.</span></tt><o:p></o:p></p>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<p class="MsoNormal"><tt><span style="font-size:10.0pt;color:black">The error that always appears at boot in</span></tt><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><tt><span style="font-size:10.0pt;color:black">`/var/log/libvirt/qemu/test-vm.log`
 is:</span></tt><o:p></o:p></p>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<p class="MsoNormal"><tt><span style="font-size:10.0pt;color:black">2016-01-11T05:29:28.487935Z qemu-system-x86_64: -device</span></tt><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><tt><span style="font-size:10.0pt;color:black">vfio-pci,host=05:00.0,id=hostdev0,bus=pci.0,addr=0x4:
 vfio: Error:</span></tt><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><tt><span style="font-size:10.0pt;color:black">Failed to setup INTx fd: Device or resource busy</span></tt><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><tt><span style="font-size:10.0pt;color:black">2016-01-11T05:29:28.488148Z
 qemu-system-x86_64: -device</span></tt><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><tt><span style="font-size:10.0pt;color:black">vfio-pci,host=05:00.0,id=hostdev0,bus=pci.0,addr=0x4:
 Device</span></tt><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><tt><span style="font-size:10.0pt;color:black">initialization failed</span></tt><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><tt><span style="font-size:10.0pt;color:black">2016-01-11T05:29:28.488169Z
 qemu-system-x86_64: -device</span></tt><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><tt><span style="font-size:10.0pt;color:black">vfio-pci,host=05:00.0,id=hostdev0,bus=pci.0,addr=0x4:
 Device</span></tt><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><tt><span style="font-size:10.0pt;color:black">'vfio-pci' could not be initialized</span></tt><span style="font-size:13.5pt;color:black"><o:p></o:p></span></p>
<pre style="orphans: auto;text-align:start;widows: 1;-webkit-text-stroke-width: 0px;word-spacing:0px"><span style="color:black"><o:p> </o:p></span></pre>
<p class="MsoNormal"><tt><span style="font-size:10.0pt;color:black">After the physical machine has completed booting, starting the VM via</span></tt><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><tt><span style="font-size:10.0pt;color:black">virsh
 or virt-manager works fine.</span></tt><span style="font-size:12.0pt"><o:p></o:p></span></p>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<p class="MsoNormal"><tt><span style="font-size:10.0pt;color:black">The card is an old Firewire card. I have blacklisted the firewire</span></tt><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><tt><span style="font-size:10.0pt;color:black">modules
 on the physical machine so they aren't loaded, but is it</span></tt><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><tt><span style="font-size:10.0pt;color:black">possible that the kernel,
 udev or some other process still has access</span></tt><span class="apple-converted-space"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span></span><tt><span style="font-size:10.0pt;color:black">to the device when systemd starts
 the libvirt-bin service?</span></tt><o:p></o:p></p>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">Any clues greatly appreciated.<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">Thanks,<o:p></o:p></span></pre>
<pre><span style="color:black">//Mike<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">--<o:p></o:p></span></pre>
<pre><span style="font-family:"Cambria Math","serif";color:black">⊨</span><span style="color:black"> Michael Gratton, Percept Wrangler.<o:p></o:p></span></pre>
<pre><span style="color:black">⚙ <<a href="http://mjog.vee.net/">http://mjog.vee.net/</a>><o:p></o:p></span></pre>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>