Bug 1146912

Summary: [RFE] Generate sysprep answers file with name matching the version of Windows
Product: Red Hat Enterprise Virtualization Manager Reporter: Michal Skrivanek <michal.skrivanek>
Component: RFEsAssignee: Shahar Havivi <shavivi>
Status: CLOSED ERRATA QA Contact: Ilanit Stein <istein>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: bugs, gklein, iheim, istein, juan.hernandez, juwu, lbopf, lpeer, lsurette, mavital, michal.skrivanek, nsimsolo, pnovotny, pstehlik, rbalakri, shavivi, sherold, s.kieske, yeylon, ykaul
Target Milestone: ovirt-3.6.0-rcKeywords: FutureFeature, ZStream
Target Release: 3.6.0Flags: sherold: Triaged+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-3-6-0-2 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1145999
: 1174814 1203929 (view as bug list) Environment:
Last Closed: 2016-03-09 20:40:23 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: 1145999    
Bug Blocks: 1174814, 1203929    

Description Michal Skrivanek 2014-09-26 10:55:17 UTC
+++ This bug was initially created as a clone of Bug #1145999 +++

Description of problem:

Currently when using sysprep the engine generates the answer file always with the name "sysprep.inf". This is OK for windows XP, but newer versions like Windows 7 or Windows 2008 use an XML file and they expect it to be named "Unattend.xml".

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

3.5

How reproducible:

Always.

Steps to Reproduce:

1. Run a virtual machine using Sysprep.

Actual results:

The file included in the attached floppy is named "sysprep.inf" regardless of the version of Windows.

Expected results:

The file included in the attached floppy is named "sysprep.inf" or "Unattend.xml" according to the version of Windows specified when creating the VM.

Additional information:

The issue can be avoided modifying the adding the following entry to the registry of the Windows machine before creating the template:

  HKEY-LOCAL-MACHINE -> SYSTEM -> Setup -> UnattendFile = A:\sysprep.inf

Comment 1 Michal Skrivanek 2014-09-26 10:57:06 UTC
need to update Administration_Guide/Sealing_a_Windows_7_or_Windows_2008_template.html once this is fixed

Comment 5 Julie 2015-03-20 00:39:05 UTC
(In reply to Michal Skrivanek from comment #1)
> need to update
> Administration_Guide/Sealing_a_Windows_7_or_Windows_2008_template.html once
> this is fixed

Hi Michal, thanks for your note. I have cloned a bug for documentation to make sure this is tracked for documentation (BZ#1203929)
To ensure future instances get picked up by the documentation team, please email rhev-docs or let Andrew Dahms know. We only really use the doc text field for errata and release note but not for guides like Install, Admin, Technical, etc.

Many thanks for your help,
Julie

Comment 6 Julie 2015-03-20 00:45:08 UTC
(In reply to Julie from comment #5)
> (In reply to Michal Skrivanek from comment #1)
> > need to update
> > Administration_Guide/Sealing_a_Windows_7_or_Windows_2008_template.html once
> > this is fixed
> 
> Hi Michal, thanks for your note. I have cloned a bug for documentation to
> make sure this is tracked for documentation (BZ#1203929)
> To ensure future instances get picked up by the documentation team, please
> email rhev-docs or let Andrew Dahms know. We only really use the
> doc text field for errata and release note but not for guides like Install,
> Admin, Technical, etc.
> 
> Many thanks for your help,
> Julie

I just saw that Nisim has opened a docs bug already (BZ#1198488). My apologies.

Cheers,
Julie

Comment 7 Nisim Simsolo 2015-06-25 14:31:43 UTC
polarion test case sent for review: 
https://polarion.engineering.redhat.com/polarion/#/project/RHEVM3/workitem?id=RHEVM3-12206

Comment 8 Nisim Simsolo 2015-07-19 08:29:04 UTC
Please review/confirm test case attached.

Comment 9 Ilanit Stein 2016-01-24 14:53:25 UTC
Verification on rhevm 3.6.2-2:

Following the attached Polarion test case.

Setup preparation:
=================
Prepare sealed VMs with the next OS types (also validate VM OS type is correct):
Windows XP
Windows 2003 - wasn't tested
Windows 7
Windows 2008
Windows 2008 R2
Windows 2012 - wasn't tested
Windows 2012 R2 - wasn't tested
Windows 8 - wasn't tested.

2. Edit each VM and configure: 
sysprep > configure time zone: Tonga standard time
sysprep > VM hostname equal to VM name.
sysprep > sysprep - Paste here answer file & set computer Name to "answerfile_name": 
For Windows XP, Windows 2003 the sysprep.inf file 
For Windows 7,  Windows 2008,  Windows 2008 R2, Windows 2012, Windows 2012 R2,      Windows 8 the Unattended.xml 

Test steps:
==========
1. VM -> run once -> check attach floppy -> open dropbox -> select [sysprep] and click "OK".
2. Wait for VM to run and open console.

Required results:
================
1. Verify inside the VM the file in Floppy disk is
sysprep.inf file for Windows XP, Windows 2003,
Unattend.xml for Windows 7,  Windows 2008,  Windows 2008 R2, Windows 2012, Windows 2012 R2, Windows 8, 
containing the values inserted in sysprep field. 
2. Verify:
Timezone is Nukualofa (Tonga).
VM computer Name is "answerfile_name"

Actual results:
==============
windows 7 - guest has Unattend.xml file attached in it's floppy with correct values same as what inserted in sysprep field (in the VM run once->initial run dialog). Time zone parameter updated. computer name updated by the sysprep file.

windows XP - guest has sysprep.ini file attached in it's floppy with correct values same as what inserted in sysprep field (in the VM run once->initial run dialog). However Time zone parameter, and computer name were not updated by the sysprep file and seem to contain original windows setup values - BZ 1301326
Also had this windows XP VM name validation bug: BZ 1301325

windows 2008 - guest has Unattend.xml file attached in it's floppy with correct values same as what inserted in sysprep field (in the VM run once->initial run dialog). Time zone parameter updated. computer name updated by the sysprep file.
Encountered though this bug, that in run once VM was trying to load from network: BZ 1301334

windows 2008 R2 - guest has Unattend.xml file attached in it's floppy with correct values same as what inserted in sysprep field (in the VM run once->initial run dialog). However Time zone parameter, and computer name were not updated by the sysprep file and seem to contain original windows setup values - BZ 1301368
 
Based on these results, of having the correct sysprep file attached for various windows types, we can move this bug to verified,
Unless you find further testing required?

Comment 10 Shahar Havivi 2016-01-24 15:11:52 UTC
fine with me,
the files are corrected.

Comment 11 Ilanit Stein 2016-01-25 07:11:08 UTC
Correction to rhevm version of verification. should be rhevm-3.6.2-10, and not rhevm-3.6.2-2.

Comment 12 Ilanit Stein 2016-01-28 11:02:59 UTC
Additional bugs that were opened following testing of this feature:

BZ 1302661 [docs] VIRTUAL MACHINE MANAGEMENT GUIDE, some of Create VM/ Edit VM options are not mentioned			

BZ 1302659 [docs] VIRTUAL MACHINE MANAGEMENT GUIDE, fixes for windows VM->run once 

BZ 1302605 [webadmin] Add helper to windows VM->run once->initial run -> Domain (redundant field)	

BZ 1302585 [webadmin] VM run once -> Initial run Indentation problem			

BZ 1302562 Provide more details for Import image from external provider operation	

BZ 1302559 [Webadmin] Add helper for windows VMs sysprep field

Comment 13 Lucy Bopf 2016-02-22 04:11:50 UTC
Moving 'requires_doc_text' to '-' and removing doc text. The documentation for this bug has now been addressed in bug 1198488.

Comment 15 errata-xmlrpc 2016-03-09 20:40:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-0376.html