Using RPM/Debian Packages for Proprietary Operating Systems on Virtual Appliances

InstallAnywhere 2020

If you create OS packages that are proprietary and not part of the standard Ubuntu or CentOS ecosystem, you can include them in your virtual appliance. To do so, bundle your OS package as an RPM or Debian package. InstallAnywhere offers two techniques for including standalone RPM/Debian packages as part of your appliance build: as OS packages or as installers.

Including a Standalone RPM/Debian Package as an OS Packages

To include a standalone RPM/Debian package as an OS package:

1. Prepare an XML file:
a. Open the following schema file:

$IA_HOME$/resource/ospackages/ospackages.xsd

b. Write a separate XML file that conforms to this .xsd for your RPM package. For example, for an RPM file named abc.rpm, the XML file might look like this:

<?xml version="1.0" encoding="UTF-8"?>

<ospackages>

    <package>

        <displayName>My ABC RPM package</displayName>

        <version>1.0</version>

        <internalName>abc.rpm</internalName>

        <description>Installs the ABC software</description>

        <operatingSystem>centos</operatingSystem>

        <packageType>rpm</packageType>

        <packageLocationType>file</packageLocationType>

        <packageFileLocation>xyz/abc.rpm</packageFileLocation>

    </package>

</ospackages>

Configure the content for the packageLocationType and PackageFileLocation elements.

c. Copy your RPM file into the following directory:

$IA_HOME$/resource/ospackages/xyz

d. Restart InstallAnywhere.
2. Add the OS package to the VM tier for your VM configuration:
a. In the Advanced Designer, on the Build page, click Build Appliances. The Build Appliances view opens.
b. Click the Appliance Configuration tab.
c. In the Select Appliance Configuration list, select the appliance configuration that you want to customize.
d. Click the VM Configuration tab.
e. For VMware vSphere appliances: In the Select VM Tier list, select the VM tier that you want to configure.
f. Click the OS Packages subtab. All of the OS packages that are available to install are listed in the Packages Available to Install list.
g. In the Packages Available to Install list, select the RPM/Debian package that you want to add and click the Add button.

InstallAnywhere adds the OS package to the Packages Selected to Install list.

To install a Debian package, use the following syntax:

dpkg -i internalNameOfPackage

To install an RPM package, use the following syntax:

rpm -i --force --quiet internalNameOfPackage

Including a Standalone RPM/Debian Package as an Installer

To include a standalone RPM/Debian package as an installer:

1. In the Advanced Designer, on the Build page, click Build Appliances. The Build Appliances view opens.
2. Click the Appliance Configuration tab.
3. In the Select Appliance Configuration list, select the appliance configuration that you want to customize.
4. Click the VM Configuration tab.
5. For VMware vSphere appliances: In the Select VM Tier list, select the VM tier that you want to configure.
6. Click the Installers subtab.
7. Click the appropriate tab to indicate when you want the installer to be executed. Available options are:
Build Time—Build-time installers are mostly used to push payload for the software appliance.
First Boot Time— If some configuration needs to be performed before installation, use the First Boot Time installer tab. First-boot-time installers are executed the first time that the virtual appliance is booted.
8. Click the Add Installer button. The Add Installer dialog box opens.
9. Select the Other installers option.
10. Click the Choose button next to the Choose executable box, and then select the RPM or Debian file.
11. In the Installation Command setting, enter one of the following:
For a Debian package:

dpkg -I @@executable@@

For an RPM package:

rpm -i --force --quiet @@executable@@

12. Click OK.