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 1098645 - Smartcard device failures prevent VM from booting with error message "Changed state to Down: internal error ifname "vnet1" not in key map"
Summary: Smartcard device failures prevent VM from booting with error message "Changed...
Keywords:
Status: CLOSED DUPLICATE of bug 903480
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.5
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: pre-dev-freeze
: ---
Assignee: John Ferlan
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-16 19:34 UTC by Jake Hunsaker
Modified: 2019-04-28 09:18 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-27 18:29:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jake Hunsaker 2014-05-16 19:34:56 UTC
Description of problem:

This is related to BZ 1098638 in that we found duplicate smartcard devices being created which prevented the VM from booting. However, we only found that after removing all vNICs from the VM as prior to their removal, the error message being presented was:

libvirtError: internal error ifname "vnet1" not in key map
Thread-97::DEBUG::2014-05-02 16:23:16,101::vm::2657::vm.Vm::(setDownStatus) vmId=`e3704160-28c2-48e4-8882-d7cb8ec25bb9`::Changed state to Down: internal error ifname "vnet1" not in key map

Version-Release number of selected component (if applicable):
 rhevm-3.3.2-0.50

How reproducible:
Reliably

Steps to Reproduce:
1. Create a VM off a template that was modified similar to BZ 1098638
2. Try and start the VM
3.

Actual results:
VM fails to boot with above error

Expected results:
If smartcard device errors prevent the VM from booting, the error message should indicate the issue is with the smartcard device, not a vnet device.

Additional info:

While I realize the root issue is in fact BZ 1098638, this bug is being opened to handle the incorrect error messages specifically. Pertinent logs are attached to that BZ.

Comment 3 John Ferlan 2014-05-20 11:30:14 UTC
Any chance you can provide the generated xml for the original guest and then perhaps XML or a virsh command sequence in order to trigger the bug?  Essentially some way without having rhevm/ovirt or some gui involved.  It'll make things much easier to diagnose.

Comment 4 John Ferlan 2014-05-21 15:31:19 UTC
I dug through the vdsm log of the related bz and found the XML of the created guest with two smartcard devices listed:


<domain type="kvm">
	<name>mine</name>
	<uuid>85a2a9fa-aef6-4fef-b35f-0bf4909bcd11</uuid>
	<memory>2097152</memory>
	<currentMemory>2097152</currentMemory>
	<vcpu>2</vcpu>
	<memtune>
		<min_guarantee>1048576</min_guarantee>
	</memtune>
	<devices>
		<channel type="unix">
			<target name="com.redhat.rhevm.vdsm" type="virtio"/>
			<source mode="bind" path="/var/lib/libvirt/qemu/channels/85a2a9fa-aef6-4fef-b35f-0bf4909bcd11.com.redhat.rhevm.vdsm"/>
		</channel>
		<channel type="unix">
			<target name="org.qemu.guest_agent.0" type="virtio"/>
			<source mode="bind" path="/var/lib/libvirt/qemu/channels/85a2a9fa-aef6-4fef-b35f-0bf4909bcd11.org.qemu.guest_agent.0"/>
		</channel>
		<input bus="ps2" type="mouse"/>
		<channel type="spicevmc">
			<target name="com.redhat.spice.0" type="virtio"/>
		</channel>
		<graphics autoport="yes" keymap="en-us" listen="0" passwd="*****" passwdValidTo="1970-01-01T00:00:01" port="-1" tlsPort="-1" type="spice">
			<channel mode="secure" name="main"/>
			<channel mode="secure" name="inputs"/>
			<channel mode="secure" name="cursor"/>
			<channel mode="secure" name="playback"/>
			<channel mode="secure" name="record"/>
			<channel mode="secure" name="display"/>
			<channel mode="secure" name="usbredir"/>
			<channel mode="secure" name="smartcard"/>
		</graphics>
		<smartcard mode="passthrough" type="spicevmc"/>
		<smartcard mode="passthrough" type="spicevmc"/>
...

So although I don't necessarily need this information any more - a general rule of thumb to ease bug report resolution is to provide XML and a sequence of commands or API calls that will reproduce symptoms seen.  Digging through other bug reports and having to determine command sequences, configurations, or API's to call is overhead I'd prefer to avoid.

NB: The description of a <smartcard> device in the libvirt documentation (http://libvirt.org/formatdomain.html) states in the last sentence:

"For now, qemu only supports at most one smartcard, with an address of bus=0 slot=0. "

When modifying a guest though there is no assumption of underlying hypervisor.

If I take one of my guests and add two smartcards entries as above to it via 'virsh edit <guest>', then save it - things are fine.  However, when I go to start it I get:

# virsh start f18
error: Failed to start domain f18
error: unsupported configuration: this QEMU binary lacks multiple smartcard support

#

A similar failure occurs if I 'virsh dumpxml f18 > f18-test.xml', then edit f18-test.xml to change the name of the 'vm' and remove the <uuid> entry, and perform a 'virsh create f18-test.xml'.

I searched for the error message from the vdsm.log from the other bz, but did not it in the libvirt sources - so I have to assume that message is not sourced by libvirt.

Support for the above error message was added to libvirt-0.10.2-20.el6 for bz 975751 as part of commit id '5efc6dcb' towards the end of qemuBuildCommandLine() within the "if (def->nsmartcards) {" condition.

Since the original report doesn't indicate which libvirt version you have installed and only indicates "rhevm-3.3.2-0.50" - I will certainly need some more information in order to proceed.

At this point I'm inclined to mark this as a duplicate, but I will await your feedback.

Comment 5 John Ferlan 2014-05-21 18:58:41 UTC
Finally found the 'ifname "vnet1" not in key map' message...

It's removed in libvirt-0.10.2-34 as a means of resolving bz 903480 (both in 6.5 and 6.6).  Since that's more recent than the libvirt-0.10.2-20 build where the code was added to message the failure to start due to not allowing more than 1 smart card, I'll assume that rhevm-3.3.2-0.50 doesn't include the -34 changes.

I'm still in the camp of this is not a bug, but will await your feedback.

Comment 6 Jake Hunsaker 2014-05-21 19:13:08 UTC
libvirt in use by customer is libvirt-0.10.2-29.el6_5.5.x86_64. 

If it's already removed in 0.10.2-34 I think we may be able to close this BZ since RHEV should pull this updated libvirt package in with a future release.

Comment 7 John Ferlan 2014-05-27 18:29:42 UTC
I am going to close this as a duplicate of 903480 since a fix already exists in 0.10.2-34.

*** This bug has been marked as a duplicate of bug 903480 ***


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