<div dir="ltr">Hi,<div>The mentioned changes worked for adding a shared folder but while adding usb it gave an error saying:</div><div><br style="font-family:arial,sans-serif;font-size:13px"><font color="#ff0000"><b><font face="sans-serif" style="font-size:13px">error: Failed to attach device from /root/test/addingusb.xml</font><span style="font-family:arial,sans-serif;font-size:13px"> </span><br style="font-family:arial,sans-serif;font-size:13px">
<font face="sans-serif" style="font-size:13px">error: An error occurred, but the cause is unknown</font></b><span style="font-family:arial,sans-serif;font-size:13px"> </span></font><br></div><div style><font color="#ff0000"><span style="font-family:arial,sans-serif;font-size:13px"> </span></font></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px"><font color="#000000">The xml file is given below:</font></span></div><div style><span style="font-family:arial,sans-serif;font-size:13px"><font color="#000000"><br>
</font></span></div><div><font face="sans-serif" style="font-size:13px"><hostdev mode='subsystem' type='usb'></font><span style="font-size:13px;font-family:arial,sans-serif"> </span><br style="font-size:13px;font-family:arial,sans-serif">
<font face="sans-serif" style="font-size:13px">      <source></font><span style="font-size:13px;font-family:arial,sans-serif"> </span><br style="font-size:13px;font-family:arial,sans-serif"><font face="sans-serif" style="font-size:13px">        <vendor id='0x4321'/></font><span style="font-size:13px;font-family:arial,sans-serif"> </span><br style="font-size:13px;font-family:arial,sans-serif">
<font face="sans-serif" style="font-size:13px">        <product id='0xfeeb'/></font><span style="font-size:13px;font-family:arial,sans-serif"> </span><br style="font-size:13px;font-family:arial,sans-serif"><font face="sans-serif" style="font-size:13px">      </source></font><span style="font-size:13px;font-family:arial,sans-serif"> </span><br style="font-size:13px;font-family:arial,sans-serif">
<font face="sans-serif" style="font-size:13px"></hostdev></font><span style="font-size:13px;font-family:arial,sans-serif"> </span><br style="font-size:13px;font-family:arial,sans-serif"></div><div><span style="font-size:13px;font-family:arial,sans-serif"><br>
</span></div><div style><span style="font-size:13px;font-family:arial,sans-serif">Can you tell me what shall I do remove this error?</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 15, 2013 at 12:28 AM, varun bhatnagar <span dir="ltr"><<a href="mailto:varun292006@gmail.com" target="_blank">varun292006@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you so much for the reply and for sharing the patch...I will try this tomorrow and then let you know whether it works or not.....And i'll try removing the <device> tag too.....<div>
Thank you again for the help.... :)</div>
</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 14, 2013 at 2:11 PM, Jiri Denemark <span dir="ltr"><<a href="mailto:jdenemar@redhat.com" target="_blank">jdenemar@redhat.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Thu, Feb 14, 2013 at 01:24:32 +0530, varun bhatnagar wrote:<br>
> Hi,<br>
><br>
</div>> Today I noticed one strange thing. I* *removed the contents of<br>
> *usbSharedFolder.xml<br>
> *and kept it blank. Then I again tried both ways i.e. calling attachDevice<br>
<div>> method using code as well as virsh but again it gave libvir: VirtualBox<br>
> Driver error : out of memory but I was expecting some syntactical error. Is<br>
> this a bug....??<br>
<br>
</div>Yes, it's a bug. See<br>
<a href="http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=2e5d7798df56621986bddd588b53827e6557687a" target="_blank">http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=2e5d7798df56621986bddd588b53827e6557687a</a><br>


for the patch that is now in libvirt git repository.<br>
<div><br>
> > I am trying to attach a usb device to my virtualbox node using libvirt. My<br>
> > node is already running, I stop my node and then I am trying to add this<br>
> > usb device.<br>
> > I have a separate xml file defined for usb. It looks like this:<br>
> ><br>
</div>> > *<device><br>
<div>> > <hostdev mode='subsystem' type='usb'><br>
> >       <source><br>
> >         <vendor id='0x4321'/><br>
> >         <product id='0xfeeb'/><br>
> >       </source><br>
> > </hostdev><br>
</div>> > </device> *<br>
<br>
Btw, this XML is not correct. It should contain just the <hostdev><br>
element.<br>
<br>
Jirka<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>