Bug 1100489

Summary: [RFE] Allow to 'virt-sysprep'ing a cloned VM after its creation to avoid duplicate MAC address issue.
Product: Red Hat Enterprise Virtualization Manager Reporter: Sachin Raje <sraje>
Component: RFEsAssignee: Rob Young <royoung>
Status: CLOSED WONTFIX QA Contact: Shai Revivo <srevivo>
Severity: high Docs Contact:
Priority: high    
Version: 3.3.0CC: danken, lpeer, mburman, mgoldboi, michal.skrivanek, mtessun, nsednev, nyechiel, rbalakri, Rhev-m-bugs, srevivo, ykaul
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: sherold: Triaged+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Feature: Allow to 'virt-sysprep'ing a cloned VM after its creation to avoid duplicate MAC address issue Reason: Result (if any):
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-18 12:50:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1335642    
Bug Blocks:    

Description Sachin Raje 2014-05-22 22:01:51 UTC
Description of problem:
At present, Unable to change the 'MAC address' of the guest VM using 'cloud-init' feature.

The cloud-init network option allow to set / change network parameters like IP/netmask/gateway but if failed to set/change MAC address for VM. 

This cause "Duplicate" MAC address issue for cloned VMs.

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

How reproducible:
Always


Steps to Reproduce:
1. Install the "cloud-init" rpm in RHEL guest VM and create cloned image using snapshot.
2. Now, start VM using "run once" option.
3. Under "initial run" check "network" and add network with IP, NETMASK and Gateway
4. The new cloned VM will start with new IP, NETMASK and Gateway address but it still holds the parents "Duplicate" MAC address. 

Actual results:
The cloned VM does not chnage the "MAC address" causing "Duplicate" MAC address issue.

Expected results:
One should able to set/change MAC address as well using 'network' option of cloud-init from RHEVM portal.

Additional info:

Currently it's possible using virt-sysprep hook, 
hook: http://gerrit.ovirt.org/#/c/26886/
 
The more details about hook can be found in bugzilla #1080752 opened to address this issue urgently for specific customer. But this looks more as new 'RFE'.

Comment 2 Dan Kenigsberg 2014-05-23 10:09:07 UTC
I've set Whiteboard to virt, as virt-sysprep is useful to remove all kinds on instance-specific data (ssh keys, user accounts) and not just MAC addresses.

Comment 3 Michal Skrivanek 2014-05-23 11:21:09 UTC
right however per the description the MAC address is the "urgent" part and it is supposedly addressed by bug 1080752 and the attached hook.
IMHO this is not an urgent feature then

(leaving prio/sev as is for PM to scrub, but currently such an item is preliminary targeted for 4.0)
(also fixing product, as having a private oVirt bug doesn't make much sense)

Comment 4 Dan Kenigsberg 2014-05-23 11:27:35 UTC
I'd love to see a GUI checkbox asking for "sysprep VM after clone", "sysprep VM after import" and "sysprep template after creation" (the latter should be the default).

When set, Engine could issue a (currently non-existing) vdsm verb sysprepImage() to any host.

Comment 7 Michal Skrivanek 2014-07-22 07:10:35 UTC
*** Bug 1120265 has been marked as a duplicate of this bug. ***

Comment 8 Michal Skrivanek 2014-07-22 07:11:33 UTC
(In reply to Dan Kenigsberg from comment #4)
note this RFE should cover also an "Import VM" case

Comment 10 Nikolai Sednev 2014-07-24 14:13:58 UTC
This RFE should cover VM from template creation; import VM from export storage domain, number of VMs creation from VM pool.

All these flows have the same root cause, mac address given to newly created VMs is random, but the cd /etc/sysconfig/network-scripts/ifcfg-eth0 or whatever interface file config you have, contains mac address from the original VM, from which it was cloned.

Comment 12 Michal Skrivanek 2015-01-09 07:51:39 UTC
*** Bug 1177954 has been marked as a duplicate of this bug. ***

Comment 14 Michal Skrivanek 2016-05-13 07:00:20 UTC
A new RFE 1335642 was opened describing a one-time sealing, this request (doing it automatically during import/deploy) is a flow based on that support

Comment 15 Martin Tessun 2018-06-18 12:50:11 UTC
Thank you for submitting this request for inclusion in Red Hat Virtualization. We've carefully evaluated the request, but are unable to include it in a future release. To request that Red Hat re-consider this request, please re-open the bugzilla via appropriate support channels and provide additional business and/or technical details about its importance to you.

Comment 16 Franta Kust 2019-05-16 13:09:52 UTC
BZ<2>Jira Resync