IBM® provides various OS images that have been
tested with imbedded pattern contents and are pre-optimized for performance and security
considerations. However, in some cases you may want to use your own OS image. IBM OS Pattern Kit allows you to onboard your own operating system image in to
Cloud Pak System and transform that image by
adding capabilities required for pattern-based deployment.
Before you begin
You must provide a virtual appliance OVA, which consists of your basic operating system. The
following operating systems are supported:
You can create a new virtual machine in VMware by using various methods. Whether you
clone from an existing virtual machine, deploy from a template, or create your own, ensure that VMware Tools is installed on the virtual machine
that you are using. For RHEL 6.x, to install VMware Tools on a running virtual machine in
vSphere Client, left-click the virtual machine, select and go to the virtual machine console to complete the installation.
Tip: The InstallRHEL.sh script
that is provided in OS Pattern Kit is not updated for the Red Hat Enterprise Linux (RHEL) 8.x custom OVA
creation. Due to this limitation, you cannot create a Red Hat Enterprise Linux (RHEL) 8.x OVA by using the
ISO file. As a workaround, you can use the default Red Hat Enterprise Linux (RHEL) 8.x OVA that is
bundled in the IBM Cloud Pak System default data. You can
also use the OS Pattern Kit software to create a custom Red Hat Enterprise Linux (RHEL) 8.x virtual
image.
In 2.3.3.3 or later: For RHEL 7.x virtual machines, install open-vm-tools as
follows.
RHEL 7.x images support only
open-vm-tools instead of
VMware tools in
IBM Cloud Pak System.
VMware suggests
open-vm-tools,
and these tools are the open source implementation of
VMware tools and provides the same function. You
must remove the existing
VMware tools from
the virtual machine. After you remove the
VMware tools, complete these steps to install
open-vm-tools on the virtual machine.
- SSH to the virtual machine, connect to the Red Hat subscription server, and enable all
repositories for RHEL 7.x
- Search for
open-vm-tools by running the following
command.yum search open-vm-tools
- Run the following commands one by one to install
open-vm-tools and to enable
vmtoolsd.service.yum install open-vm-tools.x86_64
systemctl start vmtoolsd.service
systemctl enable vmtoolsd.service
To verify the
vmtoolsd service status after installation, run the following
command and verify the
output.
systemctl status vmtoolsd.service
If the service is
in running state, the installation of
open-vm-tools is completed successfully. For
more information about
open-vm-tools, see these links:
If you do not have a virtual appliance OVA, follow the steps in Creating OVA files to create an OVA which can be used in Cloud Pak System.
About this task
Follow these steps to create a virtual system instance
using your own working operating system.
Procedure
- Follow the steps in Adding virtual appliances to import
your own base operating system image as a virtual appliance (OVA)
in to Cloud Pak System.
- Follow the steps in Deploying virtual appliances to
deploy the virtual appliance and create a running virtual machine.
Important: When you export your
own operating system image from VMware to
then import and deploy it into Cloud Pak System,
the image does not include Activation Engine. You can set the virtual
machine configuration no_activation_engine option
to true if you want to use VMware guest
OS customization for automated network configuration. If your virtual
appliance image is not compatible with VMware guest
OS customization, you can set no_activation_engine to false and
use the virtual machine console to configure your network later.
- Follow the steps in Starting and stopping virtual machines to start the
virtual machine.
- If the IP address is unavailable after you have deployed the virtual
appliance, follow these steps to configure the network:
- Access the Cloud Pak System
console pane. Click
(or if in 2.3.3.3 or later).
Select the virtual machine that you specified during the virtual appliance deployment step.
The detailed information for that virtual machine is displayed.
- Scroll to IP addresses and record the IP
address, Netmask, and Gateway of the
virtual machine.
- Click the Console icon in the toolbar to establish a connection
to the virtual machine console.
You must have root access to configure the network.
- Run the following commands to configure the network:
ifconfig eth1 <ip address> netmask <netmask> up
route add default gw <gateway>
Important: For Red Hat Enterprise Linux
(RHEL) 7.7, Red Hat Enterprise Linux (RHEL) 7.8
in 2.3.3.3, Red Hat Enterprise Linux (RHEL) 7.9
in 2.3.3.3 interim fix 1, Red Hat Enterprise Linux (RHEL) 7.9 and 8.4 in 2.3.3.4, and Red Hat Enterprise Linux (RHEL) 7.9 and
8.6 in 2.3.3.5 and 2.3.3.6, if your
network device name field is not defined as
ethx, you must first run the
following commands to disable consistent network device
naming:
sed -i 's/rhgb quiet/biosdevname=0 net.ifnames=0 rhgb quiet/' /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg
shutdown -r now
After the system reboot, the network device name field will appear as
ethx and you can continue configuring the network.
- Configure and start SSH service to log
in to the virtual machine.
- Download and install enablement packages for preferred
supported systems.
- From the virtual machine, issue the following command to
reset the virtual machine.
AE.sh --reset
This
action will power off the virtual machine.
- Use one of the following procedures to create a new image
of an existing virtual machine.
Note: A virtual machine
may be left in an unmanageable state if you perform this step against
a virtual machine that is from a virtual system pattern deployment
instead of a virtual appliance deployment. From the console, the virtual
system instance will appear in the launching state
but you will not be able to launch the instance. You should delete
this virtual system instance.
- Follow the steps in Creating virtual images from existing virtual machines.
- Use the following CLI commands to create a new image of the virtual machine by specifying
the new image name, version, virtual machine id (vmid), and the url to metadata OVA (using the
corresponding metadata OVA).
>>> vm=admin.virtualmachines.list({'name':'name_of_virtual_machine'})[0]
where name_of_virtual_machine is the name of the virtual machine as deployed from
the virtual appliance under consideration (or a partial name that can uniquely identify the virtual
machine).
>>> deployer.virtualimages.create({'url':'url_of_metadata_file','vmid':vm.id,'name':'name_of_virtual_image','version':'version_of_virtual_image','description':'description_of_virtual_image'})
where
- URL of the url_of_metadata_file is the URL of the metadata OVA file which
your Cloud Pak System can access. You can
provide the metadata OVA file in one of the following ways:
- name_of_virtual_image is the name given to the virtual image to be
created.
- version_of_virtual_image is the version of the provided virtual image.
- description_of_virtual_image is the description of the provided virtual
image.
For
example:>>> vm=admin.virtualmachines.list({'name':''My RHEL 6.5 VM 2''})[0
>>> deployer.virtualimages.create({'url':'http://172.16.15.250/jobs/MAESTRO_LINUX_OS_IMG_METADATA_OVA/lastSuccessful/archive/MAESTRO_LINUX_OS_IMG_METADATA_2.1-11.ova','vmid':vm.id,'name':'BYOS RHEL 6.5','version':'1.0.0.0','description':'My RHEL 6.5 Image for pattern deploy'})]
For example (when using
ssh):
>>> vm=admin.virtualmachines.list({'name':''My RHEL 6.5 VM 2''})[0
>>> deployer.virtualimages.create({'url':'172.16.15.250:/jobs/MAESTRO_LINUX_OS_IMG_METADATA_OVA/lastSuccessful/archive/MAESTRO_LINUX_OS_IMG_METADATA_2.1-11.ova','vmid':vm.id,'name':'BYOS RHEL 6.5','version':'1.0.0.0','description':'My RHEL 6.5 Image for pattern deploy'})]
- Inspect the virtual image by following the steps in Viewing and modifying virtual images. Accept the license agreement
if it has not yet been accepted.
- Once the new image is successfully created, verify the
new image by creating a virtual system pattern using the image component
from this new image. Follow steps in Creating virtual system patterns.
What to do next
You can use the virtual image for virtual system and virtual
application deployment. You do not have to repeat the above procedure
to make changes to the image. See Extending and capturing virtual images to
learn how to make changes to an image.