Skip to contentSkip to conversation

KVM test: General windows unattended install files cleanup

PATCH New Lucas Meneghel Rodrigues 1 participant 2 messages Feb 4, 2010 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 KVM test: General windows unattended install files cleanup

Cleanup of windows unattended install files:

* Increasing number of autologons allowed
* Splitting some commands that were chained (such as ipconfig && ping && a:\finish.exe, because that was leading to failures on winxp

---
 client/tests/kvm/unattended/win2003-32.sif         |   75 ++++++++++----------
 client/tests/kvm/unattended/win2003-64.sif         |   74 ++++++++++---------
 .../kvm/unattended/win2008-32-autounattend.xml     |   16 +++--
 .../kvm/unattended/win2008-64-autounattend.xml     |   36 ++++++----
 .../kvm/unattended/win2008-r2-autounattend.xml     |   36 ++++++----
 .../tests/kvm/unattended/win7-32-autounattend.xml  |   15 ++--
 .../tests/kvm/unattended/win7-64-autounattend.xml  |   36 ++++++----
 .../kvm/unattended/winvista-32-autounattend.xml    |   49 ++++++-------
 .../kvm/unattended/winvista-64-autounattend.xml    |   48 +++++++------
 client/tests/kvm/unattended/winxp32.sif            |    9 +--
 10 files changed, 211 insertions(+), 183 deletions(-)
client/tests/kvm/unattended/win2003-32.sif +38 -37
index 5c90b03..85d4694 100644
@@ -1,42 +1,38 @@
 [Data]
-AutoPartition = 1
-MsDosInitiated = 0
-UnattendedInstall = Yes
+    AutoPartition = 1
+    MsDosInitiated = 0
+    UnattendedInstall = Yes
 
 [Unattended]
-UnattendMode = FullUnattended
-OemSkipEula = Yes
-OemPreinstall = No
-UnattendSwitch = Yes
-CrashDumpSetting = 1
-DriverSigningPolicy = ignore
-WaitForReboot = no
-Repartition = yes
+    UnattendMode = FullUnattended
+    OemSkipEula = Yes
+    OemPreinstall = No
+    UnattendSwitch = Yes
+    CrashDumpSetting = 1
+    DriverSigningPolicy = ignore
+    WaitForReboot = no
+    Repartition = yes
 
 [GuiUnattended]
-AdminPassword = "1q2w3eP"
-AutoLogon = Yes
-AutoLogonCount = 5
-OEMSkipRegional = 1
-TimeZone = 85
-OemSkipWelcome = 1
+    AdminPassword = "1q2w3eP"
+    AutoLogon = Yes
+    AutoLogonCount = 1000
+    OEMSkipRegional = 1
+    TimeZone = 85
+    OemSkipWelcome = 1
 
 [UserData]
-FullName = "rhqe"
-OrgName = "REDHAT"
-ComputerName = *
-ProductKey = KVM_TEST_CDKEY
+    ProductKey=KVM_TEST_CDKEY
+    FullName="Autotest Mindless Drone"
+    OrgName="Autotest"
+    ComputerName=*
 
 [LicenseFilePrintData]
-AutoMode=PerServer
-AutoUsers=15
+    AutoMode=PerServer
+    AutoUsers=15
 
 [Identification]
-	DoOldStyleDomainJoin = YES
-	DomainAdmin="Administrator"
-	DomainAdminPassword="1q2w3eP"
     JoinWorkgroup=WORKGROUP
-	JoinDomain="qe.redhat.com"
 
 [Networking]
     InstallDefaultComponents=Yes
@@ -44,20 +40,25 @@ AutoUsers=15
 [Components]
 
 [TerminalServices]
-AllowConnections = 1
-
+    AllowConnections = 1
 
 [WindowsFirewall]
-Profiles = WindowsFirewall.TurnOffFirewall
+    Profiles = WindowsFirewall.TurnOffFirewall
+
 [WindowsFirewall.TurnOffFirewall]
-Mode = 0
+    Mode = 0
 
 [SetupParams]
-local="Local Area Connection"
+    local="Local Area Connection"
+
+[Display]
+    Xresolution=1024
+    YResolution=768
 
 [GuiRunOnce]
-Command0="cmd /c sc config TlntSvr start= auto"
-Command1="cmd /c netsh firewall set opmode disable"
-Command2="cmd /c net start telnet"
-Command3="cmd /c E:\setuprss.bat"
-Command4="cmd /c netsh interface ip set address local dhcp && ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2"
+    Command0="cmd /c sc config TlntSvr start= auto"
+    Command1="cmd /c netsh firewall set opmode disable"
+    Command2="cmd /c net start telnet"
+    Command3="cmd /c E:\setuprss.bat"
+    Command4="cmd /c netsh interface ip set address local dhcp"
+    Command5="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2"
client/tests/kvm/unattended/win2003-64.sif +38 -36

99 lines not on this page · raw message

client/tests/kvm/unattended/win2008-32-autounattend.xml +10 -6
index 07c2889..a1ad315 100644
@@ -57,8 +57,8 @@
                     <WillShowUI>OnError</WillShowUI>
                 </ProductKey>
                 <AcceptEula>true</AcceptEula>
-                <FullName>redhatqe</FullName>
-                <Organization>redhat</Organization>
+                <FullName>Autotest Mindless Drone</FullName>
+                <Organization>Autotest</Organization>
             </UserData>
             <EnableFirewall>false</EnableFirewall>
             <EnableNetwork>true</EnableNetwork>
@@ -117,7 +117,11 @@
                  </SynchronousCommand>
                  <SynchronousCommand wcm:action="add">
                     <Order>6</Order>
-                    <CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp &#38;&#38; ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe 10.0.2.2</CommandLine>
+                    <CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp</CommandLine>
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
+                    <Order>7</Order>
+                    <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe 10.0.2.2</CommandLine>
                  </SynchronousCommand>
             </FirstLogonCommands>
             <OOBE>
@@ -130,11 +134,11 @@
         <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">
             <AutoLogon>
                 <Password>
-                    <Value>cgBlAGQAaABhAHQAUABhAHMAcwB3AG8AcgBkAA==</Value>
-                    <PlainText>false</PlainText>
+                    <Value>1q2w3eP</Value>
+                    <PlainText>true</PlainText>
                 </Password>
                 <Username>Administrator</Username>
-                <LogonCount>5</LogonCount>
+                <LogonCount>1000</LogonCount>
                 <Enabled>true</Enabled>
             </AutoLogon>
         </component>
client/tests/kvm/unattended/win2008-64-autounattend.xml +21 -15
index fc996d6..c0c8660 100644
@@ -44,10 +44,12 @@
             </ImageInstall>
             <UserData>
                 <ProductKey>
-                    <WillShowUI>OnError</WillShowUI>
                     <Key>KVM_TEST_CDKEY</Key>
+                    <WillShowUI>OnError</WillShowUI>
                 </ProductKey>
                 <AcceptEula>true</AcceptEula>
+                <FullName>Autotest Mindless Drone</FullName>
+                <Organization>Autotest</Organization>
             </UserData>
         </component>
         <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">
@@ -98,34 +100,38 @@
                     <PlainText>true</PlainText>
                 </Password>
                 <Enabled>true</Enabled>
-                <LogonCount>5</LogonCount>
+                <LogonCount>1000</LogonCount>
                 <Username>Administrator</Username>
             </AutoLogon>
             <FirstLogonCommands>
-                <SynchronousCommand wcm:action="add">
+                 <SynchronousCommand wcm:action="add">
                     <Order>1</Order>
                     <CommandLine>%WINDIR%\System32\cmd /c start /w pkgmgr /iu:"TelnetServer"</CommandLine>
-                </SynchronousCommand>
-                <SynchronousCommand wcm:action="add">
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
                     <Order>2</Order>
                     <CommandLine>%WINDIR%\System32\cmd /c sc config TlntSvr start= auto</CommandLine>
-                </SynchronousCommand>
-                <SynchronousCommand wcm:action="add">
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
                     <Order>3</Order>
                     <CommandLine>%WINDIR%\System32\cmd /c netsh firewall set opmode disable</CommandLine>
-                </SynchronousCommand>
-                <SynchronousCommand wcm:action="add">
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
                     <Order>4</Order>
                     <CommandLine>%WINDIR%\System32\cmd /c net start telnet</CommandLine>
-                </SynchronousCommand>
-                <SynchronousCommand wcm:action="add">
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
                     <Order>5</Order>
                     <CommandLine>%WINDIR%\System32\cmd /c E:\setuprss.bat</CommandLine>
-                </SynchronousCommand>
-                <SynchronousCommand wcm:action="add">
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
                     <Order>6</Order>
-                    <CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp &#38;&#38; ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe 10.0.2.2</CommandLine>
-                </SynchronousCommand>
+                    <CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp</CommandLine>
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
+                    <Order>7</Order>
+                    <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe 10.0.2.2</CommandLine>
+                 </SynchronousCommand>
             </FirstLogonCommands>
             <OOBE>
                 <HideEULAPage>true</HideEULAPage>
client/tests/kvm/unattended/win2008-r2-autounattend.xml +21 -15
index fc996d6..c0c8660 100644
@@ -44,10 +44,12 @@
             </ImageInstall>
             <UserData>
                 <ProductKey>
-                    <WillShowUI>OnError</WillShowUI>
                     <Key>KVM_TEST_CDKEY</Key>
+                    <WillShowUI>OnError</WillShowUI>
                 </ProductKey>
                 <AcceptEula>true</AcceptEula>
+                <FullName>Autotest Mindless Drone</FullName>
+                <Organization>Autotest</Organization>
             </UserData>
         </component>
         <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">
@@ -98,34 +100,38 @@
                     <PlainText>true</PlainText>
                 </Password>
                 <Enabled>true</Enabled>
-                <LogonCount>5</LogonCount>
+                <LogonCount>1000</LogonCount>
                 <Username>Administrator</Username>
             </AutoLogon>
             <FirstLogonCommands>
-                <SynchronousCommand wcm:action="add">
+                 <SynchronousCommand wcm:action="add">
                     <Order>1</Order>
                     <CommandLine>%WINDIR%\System32\cmd /c start /w pkgmgr /iu:"TelnetServer"</CommandLine>
-                </SynchronousCommand>
-                <SynchronousCommand wcm:action="add">
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
                     <Order>2</Order>
                     <CommandLine>%WINDIR%\System32\cmd /c sc config TlntSvr start= auto</CommandLine>
-                </SynchronousCommand>
-                <SynchronousCommand wcm:action="add">
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
                     <Order>3</Order>
                     <CommandLine>%WINDIR%\System32\cmd /c netsh firewall set opmode disable</CommandLine>
-                </SynchronousCommand>
-                <SynchronousCommand wcm:action="add">
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
                     <Order>4</Order>
                     <CommandLine>%WINDIR%\System32\cmd /c net start telnet</CommandLine>
-                </SynchronousCommand>
-                <SynchronousCommand wcm:action="add">
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
                     <Order>5</Order>
                     <CommandLine>%WINDIR%\System32\cmd /c E:\setuprss.bat</CommandLine>
-                </SynchronousCommand>
-                <SynchronousCommand wcm:action="add">
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
                     <Order>6</Order>
-                    <CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp &#38;&#38; ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe 10.0.2.2</CommandLine>
-                </SynchronousCommand>
+                    <CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp</CommandLine>
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
+                    <Order>7</Order>
+                    <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe 10.0.2.2</CommandLine>
+                 </SynchronousCommand>
             </FirstLogonCommands>
             <OOBE>
                 <HideEULAPage>true</HideEULAPage>
client/tests/kvm/unattended/win7-32-autounattend.xml +8 -7
index 742915b..a1ad315 100644
@@ -57,8 +57,8 @@
                     <WillShowUI>OnError</WillShowUI>
                 </ProductKey>
                 <AcceptEula>true</AcceptEula>
-                <FullName>redhatqe</FullName>
-                <Organization>redhat</Organization>
+                <FullName>Autotest Mindless Drone</FullName>
+                <Organization>Autotest</Organization>
             </UserData>
             <EnableFirewall>false</EnableFirewall>
             <EnableNetwork>true</EnableNetwork>
@@ -117,15 +117,16 @@
                  </SynchronousCommand>
                  <SynchronousCommand wcm:action="add">
                     <Order>6</Order>
-                    <CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp &#38;&#38; ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe 10.0.2.2</CommandLine>
+                    <CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp</CommandLine>
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
+                    <Order>7</Order>
+                    <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe 10.0.2.2</CommandLine>
                  </SynchronousCommand>
             </FirstLogonCommands>
             <OOBE>
-                <HideEULAPage>true</HideEULAPage>
                 <ProtectYourPC>1</ProtectYourPC>
                 <NetworkLocation>Work</NetworkLocation>
-                <SkipUserOOBE>true</SkipUserOOBE>
-                <SkipMachineOOBE>true</SkipMachineOOBE>
             </OOBE>
         </component>
     </settings>
@@ -137,7 +138,7 @@
                     <PlainText>true</PlainText>
                 </Password>
                 <Username>Administrator</Username>
-                <LogonCount>5</LogonCount>
+                <LogonCount>1000</LogonCount>
                 <Enabled>true</Enabled>
             </AutoLogon>
         </component>
client/tests/kvm/unattended/win7-64-autounattend.xml +21 -15
index fc996d6..c0c8660 100644
@@ -44,10 +44,12 @@
             </ImageInstall>
             <UserData>
                 <ProductKey>
-                    <WillShowUI>OnError</WillShowUI>
                     <Key>KVM_TEST_CDKEY</Key>
+                    <WillShowUI>OnError</WillShowUI>
                 </ProductKey>
                 <AcceptEula>true</AcceptEula>
+                <FullName>Autotest Mindless Drone</FullName>
+                <Organization>Autotest</Organization>
             </UserData>
         </component>
         <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">
@@ -98,34 +100,38 @@
                     <PlainText>true</PlainText>
                 </Password>
                 <Enabled>true</Enabled>
-                <LogonCount>5</LogonCount>
+                <LogonCount>1000</LogonCount>
                 <Username>Administrator</Username>
             </AutoLogon>
             <FirstLogonCommands>
-                <SynchronousCommand wcm:action="add">
+                 <SynchronousCommand wcm:action="add">
                     <Order>1</Order>
                     <CommandLine>%WINDIR%\System32\cmd /c start /w pkgmgr /iu:"TelnetServer"</CommandLine>
-                </SynchronousCommand>
-                <SynchronousCommand wcm:action="add">
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
                     <Order>2</Order>
                     <CommandLine>%WINDIR%\System32\cmd /c sc config TlntSvr start= auto</CommandLine>
-                </SynchronousCommand>
-                <SynchronousCommand wcm:action="add">
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
                     <Order>3</Order>
                     <CommandLine>%WINDIR%\System32\cmd /c netsh firewall set opmode disable</CommandLine>
-                </SynchronousCommand>
-                <SynchronousCommand wcm:action="add">
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
                     <Order>4</Order>
                     <CommandLine>%WINDIR%\System32\cmd /c net start telnet</CommandLine>
-                </SynchronousCommand>
-                <SynchronousCommand wcm:action="add">
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
                     <Order>5</Order>
                     <CommandLine>%WINDIR%\System32\cmd /c E:\setuprss.bat</CommandLine>
-                </SynchronousCommand>
-                <SynchronousCommand wcm:action="add">
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
                     <Order>6</Order>
-                    <CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp &#38;&#38; ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe 10.0.2.2</CommandLine>
-                </SynchronousCommand>
+                    <CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" dhcp</CommandLine>
+                 </SynchronousCommand>
+                 <SynchronousCommand wcm:action="add">
+                    <Order>7</Order>
+                    <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe 10.0.2.2</CommandLine>
+                 </SynchronousCommand>
             </FirstLogonCommands>
             <OOBE>
                 <HideEULAPage>true</HideEULAPage>
client/tests/kvm/unattended/winvista-32-autounattend.xml +23 -26

70 lines not on this page · raw message

client/tests/kvm/unattended/winvista-64-autounattend.xml +27 -21

76 lines not on this page · raw message

client/tests/kvm/unattended/winxp32.sif +4 -5
index a5456c0..4711a3d 100644
@@ -63,12 +63,11 @@
 [Branding]
     BrandIEUsingUnattended=Yes
 
-[GuiRunOnce]
-   Command0="cmd /c E:\setuprss.bat"
-   Command1="cmd /c netsh interface ip set address local dhcp"
-   Command2="cmd /c ping 10.0.2.2 && A:\finish.exe 10.0.2.2"
-
 [Display]
     Xresolution=1024
     YResolution=768
 
+[GuiRunOnce]
+   Command0="cmd /c E:\setuprss.bat"
+   Command1="cmd /c netsh interface ip set address local dhcp"
+   Command2="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2"
Signature · 1 line
1.6.6
#1 lore raw

PATCH 2/2 KVM test: Unattended - call preprocessor to kill vms

Preprocessing code was killing VMs too abruptly at the end of the installation, so let's add an additional kill_vm_gracefully to it, so it can try to shutdown the VM using a shutdown command first, which makes windows install much smoother, and it doesn't disturb with kickstart installs.

---
 client/tests/kvm/tests_base.cfg.sample |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
client/tests/kvm/tests_base.cfg.sample +2 -0
index 7f2c41d..91daf48 100644
@@ -62,6 +62,8 @@ variants:
 
     - unattended_install:
         type = unattended_install
+        kill_vm = yes
+        kill_vm_gracefully = yes
         kill_vm_on_error = yes
         force_create_image = yes
         pre_command = scripts/unattended.py
Signature · 1 line
1.6.6