Error DataBase-One Place all Solutions Forums Blog Glossary    Contact Us
Search  
   
Browse by Category
Error DataBase-One Place all Solutions .: Virtualization .: How to Deploy VMWare ESX (RedHat Linux) server using Windows Automated Deployment Services

How to Deploy VMWare ESX (RedHat Linux) server using Windows Automated Deployment Services

Server purposing using Automated Deployment Services (ADS) allows you to configure and install multiple Windows servers from bare-metal to fully operational servers without manual intervention. It’s a little known fact that you can also bare-metal deploy VMWare ESX servers (or RedHat Linux servers) using Microsoft’s ADS. In this article we’ll explain how to setup ADS for purposing ESX using Microsoft’s ADS. Included are the task sequence files, sample partition and additional files as discussed in the article.

Assumptions

Let’s start with some assumptions:

  • The ADS services (controller service, network boot services and image distribution service) are all installed on a single server.
  • ADS is installed on Windows 2003 Enterprise (R2) server with a fixed IP-address, enough memory and disk space.
  • Note: The ADS documentation states 64-bit Windows Enterprise is not supported. Microsoft’s solution for Windows Based Hosting 4.5 states ADS 1.1 is supported on 64-bit Windows.

    Note2: I had an issue with Windows 2003 R2 Enterprise Edition service pack 2 and ADS v1.1. When WinPE 2005 was added to the repository, the ADSBuilder service refuses to start. Either don’t use a WinPE 2005 repository, or use Windows 2003 R2 Enterprise Edition service pack 1 for now until a fix is available.

    • DHCP services are available and network communication between ADS server and ADS target is not restricted.
    • Your ADS targets are able to PXE-boot.

    Configure Controller Service

    On the ADS server, open the ADS Management console, and then click Services. In the details pane, select and then right-click Controller service. In the drop-down menu, click Properties. In the Controller Service Properties dialog box, select the Service tab, and then set the Controller properties as shown:

    Property
    Setting
    Global job template
    boot-to-da
    Device identifier
    MAC Address
    WinPE repository name
    Type WinPE repository name
    Response to PXE action
    Add
    Response to BMDP action
    Add
    Device Description for new auto-added device
    Job template for new auto-added device
    boot-to-da

    ADS Controller Service Properties.jpg

    Network Card Properties

    Open the networkcard properties and disable the following settings (if applicable):

    • Offload TCP Segmentation
    • Large Send Offload
    • Checksum Offload

    Restart the ADS server after you’re done.

    Add Drivers

    Extend the ADS driver repository with mass-storage and network card drivers not supplied with Windows 2003 Server CD:

    • systemdrive\Program Files\Microsoft ADS\nbs\repository\User\PreSystem

    Drivers from Presystem are attempted first, then Windows 2003 drivers.

    • systemdrive\Program Files\Microsoft ADS\nbs\repository\User\PostSystem

    Drivers from Windows 2003 are tried First, then drivers from PostSystem.

    For my system I’ve copied the following network card drivers to ADS PreSystem Repository folder:

    Networkcard
    Version
    url
    Remark
    NetXtreme Server 32-bit
    12/15/2006,10.24.0.0
    www.broadcom.com
    for the following chipsets: 5700, 5701, 5703, 5704, 5714, 5715, 5721, 5780, 5781, 5786, 5787, 5788, 5789, 5702, 5705, 5751, 5752, 5753, 5754, 5755, 5782
    NetXtreme II
    12/22/2006,3.0.5.0
    www.broadcom.com
    for the following chipsets: 5706, 5708

     And the following mass-storage drivers also to the ADS repository PreSystem folder:

    Storagecontroller
    Version
    url
    LSI SYMMPI based PCI MPI
    06/13/2005,1.20.18.00
    www.lsilogic.com
    Dell Perc MegaRAID family
    07/16/2004,5.48
    www.dell.com
    DELL Perc RAID SAS
    08/24/2006,1.21.0.32
    www.dell.com

    Restart the “ADS Deployment Agent Builder”service after you’re done.

    Provisioning & Bulk Import

    Each server which will be deployed using ADS needs some variables like ip-address and hostname. Also we want to be able to provision both Windows hosts as well as VMWare ESX (or RedHat Linux) hosts.

    We'll assume the following:

    • Provisioning for both Windows and Linux Hosts
    • The MAC address of the PXE-enabled network adapters are known beforehand. *
    • Hostname, IP-address, subnet mask will be defined at deploy-time
    • DNS IP-addresses and domain name static is known beforehand

    *) Instead of the MAC-address, you can also use the servers UUID.

     We will import the servers with all variables into the ADS controller’s database using a comma-separated (.csv) file.

    The comma-separated file will use the following variables:

    Variable
    Remark
    Default value
    Windows Host
    ESX Host
    MacAddress
    PXE-enabled network card MAC-address *
    yes
    yes
    MachineName
    Server hostname. Hostname is MAC-address with a “MAC” prefix.
    MAC
    yes
    yes
    Description
    ““ **
    no
    no
    AdminPassword
    Local admin or root password
    “” **
    yes
    yes
    Workgroup
    Name of the workgroup to join
    Myworkgroup
    yes
    no
    Domain
    Domainname to join
    Mydomain.local
    yes
    no
    DomainUsername
    Domain join using this username
    ““ **
    yes
    no
    DomainPassword
    Password of the username
    ““ **
    yes
    no
    Static_or_DHCP1
    DHCP or static IP-address
    static
    yes
    no
    Nic_Name1
    Network card name
    “Local Area Connection” **
    yes
    no
    IPAddr1
    IP-address of the first network card
    127.0.0.1
    yes
    yes
    Mask1
    Subnet mask of the first network card
    255.255.255.0
    yes
    yes
    DefGW1
    Default gateway of the first network card
    ““ **
    yes
    yes
    GWMetric1
    1
    yes
    no
    DNS1
    DNS server(s) of the first network card
    1.2.3.4,2.3.4.5
    yes
    yes
    Static_or_DHCP2
    static
    yes
    no
    Nic_Name2
    ““ **
    no
    no
    IPAddr2
     
    ““ **
    no
    no
    Mask2
     
    ““ **
    no
    no
    DefGW2
     
    ““ **
    no
    no
    GWMetric2
     
    2
    no
    no
    DNS2
     
    ““ **
    no
    no

    *) In this example we’re using the MAC address. You could also use the servers UUID.

    **) If you’re using Excel to populate the comma separated file, fill the empty fields with two double quotes (“”).

    The variables are usually the MAC address and MachineName. Other settings (like username or domain name) are usually pretty static

    Sample Excel sheet:

     Sample Import file in Excel.jpg

    Sample comma-separated file in Notepad:

     Sample Import file in Notepad.jpg

    In the download section you’ll find a sample import comma-seperated import file.

    Importing

    To import we’ll use the bulkimport.cmd from the Microsoft Solution for Windows-based Hosting.

    Open a command prompt and type:

    ”bulkimport.cmd myfile.csv” (sans quotes):

     Sample bulk import:

     ADS Bulk Import.jpg

     Bulkimport.cmd comes from Microsoft's Solution for Windows-based Hosting version 4.5 and is also included in the download.

    Sample import results:

     ADS Sample Import Results.jpg

    FAT16 Partition

    Microsoft’s ADS only supports FAT and NTFS partitions. We will install the files needed to start the ESX installation onto a FAT16 partition. Using a DOS based Linux boot loader we can (kick) start the ESX Linux installation You can create your own partition or import the sample partition included in the download.

    Create a partition:

    To create the partition we’ve used the following steps:

    1. Download DR-DOS 7.03 (or MS-DOS or FreeDOS)
    2. Create a new VM (or use a physical machine) and boot from the DR-DOS bootable floppy.
    3. In DOS, fdisk a new FAT16 partition of about 2024 Mb. Format the new partition and make sure it’s bootable.
    4. Add the system to the ADS database and let it boot into ADS
    5. Use the Sequence Editor to create a partition capture job:

     ADS Sequence Editor Image Capture.jpg

    Note: The image capture job is included in the download.

    Note2: Be sure to name the image: “DOSFAT16” (sans quotes).

    6. In ADS, run a one-time job with the task sequence file created in the previous step.

    Import the partition:

    A sample image is included in the download. All that needs to be done is to import the image into ADS.

    1. On the ADS server, open the ADS Management console, and then click Images. From the Action menu, click Add Image

    Path to image file:  \DOSFAT16.img
    Image name: DOSFAT16

    2. Click OK to start adding the image, click Cancel to close the Add Image window

    DOS FAT16 Image in ADS console:

     ADS Images.jpg

    Access to ESX Files

    The ADS server needs access to some files from the ESX CD. Because in our scenario the ADS server is also used as an FTP server to install ESX from, we’ve copied the whole CD to D:\ESX301 so ADS can access some of the files present on the ESX installation CD:

    • Vmlinuz
    • initrd.img

    You can find these files on the ESX installation CD: :\images\pxeboot

    • loadlin.exe

    Linux loader for DOS. You can find this file on the ESX installation CD: :\ dosutils

    Note: Some people had issues with loadlin.exe and used linld.com (a refactored LoadLin.exe) instead.

    Kickstart

    To allow ESX to install unattended, a kickstart file is used. This file almost identical to a RedHat kickstart file with some added VMWare ESX specific parameters. The kickstart file needs to be modified with machine specific settings like hostname and IP-address. Use the following syntax to allow ADS to find and replace the variable strings of the ADS device. These variables were set during the provisioning stage:

    ^ADS_IP_ADDRESS^ - ESX ip-address
    ^ADS_SUBNET_MASK^ - ESX subnet mask
    ^ADS_COMPUTER_NAME^ - ESX hostname

    For example:

    network --device eth0 --bootproto static --ip=^ADS_IP_ADDRESS^ --netmask=^ADS_SUBNET_MASK^ --hostname=^ADS_COMPUTER_NAME^

    In our scenario we’ve named the file ks.cfg and placed it in D:\ESX301\ks.cfg.

    Note: You can find a sample kickstart.cfg in the download or try the kickstart.cfg from Altiris

    Autoexec.bat

    Autoexec.bat will start the installation at the next reboot. Autoexec.bat will execute loadlin.exe which will initiate the ESX bootloader in ramdisk by issuing the following command:

    IDE disk

    c:\loadlin.exe c:\vmlinuz initrd=c:\initrd.img ramdisk_size=12288 apic ks=hd:hda1/ks.cfg

    SCSI disk

    c:\loadlin.exe c:\vmlinuz initrd=c:\initrd.img ramdisk_size=12288 apic ks=hd:sda1/ks.cfg

    In our scenario we’ve placed the batch file in D:\ESX301\dosutils\autoexec.bat.

    Note: You can find the autoexec.bat in the download.

    ESX Installation Steps

    The following installation steps are in the ADS task sequence file:

    1. Partitioning

    Microsoft’s ADS only supports FAT & NTFS partitions. We are able to start the ESX installation process using a FAT 16 partition and loadlin.exe to start the Linux boot loader.

    2. Apply Image

    After the partitioning process created and activated the new partition, we can apply the FAT16 image.

    3. Copying files.

    Next, we need to copy some files to start the installation:

    • Vmlinuz
    • initrd.img
    • loadlin.exe
    • kickstart.cfg
    • Autoexec.bat

    Note: Change the path to the needed files if needed.

    4. Kickstart configuration

    Some parameters like hostname and ip-address, will be different for each host. In this step the kickstart.cfg is modified with these specific variables.

    5. Set description

    The description will be modified to: ESX host
     
    6. Restart & Release Control

    Finally the system will be restarted and ADS control of the device is released. After the reboot, the system will start DOS and loadlin.exe will initiate the ESX installation.

     ADS Sequence Editor Baremetal ESX.jpg

    The installation steps are available in the tasksequence file that's included in the download.

    Import Task Sequence

    To import the task ESX Installation task sequence, on the ADS server, open the ADS Management console and then click Job Templates. From the Action menu, click New Job Template and select the following options:

    Template type:

    (x) An entirely new template

    Name and Description:

    Name: Bare Metal ESX Installation

    Command Type:

    (x) Task Sequence

    Task Sequence File and Arguments:

    Task Sequence File: BareMetal ESX3.0.1.xml

    Task Sequence Arguments File:

    Destination Device Selection:

    (x) None

    Run ADS Job

    Try to run a ADS job to see if everything is configured correctly.  Take control of a device or group of devices and run the Bare Metal ESX Installation job.

    Before we run a job, set the host specific variables in the ADS device variables like machinename, ip-address and so on:

     ADS Device specific variables.jpg

    Open the ADS Management console and open Job Templates, select the previously imported Bare Metal ESX Installation Job Template and from the Action menu, select Run Job to a Single Device or Set of Devices.

    Alternatively, open the ADS Management console and open Devices, select a device and from the Action menu, select Run Job. Select Use an Existing Job Template and select the previously imported Bare Metal ESX Installation Job Template.

    Finally, verify in the ADC MMC console the History and view the job's progress in the Job Details:

    ADS History Job Details.jpg 

    View sample Job Status report details:

    Bare metal ESX 3.0.1
    Job #: 1693
    Status: Succeeded
    Destination: 28
    Command:  
    Parameters:  
    Exit Code: 0
    Owner: Administrator
    Start: 25-4-2007 16:19:08
    End: 25-4-2007 16:20:20

     

     

    Output:


    Errors:


    Job #: 1694
    Status:  
    Destination:  
    Command: /bmonitor/bmpart.exe
    Parameters: \device\harddisk0 /init /C:2024 /A
    Exit Code: 0
    Owner: Administrator
    Start: 25-4-2007 16:19:08
    End: 25-4-2007 16:19:08

     

     

    Output:

    The Master Boot Record on the disk been re-initialized.
    Partition [1] Created with a Partition Size of [2030] MB.
    Partition [1] Activated.

    Errors:


    Job #: 1695
    Status:  
    Destination:  
    Command: /IMAGING/imgbmdeploy.exe
    Parameters: "drdosfat16" \device\harddisk0\partition1 -r -client
    Exit Code: 0
    Owner: Administrator
    Start: 25-4-2007 16:19:08
    End: 25-4-2007 16:19:37

     

     

    Output:

    Warning: the target volume size is different from the original one, this may make part of the disk space unuseable.
    Restore progress: 10% (1 of 14)
    Restore progress: 20% (2 of 14)
    Restore progress: 30% (4 of 14)
    Restore progress: 40% (5 of 14)
    Restore progress: 50% (7 of 14)
    Restore progress: 60% (8 of 14)
    Restore progress: 70% (9 of 14)
    Restore progress: 80% (11 of 14)
    Restore progress: 90% (12 of 14)
    Restore progress: 100% (14 of 14)

    Errors:


    Job #: 1696
    Status:  
    Destination:  
    Command: /BMONITOR/BmFileXfer.exe
    Parameters: -d "D:\esx301\images\pxeboot\vmlinuz" "\device\harddisk0\partition1\vmlinuz"
    Exit Code: 0
    Owner: Administrator
    Start: 25-4-2007 16:19:42
    End: 25-4-2007 16:19:42

     

     

    Output:

    File download done.

    Errors:


    Job #: 1697
    Status:  
    Destination:  
    Command: /BMONITOR/BmFileXfer.exe
    Parameters: -d "D:\esx301\images\pxeboot\initrd.img" "\device\harddisk0\partition1\initrd.img"
    Exit Code: 0
    Owner: Administrator
    Start: 25-4-2007 16:19:47
    End: 25-4-2007 16:19:48

     

     

    Output:

    File download done.

    Errors:


    Job #: 1698
    Status:  
    Destination:  
    Command: /BMONITOR/BmFileXfer.exe
    Parameters: -d "D:\esx301\dosutils\loadlin.exe" "\device\harddisk0\partition1\loadlin.exe"
    Exit Code: 0
    Owner: Administrator
    Start: 25-4-2007 16:19:53
    End: 25-4-2007 16:19:53

     

     

    Output:

    File download done.

    Errors:


    Job #: 1699
    Status:  
    Destination:  
    Command: /BMONITOR/BmFileXfer.exe
    Parameters: -d "D:\esx301\dosutils\autoexec.bat" "\device\harddisk0\partition1\autoexec.bat"
    Exit Code: 0
    Owner: Administrator
    Start: 25-4-2007 16:19:58
    End: 25-4-2007 16:19:58

     

     

    Output:

    File download done.

    Errors:


    Job #: 1700
    Status:  
    Destination:  
    Command: /BMONITOR/BmFileXfer.exe
    Parameters: -d "D:\esx301\ks.cfg" "\device\harddisk0\partition1\ks.cfg"
    Exit Code: 0
    Owner: Administrator
    Start: 25-4-2007 16:20:03
    End: 25-4-2007 16:20:03

     

     

    Output:

    File download done.

    Errors:


    Job #: 1701
    Status:  
    Destination:  
    Command: /BMONITOR/bmstrrep.exe
    Parameters: "\device\harddisk0\partition1\ks.cfg" "^ADS_COMPUTER_NAME^" "esx0666" "^ADS_DNS_SERVER^" "127.0.0.1,127.0.0.1" "^ADS_IP_ADDRESS^" "10.0.0.66" "^ADS_SUBNET_MASK^" "255.255.255.0"
    Exit Code: 0
    Owner: Administrator
    Start: 25-4-2007 16:20:03
    End: 25-4-2007 16:20:04

     

     

    Output:

    Performing string replacement within file [\??\D:\ks.cfg].
    String replacement completed.

    Errors:


    Job #: 1702
    Status:  
    Destination:  
    Command: d:\Microsoft ADS\tools\adsdevice.wsf
    Parameters: -e MAC001122334455 -newdescription "ESX host esx0666"
    Exit Code: 0
    Owner: Administrator
    Start: 25-4-2007 16:20:04
    End: 25-4-2007 16:20:05

     

     

    Output:

    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

    Errors:


    Job #: 1703
    Status:  
    Destination:  
    Command: /BMONITOR/reboot
    Parameters:  
    Exit Code: 0
    Owner: Administrator
    Start: 25-4-2007 16:20:05
    End: 25-4-2007 16:20:05

     

     

    Output:


    Errors:


    Job #: 1704
    Status:  
    Destination:  
    Command: /controller/adsdevice
    Parameters: /releasecontrol
    Exit Code: 0
    Owner: Administrator
    Start: 25-4-2007 16:20:05
    End: 25-4-2007 16:20:20

     

     

    Output:


    Errors:


How helpful was this article to you?

Related Articles

article How to Use Windows Server 2003 Automated System Recovery to Back Up a Remote Installation Services Server
SUMMARY This article describes how the...

(No rating)  5-22-2008    Views: 171   
article How to deploy and verify GPO deployment
This article deals with the mechanism of...

(No rating)  4-17-2008    Views: 201   
article How to Install VMware Tools in Linux
Without the VMware tools being installed,...

(No rating)  4-15-2008    Views: 226   

User Comments

Add Comment
No comments have been posted.