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
To deploy virtual system and virtual
application workloads running Microsoft Windows, you must use your
own virtual machine to create a custom Windows image.
You must provide a virtual appliance OVA which consists of your basic operating system. The
following operating systems are supported:
- Microsoft Windows Server 2016 (64-bit)
- Microsoft Windows Server 2019 Datacenter Edition (64-bit)
- Microsoft Windows Server 2019 Standard Edition (64-bit)
If you do not have a virtual appliance OVA, follow the steps in
Create and configure Windows virtual machines to export ova files to create an OVA which can be used in
Cloud Pak System.
The following add-ons are supported:
- Default Windows attach block disk
- Default Windows add disk
- Default configure NIC
- Default Windows add NIC
Auto and manual scaling are supported with the following limitations:
- Horizontal scaling is not supported.
- Vertical auto-scaling only works to increase virtual CPU or virtual memory. Decreasing virtual
CPU or virtual memory is not supported.
Tip: You can configure virtual machine settings
to increase virtual CPU or virtual memory. The operation can be launched by first setting the
instance to maintenance mode. Next, expand the virtual machine perspective of the instance. Click
the Edit icon from the Manage drop down menu to make
your updates.
Note: The following component policies do not work with Windows images:
- Placement Policy
- Routing policy
- Security policy
- Network redirector policy
- GPFS Client policy
- IM Policy
- DB Proxy Policy
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.
Important: The OVA exported from a VMware ESXi host may contain an incorrect OS ID in
the OVF for the Windows Operating system. Follow these steps to correct the OS ID before you import
it as a virtual appliance:
-
Run the following command to extract the .ova file:
tar -xvf <virtual appliance>.ova
-
Open the .ovf file for editing and locate the
OperatingSystemSection portion of the file contents.
If you find
ovf:id='<integer value>', replace the
integer value with one of the following:
- 103 (Microsoft Windows Server 2008 R2)
- 116 (Microsoft Windows Server 2012 R2)
- 117 (Microsoft Windows Server 2016)
- 117 (Microsoft Windows Server 2019) (64-bit)
- If the vmw:osType attribute is present, set a valid value for the
vmw:osType attribute. Refer the VMware documentation to make sure the
osType attribute is using a valid value.
- If the vmw:osType attribute is not present, add this attribute and set a
valid value. Refer the VMware documentation to make sure the
osType attribute is using a valid value.
- If you use Windows Server 2019, make sure that value of the vmw:osType
attribute is set to windows9Server64Guest. You can also update the string in
the Description attribute from
Microsoft Windows Server 2016
(64-bit) to Microsoft Windows Server 2019 (64-bit).
-
Remove the files with extension .iso and .mf, and run
the following command to repackage the .ova image:
tar -cvf <virtual appliance>.ova <virtual appliance>.ovf <virtual appliance>.vmdk virtual appliance.nvram
-
Follow the steps in Deploying virtual appliances to deploy the virtual appliance and
create a running virtual machine. In the Configure and Deploy Virtual appliances dialog, set
Perform Guest Operating system customization attribute to
true.
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 Perform guest operating system
customization configuration 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
Perform guest operating system customization 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, you must manually configure the network in
the Windows virtual machine console.
Reboot the virtual
machine. Verify that you have connectivity, and that remote desktop
and file sharing are available.
- Download the Pattern Kit for Windows.
Go to the Cloud Pak System
Welcome page and click
- Perform the following steps to install the Pattern Kit
for Windows.
The
.ova file is located
in the enablement package.
- Copy the compressed file to the virtual machine and extract the
enablement package.
- Open a cmd prompt and modify the directory
to point to the location to which you extracted the Pattern Kit package.
It is recommended to use Windows PowerShell command shell.
- Execute the following command to install the pattern kit:
ae-installer-windows.cmd > mylog.log 2>&1
- Check mylog.log to verify your installation.
- Add C:\Python27 to the
Path system
environment variable.
-
Run the following command in a new cmd prompt window or PowerShell
command shell to reset the virtual machine:
c:\windows\setup\ibm\AE.bat --reset
Ensure that your virtual machine is
powered off before proceeding to the next step.
-
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_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 Windows 2012 VM 2''})[0
>>> deployer.virtualimages.create({'url':'http://myserver.ibm.com:8080/data/0.OS_Images/job/MAESTRO_WINDOWS_OS_IMG_METADATA_OVA/lastSuccessfulBuild/artifact/MAESTRO_WINDOWS_OS_IMG_METADATA_2.2-15.ova','vmid':vm.id,'name':'BYOS Windows 2012','version':'1.0.0.0','description':'My Windows 2012 Image for pattern deploy'})]
For
example (when using
ssh):
>>> vm=admin.virtualmachines.list({'name':''My Windows 2012 VM 2''})[0
>>> deployer.virtualimages.create({'url':'172.16.15.250:/job/MAESTRO_WINDOWS_OS_IMG_METADATA_OVA/lastSuccessfulBuild/artifact/MAESTRO_WINDOWS_OS_IMG_METADATA_2.2-15.ova','vmid':vm.id,'name':'BYOS Windows 2012','version':'1.0.0.0','description':'My Windows 2012 Image for pattern deploy'})]
Important: Due to current limitations, you must use the word "Windows" for the image name
attribute.
- 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.