KVM test: Parallel install of guest OS v3
PATCH 1/1 KVM test: Parallel install of guest OS v3
From: yogi <[email protected]>
The patch enables doing mulitple install of guest OS in parallel. Have added four more options to test_base.cfg, port redirection entry "guest_port_unattend_shell" for host to communicate with guest during installation, "pxe_dir", 'pxe_image' and 'pxe_initrd" to specify locations for kernel and initrd. For parallel installation to work in unattended mode, the floppy image and pxe boot path also has to be unique for each quest.
All the relevant unattended post install steps for guests were changed, now they are server based codes.
Notes:
* Yogi, I am going to remove the SLES patch, and will wait for
you to send a new patchset with both the SLES files and the opensuse ones, OK? Thanks.
Changes from v2:
* According to Michael Goldish comments, handled a possible
socket.error exception that could be generated during the unattended install test
* Modified the floppy image names to be contained inside
the same directory that might hold the tftp root for each OS, making the needed changes on unattended.py.
* Added floppy names for windows based OSs, which were lacking
on previous patches.
Changes from v1:
* Fixed the logic for the new unattended install test (original
implementation would hang indefinitely if guest dies in the middle of the install).
* Fixed the config changes to make sure the unattended install
port actually gets redirected so the test can work, also made the config specific to unattended install
* Merged the finish.exe patch, including a binary patch that
changes the binary shipped to the new version
* Changed all unattended install files to use the parallel
mechanism
Tested with Windows 7 and Fedora 11 guests. I (lmr) am going to keep this in the queue for a bit so I can test it more in the internal test farm and everybody can take a look at the patch.
--- client/tests/kvm/deps/finish.cpp | 111 +++++++++++--------- client/tests/kvm/deps/finish.exe | Bin 26913 -> 26926 bytes client/tests/kvm/kvm_utils.py | 4 +- client/tests/kvm/scripts/unattended.py | 59 ++++++----- client/tests/kvm/tests/unattended_install.py | 45 ++++---- client/tests/kvm/tests_base.cfg.sample | 81 +++++++++++++-- client/tests/kvm/unattended/Fedora-10.ks | 12 +- client/tests/kvm/unattended/Fedora-11.ks | 11 +- client/tests/kvm/unattended/Fedora-12.ks | 11 +- client/tests/kvm/unattended/Fedora-8.ks | 11 +- client/tests/kvm/unattended/Fedora-9.ks | 11 +- client/tests/kvm/unattended/RHEL-3-series.ks | 12 +- client/tests/kvm/unattended/RHEL-4-series.ks | 11 +- client/tests/kvm/unattended/RHEL-5-series.ks | 11 +- 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 +- client/tests/kvm/unattended/winxp64.sif | 2 +- 25 files changed, 242 insertions(+), 170 deletions(-)
client/tests/kvm/deps/finish.cpp +59 -52
@@ -1,12 +1,13 @@ -// Simple app that only sends an ack string to the KVM unattended install -// watch code. +// Simple application that creates a server socket, listening for connections +// of the unattended install test. Once it gets a client connected, the +// app will send back an ACK string, indicating the install process is done. // // You must link this code with Ws2_32.lib, Mswsock.lib, and Advapi32.lib // // Author: Lucas Meneghel Rodrigues <[email protected]> // Code was adapted from an MSDN sample. -// Usage: finish.exe [Host OS IP] +// Usage: finish.exe // MinGW's ws2tcpip.h only defines getaddrinfo and other functions only for // the case _WIN32_WINNT >= 0x0501.
@@ -21,24 +22,18 @@ #include <stdlib.h> #include <stdio.h> -#define DEFAULT_BUFLEN 512 #define DEFAULT_PORT "12323" - int main(int argc, char **argv) { WSADATA wsaData; - SOCKET ConnectSocket = INVALID_SOCKET; - struct addrinfo *result = NULL, - *ptr = NULL, - hints; + SOCKET ListenSocket = INVALID_SOCKET, ClientSocket = INVALID_SOCKET; + struct addrinfo *result = NULL, hints; char *sendbuf = "done"; - char recvbuf[DEFAULT_BUFLEN]; - int iResult; - int recvbuflen = DEFAULT_BUFLEN; + int iResult, iSendResult; // Validate the parameters - if (argc != 2) { - printf("usage: %s server-name\n", argv[0]); + if (argc != 1) { + printf("usage: %s", argv[0]); return 1; }
@@ -49,72 +44,84 @@ int main(int argc, char **argv) return 1; } - ZeroMemory( &hints, sizeof(hints) ); - hints.ai_family = AF_UNSPEC; + ZeroMemory(&hints, sizeof(hints)); + hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; + hints.ai_flags = AI_PASSIVE; // Resolve the server address and port - iResult = getaddrinfo(argv[1], DEFAULT_PORT, &hints, &result); - if ( iResult != 0 ) { + iResult = getaddrinfo(NULL, DEFAULT_PORT, &hints, &result); + if (iResult != 0) { printf("getaddrinfo failed: %d\n", iResult); WSACleanup(); return 1; } - // Attempt to connect to an address until one succeeds - for(ptr=result; ptr != NULL ;ptr=ptr->ai_next) { - - // Create a SOCKET for connecting to server - ConnectSocket = socket(ptr->ai_family, ptr->ai_socktype, - ptr->ai_protocol); - if (ConnectSocket == INVALID_SOCKET) { - printf("Error at socket(): %ld\n", WSAGetLastError()); - freeaddrinfo(result); - WSACleanup(); - return 1; - } - - // Connect to server. - iResult = connect( ConnectSocket, ptr->ai_addr, (int)ptr->ai_addrlen); - if (iResult == SOCKET_ERROR) { - closesocket(ConnectSocket); - ConnectSocket = INVALID_SOCKET; - continue; - } - break; + // Create a SOCKET for connecting to server + ListenSocket = socket(result->ai_family, result->ai_socktype, + result->ai_protocol); + if (ListenSocket == INVALID_SOCKET) { + printf("socket failed: %ld\n", WSAGetLastError()); + freeaddrinfo(result); + WSACleanup(); + return 1; + } + + // Setup the TCP listening socket + iResult = bind(ListenSocket, result->ai_addr, (int)result->ai_addrlen); + if (iResult == SOCKET_ERROR) { + printf("bind failed: %d\n", WSAGetLastError()); + freeaddrinfo(result); + closesocket(ListenSocket); + WSACleanup(); + return 1; } freeaddrinfo(result); - if (ConnectSocket == INVALID_SOCKET) { - printf("Unable to connect to server!\n"); + iResult = listen(ListenSocket, SOMAXCONN); + if (iResult == SOCKET_ERROR) { + printf("listen failed: %d\n", WSAGetLastError()); + closesocket(ListenSocket); WSACleanup(); return 1; } - // Send the ACK buffer - iResult = send( ConnectSocket, sendbuf, (int)strlen(sendbuf), 0 ); - if (iResult == SOCKET_ERROR) { - printf("send failed: %d\n", WSAGetLastError()); - closesocket(ConnectSocket); + // Accept a client socket + ClientSocket = accept(ListenSocket, NULL, NULL); + if (ClientSocket == INVALID_SOCKET) { + printf("accept failed: %d\n", WSAGetLastError()); + closesocket(ListenSocket); WSACleanup(); return 1; } - printf("Bytes Sent: %ld\n", iResult); + // No longer need the server socket + closesocket(ListenSocket); + + // Send the ack string to the client + iSendResult = send(ClientSocket, sendbuf, sizeof(sendbuf), 0); + if (iSendResult == SOCKET_ERROR) { + printf("send failed: %d\n", WSAGetLastError()); + closesocket(ClientSocket); + WSACleanup(); + return 1; + } + // Report the number of bytes sent + printf("Bytes sent: %d\n", iSendResult); - // shutdown the connection since no more data will be sent - iResult = shutdown(ConnectSocket, SD_SEND); + // Shutdown the connection since we're done + iResult = shutdown(ClientSocket, SD_SEND); if (iResult == SOCKET_ERROR) { printf("shutdown failed: %d\n", WSAGetLastError()); - closesocket(ConnectSocket); + closesocket(ClientSocket); WSACleanup(); return 1; } - // cleanup - closesocket(ConnectSocket); + // Cleanup + closesocket(ClientSocket); WSACleanup(); return 0;
client/tests/kvm/deps/finish.exe binary +0 -0
client/tests/kvm/kvm_utils.py +2 -2
@@ -635,7 +635,7 @@ def is_port_free(port): def find_free_port(start_port, end_port): """ - Return a free port in the range [start_port, end_port). + Return a host free port in the range [start_port, end_port]. @param start_port: First port that will be checked. @param end_port: Port immediately after the last one that will be checked.
@@ -648,7 +648,7 @@ def find_free_port(start_port, end_port): def find_free_ports(start_port, end_port, count): """ - Return count free ports in the range [start_port, end_port). + Return count of host free ports in the range [start_port, end_port]. @count: Initial number of ports known to be free in the range. @param start_port: First port that will be checked.
client/tests/kvm/scripts/unattended.py +33 -26
104 lines not on this page · raw message
client/tests/kvm/tests/unattended_install.py +23 -22
57 lines not on this page · raw message
client/tests/kvm/tests_base.cfg.sample +72 -9
323 lines not on this page · raw message
client/tests/kvm/unattended/Fedora-10.ks +6 -6
@@ -28,10 +28,10 @@ os.system('dhclient') os.system('chkconfig sshd on') os.system('iptables -F') os.system('echo 0 > /selinux/enforce') -port = 12323 -buf = 1024 -addr = ('10.0.2.2', port) -client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -client.connect(addr) -client.sendto('done', addr) +server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server.bind(('', 12323)) +server.listen(1) +(client, addr) = server.accept() +client.send("done") client.close() +
client/tests/kvm/unattended/Fedora-11.ks +5 -6
@@ -28,11 +28,10 @@ os.system('dhclient') os.system('chkconfig sshd on') os.system('iptables -F') os.system('echo 0 > /selinux/enforce') -port = 12323 -buf = 1024 -addr = ('10.0.2.2', port) -client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -client.connect(addr) -client.sendto('done', addr) +server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server.bind(('', 12323)) +server.listen(1) +(client, addr) = server.accept() +client.send("done") client.close() %end
client/tests/kvm/unattended/Fedora-12.ks +5 -6
@@ -28,11 +28,10 @@ os.system('dhclient') os.system('chkconfig sshd on') os.system('iptables -F') os.system('echo 0 > /selinux/enforce') -port = 12323 -buf = 1024 -addr = ('10.0.2.2', port) -client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -client.connect(addr) -client.sendto('done', addr) +server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server.bind(('', 12323)) +server.listen(1) +(client, addr) = server.accept() +client.send("done") client.close() %end
client/tests/kvm/unattended/Fedora-8.ks +5 -6
@@ -28,10 +28,9 @@ os.system('dhclient') os.system('chkconfig sshd on') os.system('iptables -F') os.system('echo 0 > /selinux/enforce') -port = 12323 -buf = 1024 -addr = ('10.0.2.2', port) -client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -client.connect(addr) -client.sendto('done', addr) +server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server.bind(('', 12323)) +server.listen(1) +(client, addr) = server.accept() +client.send("done") client.close()
client/tests/kvm/unattended/Fedora-9.ks +5 -6
@@ -28,10 +28,9 @@ os.system('dhclient') os.system('chkconfig sshd on') os.system('iptables -F') os.system('echo 0 > /selinux/enforce') -port = 12323 -buf = 1024 -addr = ('10.0.2.2', port) -client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -client.connect(addr) -client.sendto('done', addr) +server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server.bind(('', 12323)) +server.listen(1) +(client, addr) = server.accept() +client.send("done") client.close()
client/tests/kvm/unattended/RHEL-3-series.ks +6 -6
@@ -27,10 +27,10 @@ import socket, os os.system('dhclient') os.system('chkconfig sshd on') os.system('iptables -F') -port = 12323 -buf = 1024 -addr = ('10.0.2.2', port) -client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -client.connect(addr) -client.sendto('done', addr) +os.system('echo 0 > /selinux/enforce') +server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server.bind(('', 12323)) +server.listen(1) +(client, addr) = server.accept() +client.send("done") client.close()
client/tests/kvm/unattended/RHEL-4-series.ks +5 -6
@@ -28,10 +28,9 @@ os.system('dhclient') os.system('chkconfig sshd on') os.system('iptables -F') os.system('echo 0 > /selinux/enforce') -port = 12323 -buf = 1024 -addr = ('10.0.2.2', port) -client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -client.connect(addr) -client.sendto('done', addr) +server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server.bind(('', 12323)) +server.listen(1) +(client, addr) = server.accept() +client.send("done") client.close()
client/tests/kvm/unattended/RHEL-5-series.ks +5 -6
@@ -28,10 +28,9 @@ os.system('dhclient') os.system('chkconfig sshd on') os.system('iptables -F') os.system('echo 0 > /selinux/enforce') -port = 12323 -buf = 1024 -addr = ('10.0.2.2', port) -client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -client.connect(addr) -client.sendto('done', addr) +server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server.bind(('', 12323)) +server.listen(1) +(client, addr) = server.accept() +client.send("done") client.close()
client/tests/kvm/unattended/win2003-32.sif +1 -1
@@ -61,4 +61,4 @@ 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" + Command5="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe"
client/tests/kvm/unattended/win2003-64.sif +1 -1
@@ -61,4 +61,4 @@ 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" + Command5="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe"
client/tests/kvm/unattended/win2008-32-autounattend.xml +1 -1
@@ -140,7 +140,7 @@ </SynchronousCommand> <SynchronousCommand wcm:action="add"> <Order>7</Order> - <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2</CommandLine> + <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe</CommandLine> </SynchronousCommand> </FirstLogonCommands> <OOBE>
client/tests/kvm/unattended/win2008-64-autounattend.xml +1 -1
@@ -149,7 +149,7 @@ </SynchronousCommand> <SynchronousCommand wcm:action="add"> <Order>7</Order> - <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2</CommandLine> + <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe</CommandLine> </SynchronousCommand> </FirstLogonCommands> <OOBE>
client/tests/kvm/unattended/win2008-r2-autounattend.xml +1 -1
@@ -149,7 +149,7 @@ </SynchronousCommand> <SynchronousCommand wcm:action="add"> <Order>7</Order> - <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2</CommandLine> + <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe</CommandLine> </SynchronousCommand> </FirstLogonCommands> <OOBE>
client/tests/kvm/unattended/win7-32-autounattend.xml +1 -1
@@ -146,7 +146,7 @@ <Order>6</Order> </SynchronousCommand> <SynchronousCommand wcm:action="add"> - <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2</CommandLine> + <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe</CommandLine> <Order>7</Order> </SynchronousCommand> </FirstLogonCommands>
client/tests/kvm/unattended/win7-64-autounattend.xml +1 -1
@@ -146,7 +146,7 @@ <Order>6</Order> </SynchronousCommand> <SynchronousCommand wcm:action="add"> - <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2</CommandLine> + <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe</CommandLine> <Order>7</Order> </SynchronousCommand> </FirstLogonCommands>
client/tests/kvm/unattended/winvista-32-autounattend.xml +1 -1
@@ -147,7 +147,7 @@ </SynchronousCommand> <SynchronousCommand wcm:action="add"> <Order>7</Order> - <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2</CommandLine> + <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe</CommandLine> </SynchronousCommand> </FirstLogonCommands> </component>
client/tests/kvm/unattended/winvista-64-autounattend.xml +1 -1
@@ -148,7 +148,7 @@ </SynchronousCommand> <SynchronousCommand wcm:action="add"> <Order>7</Order> - <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2</CommandLine> + <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe</CommandLine> </SynchronousCommand> </FirstLogonCommands> </component>
client/tests/kvm/unattended/winxp32.sif +1 -1
@@ -70,4 +70,4 @@ [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" + Command2="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe"
client/tests/kvm/unattended/winxp64.sif +1 -1
@@ -70,4 +70,4 @@ [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" + Command2="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe"
Signature · 1 line
1.6.6.1
FYI, patch applied, see:
http://autotest.kernel.org/changeset/4309
Quoted 1,207 lines · Lucas Meneghel Rodrigues
From: yogi <[email protected]>
The patch enables doing mulitple install of guest OS in parallel. Have added four more options to test_base.cfg, port redirection entry "
guest_port_unattend_shell" for host to communicate with guest during installation, "pxe_dir", 'pxe_image' and 'pxe_initrd" to specify locations for kernel and initrd. For parallel installation to work in unattended mode, the floppy image and pxe boot path also has to be unique for each quest.All the relevant unattended post install steps for guests were changed, now they are server based codes.
Notes:
* Yogi, I am going to remove the SLES patch, and will wait for you to send a new patchset with both the SLES files and the opensuse ones, OK? Thanks.Changes from v2:
* According to Michael Goldish comments, handled a possible socket.error exception that could be generated during the unattended install test
* Modified the floppy image names to be contained inside the same directory that might hold the tftp root for each OS, making the needed changes onunattended.py.
* Added floppy names for windows based OSs, which were lacking on previous patches.Changes from v1:
* Fixed the logic for the new unattended install test (original implementation would hang indefinitely if guest dies in the middle of the install).
* Fixed the config changes to make sure the unattended install port actually gets redirected so the test can work, also made the config specific to unattended install
* Merged the finish.exe patch, including a binary patch that changes the binary shipped to the new version
* Changed all unattended install files to use the parallel mechanismTested with Windows 7 and Fedora 11 guests. I (lmr) am going to keep this in the queue for a bit so I can test it more in the internal test farm and everybody can take a look at the patch.
Signed-off-by Yogananth Subramanian <[email protected]>Signed-off-by Lucas Meneghel Rodrigues <[email protected]>---
client/tests/kvm/deps/finish.cpp | 111 +++++++++++--------- client/tests/kvm/deps/finish.exe | Bin 26913 -> 26926 bytesclient/tests/kvm/kvm_utils.py| 4 +-client/tests/kvm/scripts/unattended.py| 59 ++++++-----client/tests/kvm/tests/unattended_install.py| 45 ++++---- client/tests/kvm/tests_base.cfg.sample | 81 +++++++++++++--client/tests/kvm/unattended/Fedora-10.ks | 12 +- client/tests/kvm/unattended/Fedora-11.ks | 11 +- client/tests/kvm/unattended/Fedora-12.ks | 11 +- client/tests/kvm/unattended/Fedora-8.ks | 11 +- client/tests/kvm/unattended/Fedora-9.ks | 11 +- client/tests/kvm/unattended/RHEL-3-series.ks | 12 +- client/tests/kvm/unattended/RHEL-4-series.ks | 11 +- client/tests/kvm/unattended/RHEL-5-series.ks | 11 +- 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 +- client/tests/kvm/unattended/winxp64.sif | 2 +-25 files changed, 242 insertions(+), 170 deletions(-)client/tests/kvm/deps/finish.cpp +59
-52@@ -1,12 +1,13 @@ -// Simple app that only sends an ack string to the KVM unattended install -// watch code. +// Simple application that creates a server socket, listening for connections +// of the unattended install test. Once it gets a client connected, the +// app will send back an ACK string, indicating the install process is done. // // You must link this code with Ws2_32.lib, Mswsock.lib, and Advapi32.lib // // Author: Lucas Meneghel Rodrigues <[email protected]> // Code was adapted from an MSDN sample. -// Usage: finish.exe [Host OS IP] +// Usage: finish.exe // MinGW's ws2tcpip.h only defines getaddrinfo and other functions only for // the case _WIN32_WINNT >= 0x0501.@@ -21,24 +22,18 @@ #include <stdlib.h> #include <stdio.h> -#define DEFAULT_BUFLEN 512 #define DEFAULT_PORT "12323" - int main(int argc, char **argv) { WSADATA wsaData; - SOCKET ConnectSocket = INVALID_SOCKET; - struct addrinfo *result = NULL, - *ptr = NULL, - hints; + SOCKET ListenSocket = INVALID_SOCKET, ClientSocket = INVALID_SOCKET; + struct addrinfo *result = NULL, hints; char *sendbuf = "done"; - char recvbuf[DEFAULT_BUFLEN]; - int iResult; - int recvbuflen = DEFAULT_BUFLEN; + int iResult, iSendResult; // Validate the parameters - if (argc != 2) { - printf("usage: %s server-name\n", argv[0]); + if (argc != 1) { + printf("usage: %s", argv[0]); return 1; }@@ -49,72 +44,84 @@ int main(int argc, char **argv) return 1; } - ZeroMemory( &hints, sizeof(hints) ); - hints.ai_family = AF_UNSPEC; + ZeroMemory(&hints, sizeof(hints)); + hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; + hints.ai_flags = AI_PASSIVE; // Resolve the server address and port - iResult = getaddrinfo(argv[1], DEFAULT_PORT, &hints, &result); - if ( iResult != 0 ) { + iResult = getaddrinfo(NULL, DEFAULT_PORT, &hints, &result); + if (iResult != 0) { printf("getaddrinfo failed: %d\n", iResult); WSACleanup(); return 1; } - // Attempt to connect to an address until one succeeds - for(ptr=result; ptr != NULL ;ptr=ptr->ai_next) { - - // Create a SOCKET for connecting to server - ConnectSocket = socket(ptr->ai_family, ptr->ai_socktype, - ptr->ai_protocol); - if (ConnectSocket == INVALID_SOCKET) { - printf("Error at socket(): %ld\n", WSAGetLastError()); - freeaddrinfo(result); - WSACleanup(); - return 1; - } - - // Connect to server. - iResult = connect( ConnectSocket, ptr->ai_addr, (int)ptr->ai_addrlen); - if (iResult == SOCKET_ERROR) { - closesocket(ConnectSocket); - ConnectSocket = INVALID_SOCKET; - continue; - } - break; + // Create a SOCKET for connecting to server + ListenSocket = socket(result->ai_family, result->ai_socktype, + result->ai_protocol); + if (ListenSocket == INVALID_SOCKET) { + printf("socket failed: %ld\n", WSAGetLastError()); + freeaddrinfo(result); + WSACleanup(); + return 1; + } + + // Setup the TCP listening socket + iResult = bind(ListenSocket, result->ai_addr, (int)result->ai_addrlen); + if (iResult == SOCKET_ERROR) { + printf("bind failed: %d\n", WSAGetLastError()); + freeaddrinfo(result); + closesocket(ListenSocket); + WSACleanup(); + return 1; } freeaddrinfo(result); - if (ConnectSocket == INVALID_SOCKET) { - printf("Unable to connect to server!\n"); + iResult = listen(ListenSocket, SOMAXCONN); + if (iResult == SOCKET_ERROR) { + printf("listen failed: %d\n", WSAGetLastError()); + closesocket(ListenSocket); WSACleanup(); return 1; } - // Send the ACK buffer - iResult = send( ConnectSocket, sendbuf, (int)strlen(sendbuf), 0 ); - if (iResult == SOCKET_ERROR) { - printf("send failed: %d\n", WSAGetLastError()); - closesocket(ConnectSocket); + // Accept a client socket + ClientSocket = accept(ListenSocket, NULL, NULL); + if (ClientSocket == INVALID_SOCKET) { + printf("accept failed: %d\n", WSAGetLastError()); + closesocket(ListenSocket); WSACleanup(); return 1; } - printf("Bytes Sent: %ld\n", iResult); + // No longer need the server socket + closesocket(ListenSocket); + + // Send the ack string to the client + iSendResult = send(ClientSocket, sendbuf, sizeof(sendbuf), 0); + if (iSendResult == SOCKET_ERROR) { + printf("send failed: %d\n", WSAGetLastError()); + closesocket(ClientSocket); + WSACleanup(); + return 1; + } + // Report the number of bytes sent + printf("Bytes sent: %d\n", iSendResult); - // shutdown the connection since no more data will be sent - iResult = shutdown(ConnectSocket, SD_SEND); + // Shutdown the connection since we're done + iResult = shutdown(ClientSocket, SD_SEND); if (iResult == SOCKET_ERROR) { printf("shutdown failed: %d\n", WSAGetLastError()); - closesocket(ConnectSocket); + closesocket(ClientSocket); WSACleanup(); return 1; } - // cleanup - closesocket(ConnectSocket); + // Cleanup + closesocket(ClientSocket); WSACleanup(); return 0;client/tests/kvm/deps/finish.exe binary +0
-0client/tests/kvm/kvm_utils.py +0
-0@@ -635,7 +635,7 @@ def is_port_free(port):def
find_free_port(start_port, end_port):
"""
- Return a free port in the range [start_port,end_port).
+ Return a host free port in the range [start_port,end_port].@param
start_port: First port that will be checked.
@paramend_port: Port immediately after the last one that will be checked.client/tests/kvm/kvm_utils.py +0
-0@@ -648,7 +648,7 @@ def find_free_port(start_port, end_port):def
find_free_ports(start_port, end_port, count):
"""
- Return count free ports in the range [start_port,end_port).
+ Return count of host free ports in the range [start_port,end_port].@count: Initial number of ports known to be free in the range. @param
start_port: First port that will be checked.client/tests/kvm/scripts/unattended.py +2
-2@@ -31,35 +31,34 @@ class UnattendedInstall(object): self.deps_dir = os.path.join(kvm_test_dir, 'deps') self.unattended_dir = os.path.join(kvm_test_dir, 'unattended') - try: - tftp_root = os.environ['KVM_TEST_tftp'] + tftp_root = os.environ.get('KVM_TEST_tftp', '') + if tftp_root: self.tftp_root = os.path.join(kvm_test_dir, tftp_root)if not
os.path.isdir(self.tftp_root):
os.makedirs(self.tftp_root)
- except KeyError:
- self.tftp_root = ''client/tests/kvm/scripts/unattended.py +7
-14- - try: - self.kernel_args = os.environ['KVM_TEST_kernel_args'] - except KeyError: - self.kernel_args = '' - - try: - self.finish_program= os.environ['KVM_TEST_finish_program'] - except: - self.finish_program = None - + else: + self.tftp_root = tftp_root - cdrom_iso = os.environ['KVM_TEST_cdrom'] - self.unattended_file = os.environ['KVM_TEST_unattended_file'] + self.kernel_args = os.environ.get('KVM_TEST_kernel_args', '') + self.finish_program= os.environ.get('KVM_TEST_finish_program', '') + cdrom_iso = os.environ.get('KVM_TEST_cdrom') + self.unattended_file = os.environ.get('KVM_TEST_unattended_file') - self.qemu_img_bin = os.environ['KVM_TEST_qemu_img_binary'] + self.qemu_img_bin = os.environ.get('KVM_TEST_qemu_img_binary')if not
os.path.isabs(self.qemu_img_bin):
self.qemu_img_bin =os.path.join(kvm_test_dir, self.qemu_img_bin)self.cdrom_iso =os.path.join(kvm_test_dir, cdrom_iso)self.floppy_mount =tempfile.mkdtemp(prefix='floppy_', dir='/tmp')self.cdrom_mount =tempfile.mkdtemp(prefix='cdrom_', dir='/tmp')
- self.floppy_img =os.path.join(images_dir, 'floppy.img')
+ flopy_name = os.environ['KVM_TEST_floppy']
+ self.floppy_img =os.path.join(kvm_test_dir, flopy_name)
+ floppy_dir =os.path.dirname(self.floppy_img)
+ if notos.path.isdir(floppy_dir):
+ os.makedirs(floppy_dir)
+
+ self.pxe_dir =os.environ.get('KVM_TEST_pxe_dir', '')
+ self.pxe_image =os.environ.get('KVM_TEST_pxe_image', '')
+ self.pxe_initrd =os.environ.get('KVM_TEST_pxe_initrd', '')def
create_boot_floppy(self):client/tests/kvm/scripts/unattended.py +0
-0@@ -94,9 +93,15 @@ class UnattendedInstall(object): setup_file_dest = os.path.join(self.floppy_mount, setup_file) shutil.copyfile(setup_file_path, setup_file_dest)elif
self.unattended_file.endswith('.ks'):
+ # Red Hat kickstart installdest_fname= 'ks.cfg'
elifself.unattended_file.endswith('.xml'):
- dest_fname = "autounattend.xml"
+ if self.tftp_root is '':
+ # Windows unattended install
+ dest_fname = "autounattend.xml"
+ else:
+ # SUSE autoyast install
+ dest_fname = "autoinst.xml"dest =
os.path.join(self.floppy_mount, dest_fname)client/tests/kvm/scripts/unattended.py +0
-0@@ -166,21 +171,20 @@ class UnattendedInstall(object):raise
SetupError('Could not mount CD image %s.' % self.cdrom_iso)- p =
os.path.join('images', 'pxeboot')
- pxe_dir =os.path.join(self.cdrom_mount, p)
- pxe_image =os.path.join(pxe_dir, 'vmlinuz')
- pxe_initrd =os.path.join(pxe_dir, 'initrd.img')
+ pxe_dir =os.path.join(self.cdrom_mount, self.pxe_dir)
+ pxe_image =os.path.join(pxe_dir, self.pxe_image)
+ pxe_initrd =os.path.join(pxe_dir, self.pxe_initrd)if not
os.path.isdir(pxe_dir):
raise SetupError('The ISO image does not have a %s dir. The ' 'script assumes that the cd has a %s dir ' 'where to search for the vmlinuz image.' %
- (p, p))
+ (self.pxe_dir, self.pxe_dir))if not
os.path.isfile(pxe_image)or notos.path.isfile(pxe_initrd):
raise SetupError('The location %s is lacking either a vmlinuz ' 'or a initrd.img file. Cannot find a PXE '
- 'image to proceed.' %pxe_dir)
+ 'image to proceed.' % self.pxe_dir)
tftp_image=os.path.join(self.tftp_root, 'vmlinuz')tftp_initrd=os.path.join(self.tftp_root, 'initrd.img')client/tests/kvm/scripts/unattended.py +3
-0@@ -239,6 +243,9 @@ class UnattendedInstall(object): print " floppy_mount: " + str(self.floppy_mount) print " floppy_img: " + str(self.floppy_img) print " finish_program: " + str(self.finish_program) + print " pxe_dir: " + str(self.pxe_dir) + print " pxe_image: " + str(self.pxe_image) + print " pxe_initrd: " + str(self.pxe_initrd) self.create_boot_floppy()if self.tftp_root:
client/tests/kvm/tests/unattended_install.py +0
-0@@ -13,34 +13,35 @@ def run_unattended_install(test, params, env):@param params: Dictionary with the test parameters. @param env: Dictionary with test environment.
"""
+ buf = 1024
vm =kvm_test_utils.get_living_vm(env, params.get("main_vm"))- server =
socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- server.bind(('', 12323))
- server.listen(1)
+ port = vm.get_port(int(params.get("guest_port_unattended_install")))
+ addr = ('localhost', port)
install_timeout=float(params.get("timeout", 3000))logging.info("Starting unattended install watch process. " "Timeout set to %ds (%d min)",install_timeout, install_timeout/60)
start_time=time.time()
-
- while True:
- server.settimeout(install_timeout)
+ time_elapsed = 0
+ whiletime_elapsed<install_timeout:
+ client =socket.socket(socket.AF_INET, socket.SOCK_STREAM)try:
- (client, addr) =server.accept()
- except socket.timeout:
- server.close()
- raise error.TestFail('Timeout elapsed while waiting for install to '
- 'finish.')
- msg =client.recv(1024)
- logging.debug("Received '%s' from %s", msg, addr)
- if msg == 'done':
- end_time =time.time()
- time_elapsed =int(end_time - start_time)
- logging.info('Guest reported successful installation after %ds '
- '(%d min)',time_elapsed, time_elapsed/60)
- server.close()
- break
- else:
- logging.error('Got invalid string from client: %s.' % msg)
+ client.connect(addr)
+ msg =client.recv(1024)
+ if msg == 'done':
+ break
+ except socket.error:
+ pass
+ time.sleep(1)
+ client.close()
+ end_time =time.time()
+ time_elapsed =int(end_time - start_time)client/tests/kvm/tests/unattended_install.py +7
-0+ + if time_elapsed < install_timeout: + logging.info('Guest reported successful installation after %ds ' + '(%d min)', time_elapsed, time_elapsed/60) + else: + raise error.TestFail('Timeout elapsed while waiting for install to ' + 'finish.')client/tests/kvm/tests_base.cfg.sample +0
-0@@ -70,6 +70,8 @@ variants:floppy = "images/floppy.img"
extra_params+= " -boot d"
nic_mode= user
+ redirs += "unattended_install"
+ guest_port_unattended_install = 12323- boot: install setup
unattended_installtype = bootclient/tests/kvm/tests_base.cfg.sample +0
-0@@ -337,6 +339,9 @@ variants:no setup
shell_prompt= "^\[.*\][\#\$]\s*$"unattended_install:
+ pxe_dir = "images/pxeboot"
+ pxe_image = "vmlinuz"
+ pxe_initrd = "initrd.img"
tftp = "images/tftpboot"extra_params+= " -bootp /pxelinux.0 -boot n"kernel_args= "ks=floppy nicdelay=60"client/tests/kvm/tests_base.cfg.sample +0
-0@@ -352,10 +357,12 @@ variants:steps = Fedora-8-i386.steps
unattended_install:
unattended_file= unattended/Fedora-8.ks
+ tftp = images/f8-32/tftpboot
+ floppy = images/f8-32/floppy.img- 8.64:
no setup
- image_name = fc8-64
+ image_name = f8-64
cdrom = linux/Fedora-8-x86_64-DVD.iso md5sum =2cb231a86709dec413425fd2f8bf5295md5sum_1m=145f6414e19492649a56c89f0a45e719client/tests/kvm/tests_base.cfg.sample +0
-0@@ -363,9 +370,11 @@ variants:steps = Fedora-8-64.steps
unattended_install:
unattended_file= unattended/Fedora-8.ks
+ tftp = images/f8-64/tftpboot
+ floppy = images/f8-64/floppy.img- 9.32:
- image_name = fc9-32
+ image_name = f9-32
cdrom = linux/Fedora-9-i386-DVD.iso md5sum =72601f685ea8c808c303353d8bf4d307md5sum_1m=f24fa25689e5863f1b99984c6feb787fclient/tests/kvm/tests_base.cfg.sample +0
-0@@ -373,9 +382,11 @@ variants:steps = Fedora-9-i386.steps
unattended_install:
unattended_file= unattended/Fedora-9.ks
+ tftp = images/f9-32/tftpboot
+ floppy = images/f9-32/floppy.img- 9.64:
- image_name = fc9-64
+ image_name = f9-64
cdrom = linux/Fedora-9-x86_64-DVD.iso md5sum =05b2ebeed273ec54d6f9ed3d61ea4c96md5sum_1m=9822ab5097e37e8fe306ef2192727db4client/tests/kvm/tests_base.cfg.sample +0
-0@@ -383,25 +394,31 @@ variants:steps = Fedora-9-64.steps
unattended_install:
unattended_file= unattended/Fedora-9.ks
+ tftp = images/f9-64/tftpboot
+ floppy = images/f9-64/floppy.img- 10.32:
- image_name = fc10-32
+ image_name = f10-32
cdrom = linux/Fedora-10-i386-DVD.iso md5sum =27e581edb392728c4a07d00d3fc5ced0md5sum_1m=bd67c68bdf595e4ba7131ec702159181unattended_install:
unattended_file= unattended/Fedora-10.ks
+ tftp = images/f10-32/tftpboot
+ floppy = images/f10-32/floppy.img- 10.64:
- image_name = fc10-64
+ image_name = f10-64
cdrom = linux/Fedora-10-x86_64-DVD.iso sha1sum =f1e5ae7db6a1ba227de7294c4112385922388648md5sum_1m=732857cbf40c80c34683e874601d982cunattended_install:
unattended_file= unattended/Fedora-10.ks
+ tftp = images/f10-64/tftpboot
+ floppy = images/f10-64/floppy.img- 11.32:
- image_name = fc11-32
+ image_name = f11-32
cdrom = linux/Fedora-11-i386-DVD.iso md5sum =e3b1e2d1ba42aa4705fa5f41771b3927md5sum_1m=dc8ddf90648c247339c721395aa49714client/tests/kvm/tests_base.cfg.sample +0
-0@@ -409,30 +426,38 @@ variants:steps = Fedora-11-32.steps
unattended_install:
unattended_file= unattended/Fedora-11.ks
+ tftp = images/f11-32/tftpboot
+ floppy = images/f11-32/floppy.img- 11.64:
- image_name = fc11-64
+ image_name = f11-64
cdrom = linux/Fedora-11-x86_64-DVD.iso md5sum =9d419844adeb93120215fe7505c9bce8md5sum_1m=405ee05e2387a2e4328b008d5bcbdd1eunattended_install:
unattended_file= unattended/Fedora-11.ks
+ tftp = images/f11-64/tftpboot
+ floppy = images/f11-64/floppy.img- 12.32:
- image_name = fc12-32
+ image_name = f12-32
cdrom = linux/Fedora-12-i386-DVD.iso md5sum =2c4c1c0d09f2fbcfd8ee6a0c5542eeb2md5sum_1m=eee935d7f0cf2ef03f6ddce3a2a50050unattended_install:
unattended_file= unattended/Fedora-12.ks
+ tftp = images/f12-32/tftpboot
+ floppy = images/f12-32/floppy.img- 12.64:
- image_name = fc12-64
+ image_name = f12-64
cdrom = linux/Fedora-12-x86_64-DVD.iso md5sum =6dd31e292cc2eb1140544e9b1ba61c56md5sum_1m=514efbd7698b55ff6768c8605438bfc5unattended_install:
unattended_file= unattended/Fedora-12.ks
+ tftp = images/f12-64/tftpboot
+ floppy = images/f12-64/floppy.img- DSL-4.2.5:
no setup dbench bonnielinux_s3client/tests/kvm/tests_base.cfg.sample +0
-0@@ -517,6 +542,9 @@ variants:
block_hotplug:
modprobe_module= acpiphpunattended_install:
+ pxe_dir = "images/pxeboot"
+ pxe_image = "vmlinuz"
+ pxe_initrd = "initrd.img"
tftp = "images/tftpboot"extra_params+= " -bootp /pxelinux.0 -boot n"kernel_args= "ks=floppy nicdelay=60"client/tests/kvm/tests_base.cfg.sample +0
-0@@ -533,6 +561,8 @@ variants:steps=RHEL-3.9-i386.steps
unattended_install:
unattended_file= unattended/RHEL-3-series.ks
+ tftp = images/rhel39-32/tftpboot
+ floppy = images/rhel39-32/floppy.img- 3.9.x86_64:
no setup autotestlinux_s3client/tests/kvm/tests_base.cfg.sample +0
-0@@ -545,6 +575,8 @@ variants:steps=RHEL-3.9-x86_64.steps
unattended_install:
unattended_file= unattended/RHEL-3-series.ks
+ tftp = images/rhel39-64/tftpboot
+ floppy = images/rhel39-64/floppy.img- 4.7.i386:
no setup autotestclient/tests/kvm/tests_base.cfg.sample +0
-0@@ -556,6 +588,8 @@ variants:steps=RHEL-4.7-i386.steps
unattended_install:
unattended_file= unattended/RHEL-4-series.ks
+ tftp = images/rhel47-32/tftpboot
+ floppy = images/rhel47-32/floppy.img- 4.7.x86_64:
no setup autotestclient/tests/kvm/tests_base.cfg.sample +0
-0@@ -567,6 +601,8 @@ variants:steps=RHEL-4.7-x86_64.steps
unattended_install:
unattended_file= unattended/RHEL-4-series.ks
+ tftp = images/rhel47-64/tftpboot
+ floppy = images/rhel47-64/floppy.img- 4.8.i386:
no setup autotestclient/tests/kvm/tests_base.cfg.sample +0
-0@@ -576,6 +612,8 @@ variants:
md5sum_1m=969c197402b9058f28a278c1f807d15bunattended_install:
unattended_file= unattended/RHEL-4-series.ks
+ tftp = images/rhel48-32/tftpboot
+ floppy = images/rhel48-32/floppy.img- 4.8.x86_64:
no setup autotestclient/tests/kvm/tests_base.cfg.sample +0
-0@@ -585,6 +623,8 @@ variants:
md5sum_1m=b11ac0ef7fd345ad712966972db63886unattended_install:
unattended_file= unattended/RHEL-4-series.ks
+ tftp = images/rhel48-64/tftpboot
+ floppy = images/rhel48-64/floppy.img- 5.3.i386:
no setupclient/tests/kvm/tests_base.cfg.sample +0
-0@@ -596,6 +636,8 @@ variants:steps=RHEL-5.3-i386.steps
unattended_install:
unattended_file= unattended/RHEL-5-series.ks
+ tftp = images/rhel53-32/tftpboot
+ floppy = images/rhel53-32/floppy.img- 5.3.x86_64:
no setupclient/tests/kvm/tests_base.cfg.sample +0
-0@@ -607,6 +649,8 @@ variants:steps=RHEL-5.3-x86_64.steps
unattended_install:
unattended_file= unattended/RHEL-5-series.ks
+ tftp = images/rhel53-64/tftpboot
+ floppy = images/rhel53-64/floppy.img- 5.4.i386:
no setupclient/tests/kvm/tests_base.cfg.sample +0
-0@@ -616,6 +660,8 @@ variants:
md5sum_1m=0dbeb8f58d213752d8c029e8601abfbbunattended_install:
unattended_file= unattended/RHEL-5-series.ks
+ tftp = images/rhel54-32/tftpboot
+ floppy = images/rhel54-32/floppy.img- 5.4.x86_64:
no setupclient/tests/kvm/tests_base.cfg.sample +0
-0@@ -625,6 +671,8 @@ variants:
md5sum_1m=3e74112003e88a966754849dbb8f5c3funattended_install:
unattended_file= unattended/RHEL-5-series.ks
+ tftp = images/rhel54-64/tftpboot
+ floppy = images/rhel54-64/floppy.img# Windows section
- @Windows:client/tests/kvm/tests_base.cfg.sample +0
-0@@ -728,6 +776,7 @@ variants:md5sum =
743450644b1d9fe97b3cf379e22dceb0md5sum_1m=b473bf75af2d1269fec8958cf0202bfdunattended_file= unattended/winxp32.sif
+ floppy = images/winXP-32/floppy.img- 64:
image_name+= -64client/tests/kvm/tests_base.cfg.sample +0
-0@@ -744,6 +793,7 @@ variants:md5sum =
8d3f007ec9c2060cec8a50ee7d7dc512md5sum_1m=e812363ff427effc512b7801ee70e513unattended_file= unattended/winxp64.sif
+ floppy = images/winXP-64/floppy.img- Win2003:
image_name= win2003client/tests/kvm/tests_base.cfg.sample +0
-0@@ -767,6 +817,7 @@ variants:md5sum =
03e921e9b4214773c21a39f5c3f42ef7md5sum_1m=37c2fdec15ac4ec16aa10fdfdb338aa3unattended_file= unattended/win2003-32.sif
+ floppy = images/win2003-32/floppy.img- 64:
image_name+= -64client/tests/kvm/tests_base.cfg.sample +0
-0@@ -783,6 +834,7 @@ variants:md5sum =
5703f87c9fd77d28c05ffadd3354dbbdmd5sum_1m=439393c384116aa09e08a0ad047dcea8unattended_file= unattended/win2003-64.sif
+ floppy = images/win2003-64/floppy.img- WinVista:
image_name= winvistaclient/tests/kvm/tests_base.cfg.sample +0
-0@@ -803,6 +855,7 @@ variants:md5sum =
1008f323d5170c8e614e52ccb85c0491md5sum_1m=c724e9695da483bc0fd59e426eaefc72unattended_file=unattended/winvista-32-autounattend.xml
+ floppy = images/winvista-sp1-32/floppy.img- 64sp1:
image_name+= sp1-64client/tests/kvm/tests_base.cfg.sample +0
-0@@ -818,6 +871,7 @@ variants:md5sum =
11e2010d857fffc47813295e6be6d58dmd5sum_1m=0947bcd5390546139e25f25217d6f165unattended_file=unattended/winvista-64-autounattend.xml
+ floppy = images/winvista-sp1-64/floppy.img- 32sp2:
image_name+= sp2-32client/tests/kvm/tests_base.cfg.sample +0
-0@@ -828,6 +882,7 @@ variants:sha1sum =
25ad9a776503e6a583bec07879dbcc5dfd20cd6esha1sum_1m=a2afa4cffdc1c362dbf9e62942337f4f875a22cfunattended_file=unattended/winvista-32-autounattend.xml
+ floppy = images/winvista-sp2-32/floppy.img- 64sp2:
image_name+= sp2-64client/tests/kvm/tests_base.cfg.sample +0
-0@@ -838,6 +893,7 @@ variants:sha1sum =
aaee3c04533899f9f8c4ae0c4250ef5fafbe29a3sha1sum_1m=1fd21bd3ce2a4de8856c7b8fe6fdf80260f6d1c7unattended_file=unattended/winvista-64-autounattend.xml
+ floppy = images/winvista-sp2-64/floppy.img- Win2008:
image_name= win2008client/tests/kvm/tests_base.cfg.sample +0
-0@@ -862,6 +918,7 @@ variants:md5sum=0bfca49f0164de0a8eba236ced47007d md5sum_1m=07d7f5006393f74dc76e6e2e943e2440
unattended_file=unattended/win2008-32-autounattend.xml
+ floppy = images/win2008-sp1-32/floppy.img- 64sp1:
image_name+= sp1-64client/tests/kvm/tests_base.cfg.sample +0
-0@@ -880,6 +937,7 @@ variants:md5sum=27c58cdb3d620f28c36333a5552f271c md5sum_1m=efdcc11d485a1ef9afa739cb8e0ca766
unattended_file=unattended/win2008-64-autounattend.xml
+ floppy = images/win2008-sp1-64/floppy.img- 32sp2:
image_name+= sp2-32client/tests/kvm/tests_base.cfg.sample +0
-0@@ -890,6 +948,7 @@ variants:sha1sum =
49d0d6917c1256fe81048d414fa473bbc76a8724sha1sum_1m=9662ff7ed715faa00407e4befc484ea52a92a9fbunattended_file=unattended/win2008-32-autounattend.xml
+ floppy = images/win2008-sp2-32/floppy.img- 64sp2:
image_name+= sp2-64client/tests/kvm/tests_base.cfg.sample +0
-0@@ -900,6 +959,7 @@ variants:sha1sum =
34c7d726c57b0f8b19ba3b40d1b4044c15fc2029sha1sum_1m=8fe08b03e3531906855a60a78020ac9577dff5baunattended_file=unattended/win2008-64-autounattend.xml
+ floppy = images/win2008-sp2-64/floppy.img- r2:
image_name+= -r2client/tests/kvm/tests_base.cfg.sample +0
-0@@ -910,6 +970,7 @@ variants:sha1sum =
ad855ea913aaec3f1d0e1833c1aef7a0de326b0asha1sum_1m=9194a3aabae25b36e5f73cad001314b2c8d07d14unattended_file=unattended/win2008-r2-autounattend.xml
+ floppy = images/win2008-r2-64/floppy.img- Win7:
image_name= win7client/tests/kvm/tests_base.cfg.sample +0
-0@@ -927,6 +988,7 @@ variants:sha1sum =
5395dc4b38f7bdb1e005ff414deedfdb16dbf610sha1sum_1m=9f9c3780aebeb28a9bf22188eed6bc15475dc9c5unattended_file=unattended/win7-32-autounattend.xml
+ floppy = images/win7-32/floppy.img- 64:
image_name+= -64client/tests/kvm/tests_base.cfg.sample +0
-0@@ -945,6 +1007,7 @@ variants:sha1sum =
326327cc2ff9f05379f5058c41be6bc5e004baa7sha1sum_1m=4a3903bd5157de54f0702e5263e0a683c5775515unattended_file=unattended/win7-64-autounattend.xml
+ floppy = images/win7-64/floppy.img# Unix/BSD section
client/tests/kvm/unattended/Fedora-10.ks +6
-6@@ -28,10 +28,10 @@ os.system('dhclient') os.system('chkconfig sshd on') os.system('iptables -F') os.system('echo 0 > /selinux/enforce') -port = 12323 -buf = 1024 -addr = ('10.0.2.2', port) -client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -client.connect(addr) -client.sendto('done', addr) +server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server.bind(('', 12323)) +server.listen(1) +(client, addr) = server.accept() +client.send("done") client.close() +client/tests/kvm/unattended/Fedora-11.ks +5
-6@@ -28,11 +28,10 @@ os.system('dhclient') os.system('chkconfig sshd on') os.system('iptables -F') os.system('echo 0 > /selinux/enforce') -port = 12323 -buf = 1024 -addr = ('10.0.2.2', port) -client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -client.connect(addr) -client.sendto('done', addr) +server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server.bind(('', 12323)) +server.listen(1) +(client, addr) = server.accept() +client.send("done") client.close()%end
client/tests/kvm/unattended/Fedora-12.ks +5
-6@@ -28,11 +28,10 @@ os.system('dhclient') os.system('chkconfig sshd on') os.system('iptables -F') os.system('echo 0 > /selinux/enforce') -port = 12323 -buf = 1024 -addr = ('10.0.2.2', port) -client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -client.connect(addr) -client.sendto('done', addr) +server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server.bind(('', 12323)) +server.listen(1) +(client, addr) = server.accept() +client.send("done") client.close()%end
client/tests/kvm/unattended/Fedora-8.ks +5
-6@@ -28,10 +28,9 @@ os.system('dhclient') os.system('chkconfig sshd on') os.system('iptables -F') os.system('echo 0 > /selinux/enforce') -port = 12323 -buf = 1024 -addr = ('10.0.2.2', port) -client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -client.connect(addr) -client.sendto('done', addr) +server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server.bind(('', 12323)) +server.listen(1) +(client, addr) = server.accept() +client.send("done") client.close()client/tests/kvm/unattended/Fedora-9.ks +5
-6@@ -28,10 +28,9 @@ os.system('dhclient') os.system('chkconfig sshd on') os.system('iptables -F') os.system('echo 0 > /selinux/enforce') -port = 12323 -buf = 1024 -addr = ('10.0.2.2', port) -client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -client.connect(addr) -client.sendto('done', addr) +server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server.bind(('', 12323)) +server.listen(1) +(client, addr) = server.accept() +client.send("done") client.close()client/tests/kvm/unattended/RHEL-3-series.ks +6
-6@@ -27,10 +27,10 @@ import socket, os os.system('dhclient') os.system('chkconfig sshd on') os.system('iptables -F') -port = 12323 -buf = 1024 -addr = ('10.0.2.2', port) -client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -client.connect(addr) -client.sendto('done', addr) +os.system('echo 0 > /selinux/enforce') +server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server.bind(('', 12323)) +server.listen(1) +(client, addr) = server.accept() +client.send("done") client.close()client/tests/kvm/unattended/RHEL-4-series.ks +5
-6@@ -28,10 +28,9 @@ os.system('dhclient') os.system('chkconfig sshd on') os.system('iptables -F') os.system('echo 0 > /selinux/enforce') -port = 12323 -buf = 1024 -addr = ('10.0.2.2', port) -client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -client.connect(addr) -client.sendto('done', addr) +server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server.bind(('', 12323)) +server.listen(1) +(client, addr) = server.accept() +client.send("done") client.close()client/tests/kvm/unattended/RHEL-5-series.ks +5
-6@@ -28,10 +28,9 @@ os.system('dhclient') os.system('chkconfig sshd on') os.system('iptables -F') os.system('echo 0 > /selinux/enforce') -port = 12323 -buf = 1024 -addr = ('10.0.2.2', port) -client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -client.connect(addr) -client.sendto('done', addr) +server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server.bind(('', 12323)) +server.listen(1) +(client, addr) = server.accept() +client.send("done") client.close()client/tests/kvm/unattended/win2003-32.sif +0
-0@@ -61,4 +61,4 @@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"
+ Command5="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe"client/tests/kvm/unattended/win2003-64.sif +0
-0@@ -61,4 +61,4 @@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"
+ Command5="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe"client/tests/kvm/unattended/win2008-32-autounattend.xml +0
-0@@ -140,7 +140,7 @@</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>7</Order>
- <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2</CommandLine>
+ <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe</CommandLine> </SynchronousCommand>
</FirstLogonCommands>
<OOBE>client/tests/kvm/unattended/win2008-64-autounattend.xml +0
-0@@ -149,7 +149,7 @@</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>7</Order>
- <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2</CommandLine>
+ <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe</CommandLine> </SynchronousCommand>
</FirstLogonCommands>
<OOBE>client/tests/kvm/unattended/win2008-r2-autounattend.xml +0
-0@@ -149,7 +149,7 @@</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>7</Order>
- <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2</CommandLine>
+ <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe</CommandLine> </SynchronousCommand>
</FirstLogonCommands>
<OOBE>client/tests/kvm/unattended/win7-32-autounattend.xml +0
-0@@ -146,7 +146,7 @@<Order>6</Order>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
- <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2</CommandLine>
+ <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe</CommandLine> <Order>7</Order>
</SynchronousCommand>
</FirstLogonCommands>client/tests/kvm/unattended/win7-64-autounattend.xml +0
-0@@ -146,7 +146,7 @@<Order>6</Order>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
- <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2</CommandLine>
+ <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe</CommandLine> <Order>7</Order>
</SynchronousCommand>
</FirstLogonCommands>client/tests/kvm/unattended/winvista-32-autounattend.xml +0
-0@@ -147,7 +147,7 @@</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>7</Order>
- <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2</CommandLine>
+ <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe</CommandLine> </SynchronousCommand>
</FirstLogonCommands>
</component>client/tests/kvm/unattended/winvista-64-autounattend.xml +0
-0@@ -148,7 +148,7 @@</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>7</Order>
- <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe 10.0.2.2</CommandLine>
+ <CommandLine>%WINDIR%\System32\cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe</CommandLine> </SynchronousCommand>
</FirstLogonCommands>
</component>client/tests/kvm/unattended/winxp32.sif +0
-0@@ -70,4 +70,4 @@[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"
+ Command2="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe"client/tests/kvm/unattended/winxp64.sif +0
-0@@ -70,4 +70,4 @@[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"
+ Command2="cmd /c ping 10.0.2.2 -n 20 && A:\finish.exe" --
1.6.6.1--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Lucas