Bug 1264733 - Deploy Windows Server 2012 R2 x64 fails to set admin password and join domain
Summary: Deploy Windows Server 2012 R2 x64 fails to set admin password and join domain
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: General
Version: 3.5.3.1
Hardware: Unspecified
OS: Windows
medium
medium
Target Milestone: ovirt-3.6.3
: 3.6.3
Assignee: Shahar Havivi
QA Contact: sefi litmanovich
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-21 05:25 UTC by ian
Modified: 2016-02-18 11:07 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-18 11:07:36 UTC
oVirt Team: Virt
Embargoed:
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)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 51793 0 master MERGED core: wrong usage of DomainAdminPassword instead of AdminPassword 2016-01-17 09:33:46 UTC
oVirt gerrit 51927 0 ovirt-engine-3.6 MERGED core: wrong usage of DomainAdminPassword instead of AdminPassword 2016-01-17 10:27:06 UTC

Description ian 2015-09-21 05:25:16 UTC
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 11:02:26 UTC
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 10:00:11 UTC
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 11:10:30 UTC
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 12:34:22 UTC
(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 14:19:28 UTC
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.