You've built your base server and are about to take an image of it. If only there were some way to know whether the RackConnect portion of the build process would succeed before you spent the time necessary to create the image...
Don't worry; we've got you covered. Use the RackConnect Image Validation Scripts.
The RackConnect Image Validation Scripts are a pair of scripts - one for Windows Servers, one for Linux Servers - that look for signs of the most common issues that cause RackConnect automation to fail. They are designed to be run on a Cloud Server that will be used as a template for creating other servers. They won't necessarily find all possible issues with an image - you may still need a Racker to investigate - but they will find the issues we've identified as the most common causes of RackConnect build failures.
The best time to run the scripts is after you have finished building your base server, at the last possible moment before you take a snapshot image of it. While you can use them as a diagnostic tool after a failure (assuming the failed server has network access or the appropriate script is pre-installed), their primary purpose is to detect possible issues with a server before it is used to build a template image.
The latest versions of the RackConnect Image Validation Scripts can be found at the following URLs:
| Linux | http://scripts.rackconnect.rackspace.com/preflight.sh |
| Windows | http://scripts.rackconnect.rackspace.com/preflight.hta |
Download the Linux validation script onto the target server.
wget http://scripts.rackconnect.rackspace.com/preflight.sh
Run the script. The script requires superuser privileges to run, so use sudo or run as root:
sudo bash preflight.sh
The output will vary slightly from server to server, depending on the OS and configuration. For example, if no DenyUsers SSH configuration directive is found, a single PASS line will be printed and no further DenyUser tests will be done.
If any of the tests result in failure, a brief synopsis of the problem will be given:
# sudo bash preflight.sh 02/01/13 01:23:45 PM UTC: BEGIN [LINUX] Rackspace RackConnect Image Validation Script Version 2.1.112 ### OS Detection ### Detected OS type: Ubuntu ### Root Permissions ### [PASS] User is root: OK ...snip... ### SSH Daemon Config ### [PASS] SSH listening on all IPv4 IPs: OK [PASS] SSH listening on port 22: OK [PASS] Protocol set to version 2: OK [FAIL] Password or ChallengeResponse Authentication enabled: FAIL (One of these must be enabled) [PASS] PermitRootLogin enabled: OK [PASS] No DenyUsers configuration directive found. [PASS] No AllowUsers configuration directive found. [PASS] No DenyGroups configuration directive found. [PASS] No AllowGroups configuration directive found. [WARNING] WARNING: sshd_config file is newer than sshd process. We recommend restarting sshd to ensure running config matches disk file. ### Public HTTPS Connectivity ### [PASS] Fetch test URL: OK 02/01/13 01:23:47 PM UTC: END [LINUX] Rackspace RackConnect Image Validation Script Version 2.1.112
Once you have identified any issues and corrected them, re-run the script. Once all tests pass you can safely create an image of the server. If you make changes to the server and need to re-image, re-run the validation script. Because the script makes no changes to the file system, it is safe to run as many times as you need.
# sudo bash preflight.sh 1>/dev/null [FAIL] Password or ChallengeResponse Authentication enabled: FAIL (One of these must be enabled) [WARNING] WARNING: sshd_config file is newer than sshd process. We recommend restarting sshd to ensure running config matches disk file.
Additionally, the script will exit with a non-zero exit status if any tests fail. This makes it easy to call the validation script from another script and react to the results appropriately. Note that only failures will cause a non-zero exit; if a warning is issued without any test failures the script will still exit with a zero (successful) exit status.
# sudo bash preflight.sh 1>/dev/null 2>/dev/null && echo "Success" || echo "A test failed." A test failed.
Or, if there are no issues:
# sudo bash preflight.sh 1>/dev/null 2>/dev/null && echo "Success" || echo "A test failed." Success
Download the Windows validation script onto the target server from the link provided at the beginning of this article. You do not have to do this as a user with Administrator rights, but it may be easier since you will need to run the script as a user with Administrator rights.


Save the script to disk.
Browse to where you saved the file (for Internet Explorer, this is probably your user's "Downloads" folder) and run the downloaded script.


If there are any issues you can click the + icon to expand the item and display more detail:


There are three Windows Firewall profiles (Domain, Private, and Public), but the Windows Firewall configuration utility available via Control Panel is only able to disable two of these (Public and Private). You can disable the third by performing the following steps:
Open the "Windows Firewall with Advanced Security" utility under Start > Administrative Tools > Windows Firewall with Advanced Security.


© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

0 Comments
Add new comment