This page describes how to create a base image from an install media.
These instructions are broken up into parts to assist in providing detailed instructions based on the supported provisioning modules and Operating Systems. The supported provisioning methods for VCL are (xCAT, VMware, and KVM).
{{% toc %}}
Before getting started make sure you have the following requirements completed or on hand:
The following must be done before an image can be captured:
These instructions assume you have root access on your management node and are using a bash shell.
The instructions assume that VMware has been configured with the following bridged networks:
Private: bridged to private interface: eth0
Public: bridged to public interface: eth1
Launch the vSphere Client, connect to the ESXi host and login
Click File > New > Virtual Machine
Configuration: Custom
Name: (doesn't matter)
Select a datastore where the VM will reside
Virtual Machine Version: 7
Select the appropriate guest OS
Number of virtual processors: 1
Memory: 4GB
How many NICs: 2
SCSI controller: LSI Logic Parallel
Create a new virtual disk
Edit the virtual machine settings before completion: Yes
In the Hardware pane, select Add...
Under MAC Address, select Manual
Enter the private MAC address you retrieved earlier
Click Finish
The requirement in this section is to have a working xCAT system.
Power on the VM and follow the installation instructions for the Linux distribution and version you are installing.
On the Linux computer being captured, create a /root/.ssh directory:
mkdir /root/.ssh
On the management node, copy the public SSH identity key to the authorized_keys file on the Linux computer being captured:
scp /etc/vcl/vcl.key.pub <hostname or IP address>:/root/.ssh/authorized_keys
Or replace the above two steps with the following on the management node:
ssh-copy-id -i /etc/vcl/vcl.key <hostname or IP address>
Make sure you can login from the management node to the Linux computer being captured using the identity key:
ssh -i /etc/vcl/vcl.key <hostname or IP address>
Configure the ifcfg-* Files
Navigate to the network-scripts directory:
cd /etc/sysconfig/network-scripts
Delete any ifcfg-*.bak files:
rm -f /etc/sysconfig/network-scripts/ifcfg-*.bak
Edit every ifcfg-eth* file in the network-scripts directory. Remove the HWADDRESS= line if it exists:
vi ifcfg-eth0 vi ifcfg-eth1
The ifcfg-eth0 file should contain the following:
DEVICE=eth0 BOOTPROTO=dhcp ONBOOT=yes
The ifcfg-eth1 file should contain the following:
DEVICE=eth1 BOOTPROTO=dhcp ONBOOT=yes
Reboot the computer:
shutdown -r now
Check the ifcfg-eth* files to make sure there are no new ifcfg-eth* files and that the HWADDRESS= lines have not been automatically added back:
ls /etc/sysconfig/network-scripts cat /etc/sysconfig/network-scripts/ifcfg-eth0 cat /etc/sysconfig/network-scripts/ifcfg-eth1
Run the following command on the management node:
/usr/local/vcl/bin/vcld --setup
Navigate through the menu options to capture the image
The following happens once you enter an image name and press enter:
Watch the vcld logfile output to determine if the image capture process is successful or terminated because a problem occurred. When the capture process terminates, there will either be a message near the end of the output saying “image capture successful” or there will be several WARNING messages, the last of which says something to the effect “image failed to be captured”. Further troubleshooting is required if the image fails to be captured.
The vcld --setup utility does not add the new base image to any image groups. You must add the image to an image group using the VCL website after the image capture process is complete. Reservations for the image cannot be made until this is done. To add the image to an image group, browse to the VCL website and select Manage Images > Edit Grouping & Mapping.