RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 890483 - virsh domif-getlink command fail with '--config' option
Summary: virsh domif-getlink command fail with '--config' option
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-27 08:14 UTC by yanbing du
Modified: 2012-12-28 05:07 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 890486 (view as bug list)
Environment:
Last Closed: 2012-12-28 05:07:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description yanbing du 2012-12-27 08:14:10 UTC
Description of problem:
With --config option, virsh domif-getlink command always fail. 

Version-Release number of selected component (if applicable):
libvirt-0.10.2-13.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.
# virsh domiflist tt
Interface  Type       Source     Model       MAC
-------------------------------------------------------
vnet2      network    default    -           52:54:00:89:165

# virsh domif-getlink tt vnet2
vnet2 default

# virsh domif-getlink tt vnet2 --config
error: Interface (target: vnet2) not found.
2.
3.
  
Actual results:
as step1

Expected results:
--config option can work

Additional info:

Comment 2 dyuan 2012-12-27 10:36:28 UTC
Please check it with MAC but not target dev for --config, if MAC works well then it should be NOTABUG.

Comment 3 yanbing du 2012-12-27 11:44:41 UTC
(In reply to comment #2)
> Please check it with MAC but not target dev for --config, if MAC works well
> then it should be NOTABUG.

Yes, with MAC it works.
# virsh domif-getlink tt 52:54:00:cc:26:f3 --config
52:54:00:cc:26:f3 default

So maybe the man page need update to clear this.
Another problem, when start a domain with several virtual interfaces(belongs to different virtual network), virsh domif-getlink get similar result. 

# virsh domiflist tt
Interface  Type       Source     Model       MAC
-------------------------------------------------------
vnet2      network    default    -           52:54:00:89:16:d5
vnet3      network    net1       -           52:54:00:cc:26:f3
vnet4      network    ipv6       -           52:54:00:d3:24:a9

# virsh domif-getlink tt vnet2
vnet2 default
# virsh domif-getlink tt vnet3
vnet3 default
# virsh domif-getlink tt vnet4
vnet4 default

So what's the meaning of "default"?

Comment 4 dyuan 2012-12-28 04:13:59 UTC
Confirmed with devel.

Before you issue domif-setlink, the domif-getlink will return "default" which means "up" in case of qemu.
domif-setlink works like if you unplug the cable and domif-getlink doesn't have an api, it just works on XML, so default is printed if the xml doesn't have the state in it.
So can't get the "up" & "down" state before issue domif-setlink for now.

Comment 5 Osier Yang 2012-12-28 04:39:04 UTC
this should be close as NOTABUG too.

Comment 6 yanbing du 2012-12-28 05:07:05 UTC
(In reply to comment #5)
> this should be close as NOTABUG too.

OK, i see.
So close this bug as NOTABUG.


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