Perform Lift and Shift for Pre-Export Updates

It is advisable and sometimes necessary to prepare a VM for Private Cloud Appliance by making changes to the VM on the original source system. Perform the following pre-export update steps on a clone of the source system, not the original VM.

Caution:

Operate on a clone of the production image on the source system. This protects the production environment and provides a known fallback if the process needs to be repeated. Use a method provided by your source system for cloning a VM.

For example, in Oracle VM and Private Cloud Appliance 2.4, select the VM in the Servers and VMs tab, right click and select Clone. In all cases, stop the source VM to ensure that the clone has consistent disk contents.

Patch to Current Level of the Operating System

Update the clone VM to the current patch level of the same OS.

The instructions depend on the guest operating system. For example, yum update to the latest patch level for Oracle Linux 7 or 8, or pkg update on Solaris 11.4, or Windows Update on Microsoft Windows. Reboot after patching to ensure proper operation post-patching.

This ensures that the most recent device drivers are available and prevents risk from recently closed bugs and security exposures.

Note:

Oracle recommends the following if you currently are on Oracle Linux 6 or earlier:

  • Move to a current Oracle Linux version to ensure that the appropriate device drivers for PCA X9-2 are installed, and includes bug fixes and enhancements.
  • Perform a fresh OS installation rather than a lift and shift.

Change Virtual Network Devices to DHCP

The guest VM's virtual network may require several changes to work after being installed on Private Cloud Appliance.

Private Cloud Appliance uses DHCP to provide a network address to the new instances. Since multiple instances can be cloned from the same image, it makes sense to assign new MAC and IP addresses when each instance is created.

Note:

  1. The IP address acquired by DHCP when the instance is created is stable.
  2. The IP address visible to the instance is a private IP address on a virtual cloud network (VCN). The instance is accessed from outside the Private Cloud Appliance using a Network Address Translation (NAT) layer. See the Network tab in the Compute Enclave's instance description to see both private and public IP addresses.

On Linux, edit the file /etc/sysconfig/network-scripts/ifcfg-NICNAME and remove HWADDR or MACADDR lines and set BOOTPROTO="dhcp". Alternatively, you can use the graphical tool provided with your distribution. Additionally, remove the files /etc/udev/rules.d/70-persistent-ipoib.rules and /etc/udev/rules.d/70-persistentnet.rules if present. Those files contain MAC addresses that won't match the new instance. They are recreated automatically if needed.

Remove Exalogic-Specific Tools and Drivers

Follow these instructions to remove Exalogic OS components.

  1. Remove the InfiniBand RPM used with Exalogic infinibus-N.N.x86_64.
  2. Remove or move away the network definition files for the Infiniband devices:
    # cd /mnt/sysimage/etc/sysconfig/network-scripts
    # rm ifcfg-ib0.0004; rm ifcfg-ib1.0004
  3. Remove the OFED component:
    # /usr/sbin/ofed_uninstall.sh --force
  4. Shutdown and reboot.
  5. Bring up the virtual machines and configure virtual networks to your datacenter standards, creating /etc/sysconfig/network-scripts/ifcfg-eth* files to bring up the VM’s public and private networks. They should be different from the Exalogic VMs to permit parallel testing.

If you're using WebLogic, connect to the Oracle WebLogic Server console, and turn off the Exalogic enhancements by reversing the steps used to turn them on for Exalogic, in particular disabling Socket Direct Protocol (SDP). This is a best practice for Exalogic and is not supported for Private Cloud Appliance. See the Oracle Fusion Middleware Enterprise Deployment for Exalogic guide linked in the Explore More section.

When Exalogic VMs are identical other than hostname and IP address, you can stop the VM and clone it for additional members of the application cluster. Boot each VM up in turn to change its hostname and address to make them unique.

Install Linux Kernel and Driver Features for Private Cloud Appliance

The operating system may need to have VirtIO device drivers explicitly included at boot time.

Note:

If the source hypervisor is KVM you will already have the right drivers for Private Cloud Appliance.
  1. You can optionally backup kernels before running dracut. For example: mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
  2. Use the dracut command to add device drivers to initramfs. For example: dracut --force -N or dracut -N --regenerateall.
    • The -N option disables host only mode, which creates an initramfs only for the current host. This option produces a generic image.
    • If you are running on a very old version of Linux that does not have the -N option, specifically list the kernel modules needed for Private Cloud Appliance X9-2. For example: dracut --add-drivers 'sg sd_mod virtio virtio_pci virtio_ring virtio_scsi'.
    • The --regenerate-all option regenerates initramfs for all kernel versions in /boot, not just the one currently booted. This is useful for Oracle Linux to ensure that both UEK and RHCK kernels get the needed drivers, regardless of which is currently booted.
    • The option --force overlays the current initramfs file already present.

You can see the updated initramfs files in /boot. They will be larger than previous versions because of the added device drivers.

If you omit the dracut step, you can perform it the first time the instance is launched on Private Cloud Appliance X9-2.

  1. Log in to the Compute Enclave.
  2. Select the instance and connect to the console.
  3. Select the rescue line in the Grub menu.
  4. If boot fails before you can select the rescue boot, run a Reset action on the instance from the Compute Enclave.
  5. After the instance boots, log in and run the dracut commands.

Optionally Install Initialization Toolkits

You're encouraged to install the cloud-init (Linux) toolkit.

These toolkits are industry-standard, vendor-agnostic methods for cross-platform instance initialization. They help identify that the cloud instance is running during boot, read any provided metadata from the cloud, and initialize the system accordingly. They're capable of converting from password-based ssh to using a key-pair exchange. See section 6.4 of the Oracle Private Cloud Appliance User Guide for more information.

On Oracle Linux, install the cloud-init and oci-utils packages suitable for your Linux distribution. Use the following for Oracle Linux 8:

# dnf install yum-utils
# yum-config-manager --enable ol8_addons
# dnf install cloud-init oci-utils

Then ssh into the launched instance with userid opc without a password, using the key pair exchange described in the cited references.

Prepare Startup and File System

The image only contains the boot disk, so disable any boot-time services and applications that require other disks.

References to non-boot file systems must be removed until they're recreated later. If the boot image refers to other disks for swap, /tmp, or /var/logs, then they must be temporarily moved to the boot volume.

Follow these steps on Linux:

  1. Edit /etc/fstab.
  2. Remove entries to file system mounts that are not on the boot disk.
  3. Ensure that any boot disk partitions are not directly referenced by device names such as /dev/xvda.
  4. Instead use LABEL= or UUID=.
  5. References to LVM devices don't need to be modified if you're referring to the boot disk.
  6. Run the pvs command to ensure that the only LVM physical volume (PV) is the boot volume.
  7. If a volume group (VG) is on other physical volumes it should be commented out of /etc/fstab.

If a logical volume consists of both the boot and other disks then the migration is more complicated and out of the scope of this solution.

Disable any services or applications that launch at boot time and require full configuration, since the initial launch on Private Cloud Appliance X9-2 will not have the complete operational environment.