Skip navigation.


Log in with NCSU WRAP
View all authentication options

Creating a Windows XP Base Image

This document provides the information on how to set Windows XP as a compute node OS
to under xCAT or vmware based images. Note: xCAT is a cluster management tool used as a provisioning engine within vcl to install bare-metal blades. VCLD can interact with VMware Free Server, VMware ESX Standard Server and VMware ESXi

This document assumes familiarity with using xCAT and vmware. If not - read the Redbook and man pages.
The term "management node" refers to separate server running Linux with xCAT installed. The term compute node refers to the target blade or virtual machine.

All downloads mentioned in this document (drivers and applications) also available on CD "VCL Setup (WindowsXP)" under "drivers" and "apps" directories respectively. However it is recommended to check original web sites for latest versions.

There is two types of available BladeServers at the moment, which differs in routing of two Ethernet interfaces to Ethernet Switch Module: type 8678 and type 8832. The distinction in required steps will be emphasized where appropriate.

Building your machine to be target for creating image
=============================================================

1. At the console of the bladecenter, select a blade to install windows on. Load install media and begin. Name the computer according to the name convention of your organization. Ideally dhcp will exists on the private network via xCAT.

2. After first reboot create user "root" and when in Windows environment:
- create password for this user and choose to make his folders private (Start->Control Panel->User Accounts)
- from root's properties: (Start->Control Panel->Performance and Maintenance->Administrative Tools->Computer Management->Local Users and Groups->Users->root->Properties)
- include this user in the Administrators group ("Member Of" tab)
- check "User cannot change password" and "Password never expires"

3. Setup environment (most of following are recommendations just to create default configuration):
- go to Start->My Computer->right click and choose "Show on Desktop"
- in "System Properties" (Start->My Computer->right click->Properties) under "Remote" tab, check "Allow users to connect remotely to this computer" - IMPORTANT!
- in "System Properties" under "Automatic Updates" tab, check "Turn off automatic updating..." Updating will be done on regular basis as a part of "reload OS from image" procedure.
- rename "C:" drive from "Local Disk" to "WinXP"
- if there is second hard disk drive: go to Start->Control Panel->Performance and Maintenance->Administrative Tools->Computer Management->Disk Management->right click on Disk1->New Partition->Next->Next->in "Assign the following drive letter:" field choose "D"->Next->in "Volume Label:" field type "Storage"->check "Performa quick format"->Next->Finish
- in Explorer under "Tools" -> "Folder Options" -> "View":
- check "Display contents of system folders"
- check "Show hidden files and folders"
- uncheck "Hide extensions for known file types"
- setup default page in IE to "www.ncsu.edu"
- create directory "C:\downloads" if going to download drivers/applications
- setup screen resolution to "1024 by 768 pixels", and color quality to "Highest (32-bit)" (right click on Desktop->Properties->Settings)

Note: execute all following steps logged in to Windows as root

4. For bare metal installs - After first reboot Windows XP does not automatically recognize Broadcom NetXtreme Gigabit Adapter used in BladeServers. Not needed for VM's

a) Acquire latest driver for adapter from IBM web site www.ibm.com:
- in "Search" window type the number for the bladeserver model
- go to "BladeCenter "type" support" link
- in "View by Document type" choose "Downloads and Drivers"
- in "Filter by category" choose "Networking"
- choose the latest driver for Windows XP
- this driver will need to be transferred to the blade being installed

b) Install network adapter driver:
- double-click executable file (e.g. 26k4926w.exe)
- in "Update Operations" window choose "Apply update"
- this will create folder under "C:\Documents and Setting\root\Local Settings\temp\"
- go to Start->My Computer->right click->Prperties->Hardware->Device Manager->Network Adapter->Update Driver->Install from a list or specific location (Advanced)->check "Search for best driver in these locations"->uncheck "Search removable media"->check "Include this location in search" and point to directory "C:\Documents and Setting\root\Local Settings\temp\\image\disk1"->Next->Finish
- delete "C:\wxlog" directory
- repeat for second network controller

c. Base configuration depends on dhcp for both NICs

5. Install the latest Service Packs and security updates. (via Windows Update link at Microsoft web site).
Recommendation: don't archive files during Service Pack installation.

6. Install applications- (optional)
Recommended applications for "base" configuration:
- Adobe Acrobat reader (www.adobe.com)
Recommendation: check "Do not use Adobe Download Manager" (this will effectivelly uncheck "Also download Photoshop Album 2.0 Starter Edition software")
- SSH client (www.ssh.org) - non-commercial version for Workstations (ver.3.2.9)
- Symantec AntiVirus (from NCSU site)
Recommendation: run LiveUpdate after installation

7. Install Cygwin - Required
A. Download Setup.exe file from http://www.cygwin.com to C:\downloads\ directory
- run Setup.exe
- choose "Install from Internet"
- on "Select Root Install Directory" screen choose "Just me" (in "Install For" section)
- on "Select local package directory" screen choose "C:\downloads\apps"
- on "Select Connection Type" choose "Direct Connection"
- on "Select Packages" screen make sure that following are checked:
mandatory: in Admin group: cygrunsrv, shutdown
in Net group : openssh (will also check open-ssl automatically)
optional: in Doc group : cygwin-doc
in Editors : vim (or other favorite editor)
- push "Next" button

8. Setup sshd.
- Start Cygwin shell (from Start->All Programs->Cygwin->Cygwin Bash Shell OR by double-click on Cygwin desktop icon) (this will setup "root" directory under /cygwin/home)
- execute "ssh-host-config -y" in the Cygwin window, when prompted to set CYGWIN - type "ntsec"
- change owner to "root" from the Cygwin window on following files:
- /etc/ssh*
- /var/empty
- from Services Control Panel (Start->Control Panel->Performance and Maintenance->Administrative Tools->Services) change the properties of CYGWIN sshd:
- verify that "Startup type" is "Automatic"
- in "Log On" tab check "this account" and enter "root" and root's password
- start "CYGWIN sshd" service either from Windows Services Control Panel OR
from Cygwin window by "cygrunsrv -S sshd"
- on the management node execute "makesshgkh "
This command will get the ssh keys for and save it in /opt/xcat/etc/gkh
- Copy root's public ssh key to Windows node and place in the authorized_keys file. Using any method you like you must copy
managementnode:/root/.ssh/id_rsa.pub to Windows node:/home/root/.ssh/authorized_keys Note that /home/root/.ssh is
the path from a Cygwin window, in Windows it is C:\cygwin\home\root\.ssh
- Test it. From management node execute:
ssh -i <path to private key> nodename uname -a
psh nodename uname -a : xcat command for parrallel ssh calls

9. Create ssh identity keys on management node
should be created during xcat setup. If not
run the cmd:
ssh-keygen -t rsa
hit enter key for all questions (will not be using a passphrase)

A. copy public key to root's authorized_keys file on node
- C:\cygwin\home\root\.ssh\authorized_keys
B. copy the private key to a known location i.e. /etc/vcl/winxp_key
C. add the path to the ssh identity key variable for winxp in the vcld.conf file
D. test the ssh login from the management node

 

10. (Optional) Configure time synchronization client

11. Setup ntsyslog - Required
Used for logging EventLog's events on management node:
- Download it from http://sourceforge.net/projects/ntsyslog/
- Run NTSYSLOG.msi OR just copy ntsyslog.exe and NTSyslogCtrl.exe to C:\Windows\system32 directory and
from DOS window execute: ntsyslog -install
- configure it:
- from DOS window run NTSyslogCtrl.exe
- go to Syslog Deamons and under Primary Syslog Daemon enter management node's IP (ie. 10.10.14. subnet)
- from drop-down menu select Setup EventLog and check all events
- restart service

12. Delete C:\downloads directory

13. copy vcl vbs scripts to the node
two sets of files need to be copied
A. located in the vcl install directory
- /usr/local/vcl/vbs_scripts
- /usr/local/vcl/vbs_scripts/VCL
- scp -r -i identity_file /usr/local/vcl/vbs_scripts/* node:
- login to node and copy the VCL directory to
C:\Documents and Settings\root\Application Data\VCL
make sure the files are owned and executable by root
These files are used on boot up to correctly configure the node.

14. Setup Logon/Logoff scripts in group policy editor

  • open group policy editor - start->run enter gpedit.msc
  • Expand User Configuration -> Windows Settings
  • Select Scripts (Logon/Logoff)
  • In the right pane shows Logon and Logoff

Logon

  • Double click Logon(this opens a new window)
  • Click Add
  • Enter VCLprepare.cmd in Script Name
  • hit  Ok,  then OK again

Logoff

  • Double lick Logoff(this opens a new window)
  • Click Add
  • Enter VCLcleanup.cmd in Script Name
  • hit Ok to save then Ok again

Exit group policy editor

15. IMPORTANT: Perform Disk Cleanup and defrag Windows node disk.

16. Imaging procedure - manually process
A. make sure sshd is set to auto start
ssh -i identity_file node "cmd /c C:\/WINDOWS\/system32\/sc config sshd start= auto"

B.Disable pagefile and reboot
ssh to node and run auto_create_image.vbs
- ssh -i identity_file node auto_create_image.vbs
- this script disables pagefil.sys and reboots

C. Delete pagefil.sys - saves space
- when node is backonline delete C:\Pagefil.sys
ssh -i identity_file node "rm C:/\pagfil.sys"

D. sync password for root and sshd service - remember it's used later in the autologin script
- at this point they should be same, but just in case

E. set sshd to manual mode
- ssh -i identity_file node "cmd /c C:\/WINDOWS\/system32\/sc config sshd start= demand"

F. Write currentimage.txt - requires a database id. So will need to know an available imageid for now choose 100

  • For vmware Server : ssh <node> "echo vmwarewinxp-base100-v0 > currentimage.txt"
  • For vmware ESX server: ssh <node> "echo vmwareesxwinxp-base100-v0 > currentimage.txt"
  • For xCAT(bare-metal): ssh <node> "echo xwinxp-base100-v0 > currentimage.txt"

Important the name of the image in currentimage.txt and the database has to match. This is vcld's method of determining what image is loaded on a given node.

G. Sysprep - non sysprep options in upcoming versions
NOTE: for vmware installs replace Sysprep with Sysprep_vmware

1. Sysprep (first time step)
Required - will need to add Product License key to sysprep.inf
Files located in:
/usr/local/vcl/tools/Sysprep(_vmware)/sysprep.inf

2. root password (first time step)
add root password to vbs script
/usr/local/vcl/tools/Sysprep(_vmware)/i386/$oem$/setautologon.vbs

Sysprep:
3. cp sysprep files to node C: from management node
scp -r -i identity_file /usr/local/vcl/tools/Sysprep(_vmware) node:C:\Sysprep

4. make sure files are executable from management node
ssh -i identity_file node chmod -R 755 C:\/Sysprep

5. xCAT only (skip if using vmware) - set node to image mode

6. start sysprep
ssh -i identity_file node "C:\/Sysprep\/sysprep.cmd"

7. sysprep for vmware and bare-meta(xCAT) differ

  • vmware method does not turn node off
  • bare-metal(xCAT) reboots then imaging starts

when node is not pingable from management node
it's safe to turn vm off either through vmware console or cmd line

17. VMware only - Once the files are created
Add the image name to the database it should match the form of
vmwarewinxp-base#-v0
winxp-base#-v0
This will need to be added to the database manually, this step is ugly and it's on the todo lists to create admin tools that one could add images separately without going through image creation process.

run something like the following either at mysql cmd line via a sql file(mysql vcl < input.sql)

INSERT INTO `image` (id, `name`, `prettyname`, `ownerid`, `deptid`, `platformid`, `OSid`, `imagemetaid`, `minram`, `minprocnumber`, `minprocspeed`, `minnetwork`, `maxconcurrent`,
 `reloadtime`, `deleted`, `test`, `lastupdate`, `forcheckout`, `maxinitialtime`, `project`, `size`) VALUES
(100, 'vmwarewinxp-base100-v0', 'No Apps (WinXP vmware)', 1, 1, 1, 16, NULL, 0, 1, 0, 10, NULL, 14, 0, 0, NOW(), 1, 0, 'vcl', 1045);
INSERT INTO `imagerevision` (`imageid`, `revision`, `userid`, `datecreated`, `deleted`, `production`, `comments`, `imagename`) VALUES (100, 0, 1, NOW(), 0, 1, NULL, 'vmwarewinxp-
base100-v0');
INSERT INTO `resource` (`resourcetypeid`, `subid`) VALUES (13, 100);

 

the breakdown of the naming convention
vmwarewinxp = image prefix
base=user chosen name
#=imageid database id of the image
v0= version id of the image v#

Once the base template is created additional images can be created through the VCL web interface under manage images.