Skip to contentSkip to conversation

KVM test: Fix setup stage of windows hosts

PATCH New Lucas Meneghel Rodrigues 1 participant 1 message Jan 26, 2010 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM test: Fix setup stage of windows hosts

Most of the unattended windows install files added a static ip network connection before reporting end of install. That is fine when you are using user mode networking only, but this is certainly restrictive, and will give problems on subsequent tests if you are using tap mode. Let's do all network configuration through DCHP instead.

Tested and it works just fine for all versions of windows.

---
 client/tests/kvm/unattended/win2003-32.sif         |    2 +-
 client/tests/kvm/unattended/win2003-64.sif         |    2 +-
 .../kvm/unattended/win2008-32-autounattend.xml     |    2 +-
 .../kvm/unattended/win2008-64-autounattend.xml     |    2 +-
 .../kvm/unattended/win2008-r2-autounattend.xml     |    2 +-
 .../tests/kvm/unattended/win7-32-autounattend.xml  |    2 +-
 .../tests/kvm/unattended/win7-64-autounattend.xml  |    2 +-
 .../kvm/unattended/winvista-32-autounattend.xml    |    2 +-
 .../kvm/unattended/winvista-64-autounattend.xml    |    2 +-
 client/tests/kvm/unattended/winxp32.sif            |    2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)
client/tests/kvm/unattended/win2003-32.sif +1 -1
index 5b9bf0e..901f435 100644
@@ -60,4 +60,4 @@ 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 static 10.0.2.15 255.255.255.0 10.0.2.2 1 && ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2"
+Command4="cmd /c netsh interface ip set address local dhcp && ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2"
client/tests/kvm/unattended/win2003-64.sif +1 -1
index aca24fe..9f09033 100644
@@ -59,4 +59,4 @@ 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 static 10.0.2.15 255.255.255.0 10.0.2.2 1 && ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2"
+Command4="cmd /c netsh interface ip set address local dhcp && ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2"
client/tests/kvm/unattended/win2008-32-autounattend.xml +1 -1
index 0498e99..d8f7654 100644
@@ -117,7 +117,7 @@
                  </SynchronousCommand>
                  <SynchronousCommand wcm:action="add">
                     <Order>6</Order>
-                    <CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" static 10.0.2.15 255.255.255.0 10.0.2.2 1 &#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 &#38;&#38; ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe 10.0.2.2</CommandLine>
                  </SynchronousCommand>
             </FirstLogonCommands>
             <OOBE>
client/tests/kvm/unattended/win2008-64-autounattend.xml +1 -1
index 77c4999..4202b93 100644
@@ -124,7 +124,7 @@
                 </SynchronousCommand>
                 <SynchronousCommand wcm:action="add">
                     <Order>6</Order>
-                    <CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" static 10.0.2.15 255.255.255.0 10.0.2.2 1 &#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 &#38;&#38; ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe 10.0.2.2</CommandLine>
                 </SynchronousCommand>
             </FirstLogonCommands>
             <OOBE>
client/tests/kvm/unattended/win2008-r2-autounattend.xml +1 -1
index 77c4999..4202b93 100644
@@ -124,7 +124,7 @@
                 </SynchronousCommand>
                 <SynchronousCommand wcm:action="add">
                     <Order>6</Order>
-                    <CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" static 10.0.2.15 255.255.255.0 10.0.2.2 1 &#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 &#38;&#38; ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe 10.0.2.2</CommandLine>
                 </SynchronousCommand>
             </FirstLogonCommands>
             <OOBE>
client/tests/kvm/unattended/win7-32-autounattend.xml +1 -1
index 86a0ae7..46e7064 100644
@@ -117,7 +117,7 @@
                  </SynchronousCommand>
                  <SynchronousCommand wcm:action="add">
                     <Order>6</Order>
-                    <CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" static 10.0.2.15 255.255.255.0 10.0.2.2 1 &#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 &#38;&#38; ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe 10.0.2.2</CommandLine>
                  </SynchronousCommand>
             </FirstLogonCommands>
             <OOBE>
client/tests/kvm/unattended/win7-64-autounattend.xml +1 -1
index 77c4999..4202b93 100644
@@ -124,7 +124,7 @@
                 </SynchronousCommand>
                 <SynchronousCommand wcm:action="add">
                     <Order>6</Order>
-                    <CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" static 10.0.2.15 255.255.255.0 10.0.2.2 1 &#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 &#38;&#38; ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe 10.0.2.2</CommandLine>
                 </SynchronousCommand>
             </FirstLogonCommands>
             <OOBE>
client/tests/kvm/unattended/winvista-32-autounattend.xml +1 -1
index 072385d..5d2b038 100644
@@ -130,7 +130,7 @@
                     <Order>5</Order>
                 </SynchronousCommand>
                 <SynchronousCommand wcm:action="add">
-                    <CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" static 10.0.2.15 255.255.255.0 10.0.2.2 1 &#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 &#38;&#38; ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe 10.0.2.2</CommandLine>
                     <Order>6</Order>
                 </SynchronousCommand>
             </FirstLogonCommands>
client/tests/kvm/unattended/winvista-64-autounattend.xml +1 -1
index 7396061..812db40 100644
@@ -121,7 +121,7 @@
                     <Order>4</Order>
                 </SynchronousCommand>
                 <SynchronousCommand wcm:action="add">
-                    <CommandLine>%WINDIR%\System32\cmd /c netsh interface ip set address "Local Area Connection" static 10.0.2.15 255.255.255.0 10.0.2.2 1 &#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 &#38;&#38; ping 10.0.2.2 -n 20 &#38;&#38; A:\finish.exe 10.0.2.2</CommandLine>
                     <Order>5</Order>
                 </SynchronousCommand>
             </FirstLogonCommands>
client/tests/kvm/unattended/winxp32.sif +1 -1
index 3e59e6d..dc4ef29 100644
@@ -65,7 +65,7 @@
 
 [GuiRunOnce]
     Command0="cmd /c E:\setuprss.bat"
-    Command1="cmd /c A:\finish.exe 10.0.2.2"
+    Command1="cmd /c netsh interface ip set address local dhcp && ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2"
 
 [Display]
     Xresolution=1024
Signature · 1 line
1.6.6