Bug 1264733 - Deploy Windows Server 2012 R2 x64 fails to set admin password and join domain
Deploy Windows Server 2012 R2 x64 fails to set admin password and join domain
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine
Classification: oVirt
Component: General (Show other bugs)
3.5.3.1
Unspecified Windows
medium Severity medium (vote)
: ovirt-3.6.3
: 3.6.3
Assigned To: Shahar Havivi
sefi litmanovich
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-21 01:25 EDT by ian
Modified: 2016-02-18 06:07 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-18 06:07:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
ofrenkel: ovirt‑3.6.z?
rule-engine: ovirt‑4.0.0+
rule-engine: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 51793 master MERGED core: wrong usage of DomainAdminPassword instead of AdminPassword 2016-01-17 04:33 EST
oVirt gerrit 51927 ovirt-engine-3.6 MERGED core: wrong usage of DomainAdminPassword instead of AdminPassword 2016-01-17 05:27 EST

  None (edit)
Description ian 2015-09-21 01:25:16 EDT
Description of problem:
Deploying Windows Server 2012 R2 x64 from a properly sealed template using the "Run Once" option with appropriate options to set local administrator password and join domain fails 

Version-Release number of selected component (if applicable):
Fails on 3.5.3.1 and 3.6 RC5

How reproducible:
Always

Steps to Reproduce:
1.Create a properly sealed Windows Server 2012 R2 x64 template using sysprep (as per http://www.ovirt.org/Quick_Start_Guide#Create_a_Windows_Template)
2.Create a VM from template
3.First run of the new VM use "Run Once" and set:
Boot Options-> check attach floppy and select [sysprep]
Initial Run-> VM hostname, Domain, Organization Name, admin password (and verify), sysprep:Domain (optionally alternative credentials if necessary)

Actual results:
VM is not joined to the domain and the local administrator password is set to the password set in the credentials used to join the domain

Expected results:
VM should be a domain member and the local administrator password should be set to what was input in "Initial Run"->"admin password"


Additional info:
I have changed /usr/share/ovirt-engine/conf/sysprep/sysprep.2k12r2x64 and can now deploy VMs that join the domain and set the correct local administrator account as expected. 

Patch info:
4c4
<         <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
---
>         <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
9c9
<         <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
---
>         <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
23c23
<         <component name="Microsoft-Windows-IE-ClientNetworkProtocolImplementation" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
---
>         <component name="Microsoft-Windows-IE-ClientNetworkProtocolImplementation" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
26c26
<         <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
---
>         <component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
33c33
<         <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
---
>         <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
46c46
<                     <Value><![CDATA[$AdminPassword$]]></Value>
---
>                     <Value><![CDATA[$DomainAdminPassword$]]></Value>
56c56
<         <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
---
>         <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
66c66
<         <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
---
>         <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Comment 1 Red Hat Bugzilla Rules Engine 2015-10-19 07:02:26 EDT
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
Comment 2 Shahar Havivi 2016-01-13 05:00:11 EST
The bug is not in the sysprep xml file but in the SysprepHandler
The $DomainAdminPassword$ should stay as is since the user can set it via the SysPrepDefaultPassword config value (if you do pass it via run once/run we override it with the value you send as you expected).
Comment 3 ian 2016-01-13 06:10:30 EST
I disagree.
Line 46 in the xml file sets the local administrators password for this installation of Windows, therefore it should be $AdminPassword$ not $DomainAdminPassword$. Line 13 correctly uses $DomainAdminPassword$ to try to  join the windows installation to the domain but I believe fails because Line 9 contains processorArchitecture="x86" not processorArchitecture="amd64" and this is a 64bit OS.

The above patch works for me whereas the original file does not.

If you need any more info please let me know.
Comment 4 Shahar Havivi 2016-01-13 07:34:22 EST
(In reply to ian from comment #3)
thanks Ian you right,
it is suppose to be local admin as the section suggested but still we have bigger issue regarding domain admin password that we will fix with this patch
Comment 5 sefi litmanovich 2016-02-10 09:19:28 EST
Verified with rhevm-3.6.3-0.1.el6.noarch, tried the flow with both windows 2012 X64 and windows 2012 R2 x64.
Verified according to the description.
The xml that produced for sysprep contained all the correct values, differentiating between DomainAdminPassword and AdminPassword.

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