Adding a Linux
Operating System Image

Create a
directory for the operating system image in the
/opt/cnsaroot/images directory of the
Baremetal Agent
VM.

mkdir /opt/cnsaroot/images/image_name

This directory
is used to store the operating system image files required for PXE
installation.

Note

This directory
name is included in the
OS
Type drop-down list in the Setup PXE Boot task. We recommend that
you make the directory name descriptive enough that you can identify the
operating system of the images within it. For example, we recommend that you
name the directory
RHEL6.2 or
CentOS5.

Step 2

Create a
directory for the operating system image with the same name as the one that you
created in Step 1 in the
/opt/cnsaroot/templates directory of the
Baremetal Agent
VM.

mkdir /opt/csnaroot/templates/new_image_name

This directory
is used to store the Kickstart and PXE configuration template files for the
operating system image.

Step 3

Copy the
.iso file or files for the required operating system
to the
/tmp directory of the
Baremetal Agent
VM.

Step 4

Mount the
.iso file to the
iso directory.

mount –o loop /tmp/.iso_file/mnt/iso

Step 5

Copy the entire
contents of the
.iso file to the
/opt/cnsaroot/images/image_name directory that you created in
Step 1.

cp –R /mnt/iso/* /opt/cnsaroot/images/image_name

Note

Make sure that
you use the
cp –R command
to recursively copy the entire contents of the
.iso file. This command copies the underlying
directories and their contents also.

Step 6

When the copy
operation is complete, unmount the
.iso file.

umount /mnt/iso

Step 7

If the operating
system image consists of more than one
.iso file, repeat Steps 5, 6, and 7 for each
.iso file until the contents of all
.iso files have been copied to the
/opt/cnsaroot/images/image_name directory.

Step 8

Create a
ks.cfg file and a
pxe.cfg file in the
/opt/cnsaroot/templates/image_name directory that you created in
Step 2.

Create a soft
link in the
/var/www/html directory for this operating system
image.

ln –s /opt/cnsaroot/images/image_name/var/www/html/

Step 11

(Optional)If necessary,
update the
initrd.img and
vmlinuz files for the operating system image as
follows:

Copy the
initrd.img and
vmlinuz files from the
/opt/cnsaroot/images/image_name directory to the
/opt/cnsaroot/ directory.

Overwrite
the current files in this location.

Step 12

In
Cisco
UCS Director,
verify that the operating system image is available from the
OS
Type drop-down list in the Setup PXE Boot task.

Wait two minutes, or for whatever duration has been set for the
Baremetal Agent
synchronization frequency. By default,
Baremetal Agent
is synchronized with
Cisco
UCS Director
every two minutes. You can change this frequency with the
bma.sync.frequency property in
service.properties.template file
under /opt/infra in the
Baremetal Agent
VM.

Adding a VMware
vSphere ESXi Operating System Image

Step 1

Create a
directory for the operating system image data in the
/opt/cnsaroot directory of the
Baremetal Agent
VM.

mkdir /opt/cnsaroot/images

This directory
is used to store the operating system image files required for PXE
installation.

Note

This directory
name is included in the
OS
Type drop-down list in the Setup PXE Boot task. We recommend that
you make the directory name descriptive enough that you can identify the
operating system of the images within it. For example, we recommend that you
name the directory
ESXi5.0-update1 or
ESXi5.1.

Step 2

Create a
directory for the operating system image with the same name as the one that you
created in Step 1 in the
/opt/cnsaroot/templates directory of the
Baremetal Agent
VM.

mkdir /opt/csnaroot/templates/new_image_name

This directory
is used to store the Kickstart and PXE configuration template files for the
operating system image.

Step 3

Copy the
.iso file or files for the required operating system
to the
/tmp directory of the
Baremetal Agent
VM.

Step 4

Mount the
.iso file to the
iso directory.

mount –o loop /tmp/.iso_file/mnt/iso

Step 5

Copy the entire
contents of the
.iso file to the
/opt/cnsaroot/image_name directory that you created in
Step 1.

cp –R /mnt/iso/* /opt/cnsaroot/image_name

Note

Make sure that
you use the
cp –R command
to recursively copy the entire contents of the
.iso file. This command copies the underlying
directories and their contents also.

Step 6

When the copy
operation is complete, unmount the
.iso file.

umount /mnt/iso

Step 7

If the operating
system image consists of more than one
.iso file, repeat Steps 5, 6, and 7 for each
.iso file until the contents of all
.iso files have been copied to the
/opt/cnsaroot/image_name directory.

Step 8

Create a
ks.cfg file and a
pxe.cfg file in the
/opt/cnsaroot/templates/image_name directory that you created in
Step 2.

Edit the
boot.cfg file in the
/opt/cnsaroot/templates/image_name directory as follows:

After the
title= line, add a
prefix=/image_name/ line.

Append
pxebooting ks=$PXE_KS_URL to the end of the
kernelopt=runweasel line.

Remove the
leading
/ from all modules listed in the
boot.cfg file.

Save the
edited file.

Step 12

In
Cisco
UCS Director,
verify that the operating system image is available from the
OS
Type drop-down list in the Setup PXE Boot task.

Wait two
minutes, or for whatever duration has been set for the
Baremetal Agent
synchronization frequency. By default,
Baremetal Agent
is synchronized with
Cisco
UCS Director
every two minutes. You can change this frequency with the
bma.sync.frequency property in
service.properties.template file
under
/opt/infra in the
Baremetal Agent
VM.