Bug 1040630

Summary: [RFE] Predictable vNIC order
Product: [Retired] oVirt Reporter: Dan Kenigsberg <danken>
Component: ovirt-engine-coreAssignee: Oved Ourfali <oourfali>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Pavlik <mpavlik>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acathrow, ahoness, danken, dsulliva, ecohen, gklein, iheim, jkt, jocarter, lpeer, lvernia, lyarwood, masayag, mavital, michal.skrivanek, mkolesni, mpavlik, myakove, ofrenkel, oourfali, pablo.iranzo, pep, Rhev-m-bugs, rmunilla, scohen, shavivi, sherold, tdosek, wdaniel, yeylon
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: 3.4.0   
Hardware: All   
OS: Linux   
Whiteboard: network
Fixed In Version: ovirt-3.4.0-alpha1 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 737564
: 1057988 (view as bug list) Environment:
Last Closed: 2014-03-31 15:04:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 737564    

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