Bug 1122160

Summary: [Windows sysprep] Run Once: Special characters are not encoded in XML sysprep files for Windows 7, 8, 2008, 2012
Product: [Retired] oVirt Reporter: Pavel Novotny <pnovotny>
Component: ovirt-engine-coreAssignee: Shahar Havivi <shavivi>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Stehlik <pstehlik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.5CC: bugs, ecohen, gklein, iheim, michal.skrivanek, rbalakri, yeylon
Target Milestone: ---   
Target Release: 3.4.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: ovirt-3.5.0_rc2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1132191 (view as bug list) Environment:
Last Closed: 2014-09-24 08:08:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1132191    

Description Pavel Novotny 2014-07-22 16:42:50 UTC
Description of problem:
When running a sealed Windows 7/7x64/8/8x64/2008/2008x64/2012x64 VM with sysprep floppy attached, all values provided from Run Once dialog are put in the sysprep file as plain-text, even when these Windows versions are using XML format for sysprep file, thus allowing to create a syntactically incorrect sysprep file.

Version-Release number of selected component (if applicable):
ovirt-engine-3.5.0-0.0.master.20140629172257.git0b16ed7.el6.noarch (beta)

How reproducible:
100%

Steps to Reproduce:
1. Have a "sealed" Windows VM, any of version 7, 7x64, 8, 8x64, 2008, 2008x64 or 2012x64
2. In Run Once dialog enter as the Admin Password value 'pass</word>'
3. Run the VM and watch the Windows initialization process

Actual results:
The Windows initialization fails on a parsing error of the unattend file.
If you check it (A:\sysprep.inf), you see the admin password is put in the XML as plain-text:

  <AdministratorPassword>
    <Value>pass</word></Value>
    <PlainText>true</PlainText>
  </AdministratorPassword>


Expected results:
For Windows versions using XML sysprep files, all special characters should be encoded, such as: in GUI enter value 'pass</word>' and in sysprep file will be value 'pass&lt;/word&gt;'.

Additional info:

Comment 1 Sandro Bonazzola 2014-09-24 08:08:58 UTC
oVirt 3.4.4 has been released.