Bug 1040630 - [RFE] Predictable vNIC order
Summary: [RFE] Predictable vNIC order
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: 3.4.0
Assignee: Oved Ourfali
QA Contact: Martin Pavlik
URL:
Whiteboard: network
Depends On:
Blocks: 737564
TreeView+ depends on / blocked
 
Reported: 2013-12-11 18:08 UTC by Dan Kenigsberg
Modified: 2015-04-07 03:11 UTC (History)
30 users (show)

Fixed In Version: ovirt-3.4.0-alpha1
Clone Of: 737564
: 1057988 (view as bug list)
Environment:
Last Closed: 2014-03-31 15:04:51 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 546363 0 None None None Never
oVirt gerrit 22411 0 None None None Never
oVirt gerrit 22422 0 None None None Never
oVirt gerrit 22512 0 None None None Never

Description Dan Kenigsberg 2013-12-11 18:08:03 UTC
Random MAC addresses are allocated to VM's vNICs, causing in-guest randomness

Description of problem:

When a VM with multiple vNICs is created, cloned or imported, its vNICs acquire random MAC addresses. This causes the guest OS to allocate interface names in an unpredictable manner, making it impossible for the guest to guess which network is an interface connected to.

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

RHEV 2.2 and 3.Y

How reproducible:
Almost always (MAC addresses may happen to match vNIC entity names).


More information:

http://wiki.ovirt.org/Feature/Predictable_vNIC_Order

Comment 1 Oved Ourfali 2013-12-24 09:42:17 UTC
This patches handles the NIC ordering when creating or importing a VM, as follows:
1. When creating a VM from template
 a. If the template has PCI addresses, then sort the NICs according
to that, allocating MAC addresses with the same ordering
 b. If the template doesn't contain PCI addresses, allocate MAC
addresses with an ordering identical to the naming of the NICs
2. When creating a VM from snapshot
 a. Follow logic in 1a.
 b. If the snapshot doesn't contain PCI addresses, but it does contain
the MAC addresses, allocate new MAC addresses with the same ordering as
in the original snapshot
 c. If no PCI and no MAC addresses are available, order by the NIC name
3. When importing a VM - same as VM creation (but no template in this
case, just the exported VM is the reference to compare to).

In the add VM use-case, when the user the user adds more NICs in addition to the templated ones, we do the following ordering:
1. All templated NICs that have a PCI address are left as is.
2. All the remaining NICs (both from the template or new ones) are given MAC addresses with the same NIC name
ordering.

Comment 2 Sandro Bonazzola 2014-01-13 13:56:46 UTC
oVirt 3.4.0 alpha has been released including the fix for this issue.

Comment 12 Martin Pavlik 2014-03-13 06:56:25 UTC
verified
https://tcms.engineering.redhat.com/run/117231/?from_plan=12034

Comment 13 Sandro Bonazzola 2014-03-31 15:04:51 UTC
This is an automated message: moving to Closed CURRENT_RELEASE since oVirt 3.4.0 has been released.

Comment 14 Dave Sullivan 2014-06-12 21:27:58 UTC
After this one again

https://bugzilla.redhat.com/show_bug.cgi?id=1108926


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