Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1361944 - line 437 of xenapi_utils.c if logic seems to be a typo
Summary: line 437 of xenapi_utils.c if logic seems to be a typo
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2016-08-01 02:41 UTC by netcas
Modified: 2016-08-02 13:21 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-08-02 13:21:25 UTC

Attachments (Terms of Use)

Description netcas 2016-08-01 02:41:00 UTC
Description of problem:

Hello, guys! I am doing some experiment to control XenServer with libvirt, when I define a domain, it always fails and gives the following message:

error: Failed to define domain from /root/new.xml
error: internal error: Couldn't get VM information from XML

so I diving into the souce and found it always fails at network creating, and the code in libvirt-1.3.5\src\xenapi\xenapi_utils.c, line 437 is following:

        xen_vif_create(session, &vif, vif_record);
        if (!vif) {
            return 0;
        ... ...
        return -1;

should this if be if (vif) {...}, if the vif is null, why need to free it?

Version-Release number of selected component (if applicable): 1.3.5

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:

Comment 1 Cole Robinson 2016-08-02 13:21:25 UTC
Thanks for the report! Unfortunately the xenapi driver in libvirt isn't actively developed and I don't think any of the maintainers have a xenapi setup to even test changes. That said, if you verify that the change fixes things for you, please generate a patch and send it to, and if it's simple enough someone may apply it. See:

In the meantime, I'm closing this bug as DEFERRED, since otherwise it will just sit in the bug tracker indefinitely

Note You need to log in before you can comment on or make changes to this bug.