[libvirt] Out of Memory Error

varun bhatnagar varun292006 at gmail.com
Tue Feb 12 15:47:07 UTC 2013


Hi,

I am trying to attach a usb device to my virtualbox node using libvirt. My
node is already running, I stop my node and then I am trying to add this
usb device.
I have a separate xml file defined for usb. It looks like this:

*<device>
<hostdev mode='subsystem' type='usb'>
      <source>
        <vendor id='0x4321'/>
        <product id='0xfeeb'/>
      </source>
</hostdev>
</device> *
*
*
I am trying to attach it using code:

*conn = libvirt.open("vbox:///session")
    if conn ==None:
        print 'Failed to open connection to the hypervisor'
        sys.exit(1)
        print 'connected to vbox hypervisor driver'
        domainInstance = conn.lookupByName('SampleNode')
        filed = open('/root/testFolder/usbSharedFolder.xml', 'r')
        config_str = filed.read()
        libvirt.virDomain.attachDevice(domainInstance, config_str)*

When it is executed I am getting an error message saying:
*libvir: VirtualBox Driver error : out of memory *
*
*
Even with virsh it is giving the same error. I am using the below command:
*attach-device SampleNode /root/testFolder/usbSharedFolder.xml*

Can anyone tell me what is going wrong. It is really very important. Please
do reply.
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130212/52c890c1/attachment-0001.htm>


More information about the libvir-list mailing list