You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 59 Next »

Gather Required Files & Information

You will need the following:

  • Windows XP installation ISO file
  • Windows XP product key

The following instructions assume the following locations on the management node:

  • Windows XP ISO: /install/WinXP+SP3.iso

These instructions assume you have root access and are using a bash shell:

sudo bash

Add a New Image to the VCL Database

Add the image to the VCL database. A row needs to be added to the following tables:

  • image
  • imagerevision
  • resource

 These rows need to be added to the database manually either by using SQL commands or phpMyAdmin.  The following SQL statements assume the following properties of the image:

  • Image ID: 7
  • Image name: vmwarewinxp-base7-v1
  • Image prettyname: No Apps (WinXP vmware)
INSERT INTO `vcl`.`image` (
`id` ,
`name` ,
`prettyname` ,
`ownerid` ,
`platformid` ,
`OSid` ,
`imagemetaid` ,
`minram` ,
`minprocnumber` ,
`minprocspeed` ,
`minnetwork` ,
`maxconcurrent` ,
`reloadtime` ,
`deleted` ,
`test` ,
`lastupdate` ,
`forcheckout` ,
`maxinitialtime` ,
`project` ,
`size` ,
`architecture` ,
`description` ,
`usage` ,
`basedoffrevisionid`
)
VALUES (
'7' , 'vmwarewinxp-base7-v1', 'No Apps (WinXP vmware)', '1', '1', '16', NULL , '512', '1', '1024', '100', NULL , '5', '0', '0', NOW(), '1', '0', 'vcl', '1500', 'x86', NULL , NULL , '0'
);
 INSERT INTO `vcl`.`imagerevision` (
`id` ,
`imageid` ,
`revision` ,
`userid` ,
`datecreated` ,
`deleted` ,
`datedeleted` ,
`production` ,
`comments` ,
`imagename`
)
VALUES (
NULL , '7', '0', '1', NOW(), '0', NULL , '1', NULL , 'vmwarewinxp-base7-v1'
)
 INSERT INTO `vcl`.`resource` (
`id` ,
`resourcetypeid` ,
`subid`
)
VALUES (
NULL , '13', '7'
)

Create a Virtual Machine

  1. Launch the VMWare Server console:
    vmware &
    
  2. Connect to Local Host
  3. Create a new VM
    1. Virtual Machine Configuration: Typical
    2. Guest Operating System: Microsoft Windows
      Version: Windows XP Professional
    3. Name: vmwarewinxp-base7-v1
    4. Network connection: Custom
      /dev/vmnet1
    5. Disk size: 8.0 GB
      1. Allocate all disk space now: no
      2. Split disk into 2GB files: yes
  4. Edit virtual machine settings 
    1. Configure the VM CD-ROM drive to use the Windows XP ISO image
      1. Connection: Use ISO image: browse to path of Windows XP ISO image
        /install/WinXP+SP3.iso
    2. Add: Ethernet Adapter
      1. Network Connection: Custom
        /dev/vmnet0

Install Windows XP on the Virtual Machine 

  1. Power on the the Virtual Machine
  2. Press ESC as soon as VM begins to start to display the boot menu
    • Boot from the CD-ROM drive
  3. Press a key to boot from the CD (if displayed at bottom of screen as soon as VM begins to boot)
  4. Proceed through Windows XP installation
    1. Press Enter to setup up Windows XP now 
    2. Press F8 to agree to the license agreement 
    3. Configure the Windows partition 
      1. Press Enter to set up Windows XP on the selected item (should be called "Unpartitioned space")
      2. Format the partition using the NTFS file system (Quick)
    4. Region and Language Options - click Next
    5. Name: VCL
      Organization: Apache.org 
    6. Enter the Windows XP product key 
    7. Computer name: vcl-winxp
      Administrator password: vclPassword
    8. Select the timezone
    9. Networking settings: Typical
    10. Member of a domain: No, leave default workgroup settings
    11. Automatic updates: Not right now
    12. Connect to Internet: Skip
    13. Register: no
    14. Enter "root" as the user name

Configure Windows XP

  1. Power on the VM if it is not already powered on
  2. The root user should automatically log on 
  3. Set the root account's password: either the user management GUI or execute the following command from a command prompt: net user root <PASSWORD>
  4. Install VMWare Tools  (Note: you must have a CD-ROM drive configured for the VM in order to install VMware Tools)
    1. Click on the VM menu and select "Install VMWare Tools"
    2. Select Typical and proceed through the setup pages accepting the defaults
    3. Reboot the VM when installation is complete

Install Cygwin 

  1. From within the Windows XP VM, download and run the Cygwin installer to the desktop: http://cygwin.com/setup.exe
    • Install from Internet
    • Root Directory: C:\Cygwin
    • Install For: Just Me
    • Default Test File Type: DOS/text
    • Local Package Directory: Desktop
    • Internet Connection: Direct Connection
    • Download Site: choose one (.edu FTP sites seem the fastest)
    • Select Packages: Net: openssh
    • Create icon on Desktop: No
    • Add icon to Start Menu: No
  2. Delete the Cygwin installation files from the desktop:
    1. Installer: setup.exe 
    2. Local package directory: C:\ftp%...cygwin...

Configure Cygwin SSH service

  1. Launch the Cygwin shell

    C:\Cygwin\Cygwin.bat

  2. Download the cygwin-sshd-config.sh script to the following location on the Windows VM:
    C:\Cygwin\home\root\cygwin-sshd-config.sh 
  3. Windows may have saved the file with a .txt extension, from within the Cygwin shell:

    ls ~
    cygwin-sshd-config.sh.txt

    If this is the case, rename the file:

    mv cygwin-sshd-config.sh.txt cygwin-sshd-config.sh

  4. Make sure the script is set to executable:
    chmod +x /home/root/cygwin-sshd-config.sh
    
  5. Run the script and specify the root account password as an argument, enclose the password in ticks in case special characters are used in the password:
    /home/root/cygwin-sshd-config.sh '<PASSWORD>'
    
    You should see something similar to the following towards then end of the script output:

    The CYGWIN sshd service was started successfully.

Create an SSH key pair on the Management Node and Copy the Public Key to the authorized_keys File on the Windows XP VM

  1. Download the gen-node-key.sh script to the following location on the management node:
  2. Set the script to be executable:
    chmod +x /root/gen-node-key.sh
    
  3. Determine the IP address of the Windows XP VM by running ipconfig:

    Windows IP Configuration
    Ethernet adapter Local Area Connection:
    Connection-specific DNS Suffix . :
    Autoconfiguration IP Address. . . : 169.254.123.175
    Subnet Mask . . . . . . . . . . . : 255.255.0.0
    Default Gateway . . . . . . . . . :
    Ethernet adapter Local Area Connection 2:
    Connection-specific DNS Suffix . : dcs.mcnc.org
    IP Address. . . . . . . . . . . . : 152.46.18.179
    Subnet Mask . . . . . . . . . . . : 255.255.248.0
    Default Gateway . . . . . . . . . : 152.46.23.254

  4. Run the script and specify the node as an argument (either the node's DNS name or IP address can be used):
    /root/gen-node-key.sh 152.46.18.179
    
    Note: You will need to enter the root account's password during script execution.
  5. Attempt to connect from the management node to the Windows VM via SSH using the key:
    ssh 152.46.18.179
    

 Insert an Imaging Reservation into the VCL Database

An imaging request needs to be manually inserted into the VCL database to begin the automated imaging process. You will need to know the management node ID and computer ID of the VM guest you are using.  The following SQL statements assume the following: 

  • Computer ID: 2 
  • Management node ID: 1 
&nbsp;INSERT INTO `vcl`.`request` (
`id` ,
`stateid` ,
`userid` ,
`laststateid` ,
`logid` ,
`forimaging` ,
`test` ,
`preload` ,
`start` ,
`end` ,
`daterequested` ,
`datemodified`
)
VALUES (
'1' , '16', '1', '16', '', '1', '0', '0', NOW( ) , TIMESTAMPADD(MINUTE, 120, NOW()), NOW( ) , NULL
);
 INSERT INTO `vcl`.`reservation` (
`id` ,
`requestid` ,
`computerid` ,
`imageid` ,
`imagerevisionid` ,
`managementnodeid` ,
`remoteIP` ,
`lastcheck` ,
`pw`
)
VALUES (
NULL , '1', '2', '7', '7', '1', NULL , NULL , NULL
);

 Start vcld:

service vcld start

Monitor the vcld.log file:

tail -f /var/log/vcld.log


Common Problems

 You may see the following dialog box when powering on a VM which has been saved in a VCL image. Click on Always Keep:

  • No labels