To create a custom image for Linux®, manually order
an Azure VM with a base Linux image. Then, customize the VM
by installing IBM® Spectrum Symphony.
Procedure
-
Use SSH to connect to the Azure VM and upload the IBM Spectrum Symphony installer and
entitlement file to the VM:
scp sym-version_architecture.bin account_name@vm_ip:/home/account_name
-
Update the Administrator user (root) password and switch to the Administrator user (root):
-
Update the /etc/hosts file on the Azure VM to add the host names of the
primary host and primary host candidates in your
IBM Spectrum Symphony cluster.
If the
ego.conf file in your cluster uses a short name for the primary host, add the short name of
the host as well. For
example:
cat /etc/hosts
198.51.100.4 localhost.localdomain localhost
192.0.2.3 symcompute.azure.com symcompute
192.0.2.5 symprimary.mycompany.com symprimary
-
Use root or sudo to install IBM Spectrum Symphony on the VM as a
compute host.
-
Install IBM Spectrum Symphony (see Installing on a Linux compute host), for
example:
export BASEPORT=30600
export CLUSTERADMIN=root
export CLUSTERNAME=cloud
export DERBY_DB_HOST=symcompute.azure.com
export SIMPLIFIEDWEM=N
export EGOCOMPUTEHOST=Y
export IBM_SPECTRUM_SYMPHONY_LICENSE_ACCEPT=Y
./sym-version_architecture.bin
Note: Do not install IBM Spectrum Symphony to your home directory because the directory is cleaned up before IBM Spectrum Symphony is started to
create an image of the VM. Choose to install to (for example) /opt.
-
Source the environment for your shell; for example, when you use BASH, enter:
. $EGO_TOP/profile.platform
-
Join the VM to the cluster (see Adding a host to a cluster); for example, enter:
egoconfig join symprimary
-
Create the image of the VM.
-
On the custom VM that was manually created, run the following command:
-
From the machine on which you installed the Azure CLI, run the following commands:
az vm deallocate -g "resource_group_name" -n "instance_name"
az vm generalize -g "resource_group_name" -n "instance_name"
az image create -n "image_name" -g "resource_group_name" --os-type Linux --source "instance_name"
where:
- resource_group_name is the name of the Azure resource group that this VM
belongs to.
- instance_name is the name of the Azure VM that you ordered.
- image_name is the name chosen for the custom Linux image.
What to do next
After creating your custom image, configure a post-provisioning script for greater flexibility in
managing your configuration. See Configuring post-provisioning for Azure on Linux.