Upgrade notes for Lab Management 2.5

Here's what you need when upgrading to Lab Management 2.5.

When upgrading to Lab Management 2.5, please see the following upgrade notes as well:

The following tasks explain what you need do to migrate the Lab Management manager from version 2.4 on RHEL 5 (32-bit) to version 2.5 on RHEL 6.1 (64-bit). These instructions assume that the manager to be migrated is using old VMware Server technology rather than ESXi. The instructions reference mgr.f.sp.collab.net as an example.

Migrate the AD server

In the old setup, the AD server is set up as a guest node to the manager. For example, ad.f.sp.collab.net is a guest of mgr.f.sp.collab.net. So as a first step, you need to migrate this to ESXi.

  1. Install VMware OVF Tool.
    1. Log into mgr.f.sp.collab.net.
    2. Download the tool from http://communities.vmware.com/community/vmtn/server/vsphere/automationtools/ovf and install it in the /opt directory.
  2. Copy the AD image to the ESXi server.
    1. Stop VMware using the following command.
      sudo vmctl stop
    2. Edit /var/lib/vmware/VirtualMachines/ad.f.sp.collab.net/conf.vmx. Disable cdrom and floppy devices by setting the value present to FALSE in each corresponding section.
    3. Run the following command to copy the VMware image to the ESXi server. In this example, we deploy VM as the guest "ad.f.sp.collab.net", to datastore "datastore1", resource pool "F", and network group "f.sp.collab.net" on the ESXi server devmgr2.sp.collab.net. If you are deploying to the default resource pool, just leave out the resource pool name ("/F" in the command line argument).
      sudo /opt/vmware/ovftool/ovftool --powerOffSource -ds="datastore1" --name="ad.f.sp.collab.net"
      --network="f.sp.collab.net"
      /var/lib/vmware/VirtualMachines/ad.f.sp.collab.net/conf.vmx vi://devmgr2.sp.collab.net/F
    4. Use vSphere client to start the AD server.
    5. After the AD server is up, configure it to use static IP, something like 10.1.53.5.
  3. Run the following commands and check the output to verify whether the new AD server is up and has the necessary data.
    cd /usr/local/cubit-mgr/bin
    # To display users on the AD
    sudo ./checkAccts -U
    # To display groups on the AD
    sudo ./checkAccts -G

Note: If the customer currently has a WDS server running on the manager as a VMware-server guest, we will delete it, and rebuild a new WDS in the AD server box from scratch.

Migrate the manager

  1. Get a copy of the latest Lab Management 2.5 build.
  2. Back up Lab Management-related data (assumes /public/backup is a mounted backup volume).
    sudo mkdir /public/backup/mgr.$THEDOMAIN
    sudo ./cubit_backup.py -d /public/backup/mgr.$THEDOMAIN --skip_vm -c /var/ops/site.conf --skip-data
    Important: During migration from a pre-2.5 32-bit system to a Lab Management 2.5 64-bit system, you need to run /usr/local/cubit-mgr/bin/backup_cricket_data.py after the normal cubit_backup.py script to dump cricket data.
  3. Prepare the physical or virtual host that will house the Lab Management manager.
    Note: The OS type should be 64-bit-capable -- "RedHat Linux 6 (64-bit)". It should have two NICs, one for standard network traffic, and another for the ILO network. Use the latest SCSI Controller, LSI Logic SAS.
  4. Install RHEL 6.1 64-bit on the host.

    Once the virtual machine is created, install RedHat Linux 6.1 on the machine. For this, you need two images: floppy and DVD.

    1. The floppy image is located at /public/os/ks-6.1-x86_64.flp.
    2. The DVD image is located at /public/os/rhel-server-6.1-x86_64-dvd.iso.
    3. Connect the floppy image as VM's floppy drive. Connect the DVD image as VM's "CD/DVD drive". Both should be connected at boot.
    4. Use the above images to boot the newly built machine. The system should boot from DVD.
    5. Press the ESC key from the boot menu to get a prompt.
    6. At the prompt, type linux ks=floppy"'. This will install RedHat 6.1 OS and necessary packages.
    The default root password is changeme.
  5. Set up the network.
    1. Edit /etc/sysconfig/network-scripts/ifcfg-eth0 and ensure that it has correct information.
    2. Edit /etc/sysconfig/network-scripts/ifcg-eth1 and ensure that it has correct information.
    3. Edit /etc/sysconfig/network and ensure that it has correct information.
    4. Edit /etc/hosts and add an entry for "mgr.$THEDOMAIN", mapped to the primary IP of the host.
  6. Stop the old manager by powering off the machine.
  7. Reboot the new manager.
  8. Fix /etc/fstab.
    Mount the backup volume (see step 5) to /mnt/backup.
    cd /mnt/backup/mgr.$THEDOMAIN/system_info
    cat nfs_entries >> /etc/fstab
  9. Reboot the system.
  10. Modify /var/ops/site.conf file to add new tokens. For example, the following new tokens need to be set.
    cubit_esx_user = cubit
    cubit_esx_user_pwd = secret
                    
    cpu_archs = i386, x86_64
    cpu_names = Xeon, Athlon, Opteron
    models = HP DL320, HP DL380, HP z600, HP xw4600, HP xw6600, Generic, Fauxst
                    
    ######################
    # MANAGER
    #
    ## This is the manager itself.  This description is informational, but describes
    ## the default settings for the manager; it is *strongly* encouraged that you do
    ## not change these unless you need to:
    ## note: if mgr is deployed as a guest, for example, on an ESX server, you need
    ## to set "parent_hostname" attribute:
    ## parent_hostname = myparent.example.com
    ##
    [infrastructure:mgr]
    hostname = %(cubit_mgr_hostname)s
    profile_name = rhel6.1_base_x86_64
    install_mode = kickstart-net
    cubit_manager = %(cubit_mgr)s
    mgr_public_gateway = %(cubit_mgr_gateway)s
    parent_hostname = pn002.f.sp.collab.net
    memsize = 4096
    memsize_unit = MB
    disksize = 100
    disksize_unit = GB
    mac_addr = 00:0C:29:9D:0F:E8
    
    [infrastructure:primary_ad_server]
    ip_address = 10.1.53.5
    parent_hostname = pn002.f.sp.collab.net
    hostname = ad.%(cubit_domain)s
    profile_name = Windows2k3stdR2_dc
    mac_addr = 00:50:56:00:AD:F1
    target_port_group = f.sp.collab.net
    ncpu = 4
    cpuarch = x86_64
    cpuname = Xeon
    cpumhz = 2000
    cpucores = 1
    memsize = 512
    memsize_unit = MB
    disksize = 20
    disksize_unit = GB
    wds_server = true 
    
    [infrastructure:pn002.f.sp.collab.net]
    ip_address = 10.1.53.12
    hostname = pn002.%(cubit_domain)s
    profile_name = esx_4.0u1
    unmanaged = true
    datastore = datastore1
    resource_pool = F
    port_group = f.sp.collab.net
    mac_addr = 00:50:56:70:92:20
    memsize = 34000
    memsize_unit = MB
    disksize = 800
    disksize_unit = GB
    cpuarch = x86_64
    cpucores = 2
    ncpu = 4
    
    #[infrastructure:miniroot]
    #ip_address = 10.1.53.6
    #parent_hostname = %(cubit_mgr_hostname)s
    #hostname = miniroot.%(cubit_domain)s
  11. Install Lab Management using the following commands:
    cp /public/backup/mgr.$THEDOMAIN/site.conf /var/ops
    cd /var/ops
    tar xzvf /public/download/cubit-2.5-9653.dev.tgz
    cd /var/ops/cubit-2.5-9653
    ./install.py -f /var/ops/site.conf
  12. Restore Lab Management-related data from old manager.
    mv /u1/cubit/data /u1/cubit.data.XXX
    /usr/local/cubit-mgr/installation-support/scripts/stop-services.py
    cd /public/backup/mgr.$THEDOMAIN/system_info
    cat nfs_entries >> /etc/fstab
    cd /public/download
    ./add_users
    cd /var/ops/cubit-2.5-9653
    ./cubit_restore.py -d /public/backup/ mgr.$THEDOMAIN
  13. Mount the Lab Management data folder to /u1/cubit/data.
  14. Perform the migration -- use the following command to recreate runtime and run migration scripts:
    /usr/local/cubit-mgr/recreate-runtime.py -f /var/ops/site.conf --migrate
  15. Update profiles. Since you are migrating from an older version, the profiles in the migrated manager might be older than the installer. It's always advisable to update the profiles to the newer version. Use the following commands to do this:
    1. Check out the local ai profile information:
      svn co file:///u1/cubit/data/repos/ai/profiles
    2. Copy updated/required profiles from $CUBIT_MGR_DIR/installation-support/default-data/ai/profiles to the profiles working copy.
    3. Check in the required profiles to the manager repository using username cubitrepo.

Install VMware-ovftool on the new manager

  1. Download the tool from http://communities.vmware.com/community/vmtn/server/vsphere/automationtools/ovf and install it in the /opt directory.

Install VMware-vSphere-CLI on the new manager

  1. Get VMware-vSphere-CLI from http://www.vmware.com/downloads/download.do?downloadGroup=VCLI41 and run the following commands:
    cd /tmp
    sudo tar xzvf VMware-vSphere-CLI-4.1.0-254719.x86_64.tar.gz
    cd vmware-vsphere-cli-distrib
    sudo ./vmware-install.pl # Choose install location as /usr/local/vmware-vicli/bin

Rejoin the manager node into the AD domain

  1. Delete the manager node from the AD server.
    1. On the AD server, click Start > Administrative Tools > Active Directory Users and Computers.
    2. Open CubitComputers OU.
    3. Right-click the manager entry and select Delete.
  2. On the MGR node, join the manager to the AD domain (assuming the AD domain f.sp.collab.net is being used for the Lab Management domain).
    $ /usr/bin/sudo kinit Administrator@F.SP.COLLAB.NET  <<<---- domain name in all upper cases
    Password:  (this is your own password for sudo)
    Password for Administrator@F.SP.COLLAB.NET:  (type domain administrator password here)
    $ /usr/bin/sudo net ads join -U Administrator
    Administrator's password:  (type domain administrator password here)
    Using short domain name -- SERVERS
    Joined 'MGR' to realm 'F.SP.COLLAB.NET'
    $ /usr/bin/sudo net ads testjoin
    Join is OK 
  3. Restart the samba service on the manager.

Set up WDS

  1. Create WDS.
    1. In the AD box, verify that WDS is installed.
    2. Follow these steps to add Windows 7 and Windows 2008 server images to the WDS server.
    3. Once the boot and install images are added to WDS, follow the steps under Configure the WDS server to support more images to set the default boot program and images.
      Note: If you have a separate NAS mounted volume as another drive (say E:), and will use this as the WDS RemoveInstall folder, make sure you say "E:\RemoteInstall" here:
      wdsutil /Initialize-Server /RemInst:"E:\RemoteInstall"
  2. Add the CapturedImages folder to WDS.
    1. On the AD server, click Start > Administrative Tools > Windows Deployment Services.
    2. Click the WDS server node, right-click Install Images and select Add Image Group.
    3. Type "CapturedImages" and click OK.
For instructions on storing WDS images on a network share, see Store WDS images on a network share.