Perform 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.
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:
- The IP address acquired by DHCP when the instance is created is stable.
- 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.
On Solaris use the ipadm
command. For example:
# ipadm delete-addr net0/v4
# ipadm create-addr -T dhcp net0/v4
On Windows, use the Control Panel or Settings.
Remove Virtual Machine Tools and Drivers
If you are migrating from VMware or Oracle VM or VirtualBox, remove associated paravirtualization drivers and tools from the clone. The image will work with the tools and drivers installed, though you may see error messages at boot time or when logging in, so this is optional.
For example, you can remove the Oracle VM Paravirtualization (PV) drivers for Microsoft Windows by locating the drivers in Control Panel, then right-clicking and selecting Uninstall.
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.- You can optionally backup kernels before running
dracut
. For example:mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
- Use the
dracut
command to add device drivers toinitramfs
. For example:dracut --force -N
ordracut -N --regenerateall
.- The
-N
option disables host only mode, which creates aninitramfs
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 regeneratesinitramfs
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 currentinitramfs
file already present.
- The
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.
- Log in to the Compute Enclave.
- Select the instance and connect to the console.
- Select the rescue line in the Grub menu.
- If boot fails before you can select the rescue boot, run a Reset action on the instance from the Compute Enclave.
- After the instance boots, log in and run the
dracut
commands.
Install Solaris 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 PCA.- Oracle strongly urges Solaris 11 users to upgrade to Solaris 11.4, which is a straightforward procedure and highly compatible. Move Solaris 10 environments by creating Solaris 10-branded non-global zones in a Solaris 11.4 instance. That lets the Solaris 10 environment benefit from the modern kernel and device drivers.
- Update Solaris 11.4 to the latest SRU by using the
pkg update
command and booting into the new boot environment.
Install VirtIO Drivers for Windows
You will need to install kernel and driver features for Oracle Private Cloud Appliance. You can download from My Oracle Support or from the Oracle Software Delivery Cloud. Here's how to get them for Windows operating systems.
For Oracle Software Delivery Cloud:
- Log into the Oracle Software Delivery Cloud.
- In the All Categories List, select Release.
- Type Oracle Linux and click Search.
- Select
DLP: Oracle Linux N.N.0.0.0 ( Oracle Linux )
. The values of N will be different as new releases are made available. - Click Continue.
- In the Platforms / Languages column, select x86 64 bit in the list and then click Continue.
- Accept the Oracle Standard Terms and Restrictions and click Continue.
- Click the file name that has the description
Oracle VirtIO Drivers for Microsoft Windows, version N.N.N
to download the drivers. The current version at this writing is V1009702-01.zip. The version number will change as new releases are delivered. - Download the zip file to your Windows VM.
- Install the drivers by extracting the zip and then double clicking on the Setup file. When complete, restart and shut down.
To download from My Oracle Support:
- Sign in to My Oracle Support.
- Select the Patches & Updates tab.
- In the Patch Search panel, in the Patch Name or Number field, enter 27637937 and click Search. Do not select any of the Platform options.
- Click the Patch Name to the left of
Oracle VirtIO driver version N.N.N
. For example, version 2.0.1. - From the Patch Details page, click Download.
- Install the drivers by extracting the zip and then double clicking on the Setup file. When complete, restart and shut down.
Optionally Install Initialization Toolkits
You're encouraged to install the cloud-init
(Linux) or cloudbase-init
(Solaris, Windows) toolkits.
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
On Solaris, issue pkg install cloudbase-init
as described in the Installation and Software Management Features Solaris 11.4 What's New document.
Then ssh
into the launched instance with userid
opc
without a password, using the key pair exchange described in the cited references.
The preceding steps disable password-based authentication. If you want to continue using password-based ssh
authentication on the target system to ensure it operates like the source platform, it can be re-enabled before export by editing /etc/cloud.cfg
and adding the line:
ssh_pwauth: 1
Alternatively, you can do this before export by commenting out the following line in /etc/ssh/sshd_config
:
# PasswordAuthentication no
On Windows instances, use cloudbase-init, as described in the Cloudbase-init documentation.
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:
- Edit
/etc/fstab
. - Remove entries to file system mounts that are not on the boot disk.
- Ensure that any boot disk partitions are not directly referenced by device names such as
/dev/xvda
. - Instead use LABEL= or UUID=.
- References to LVM devices don't need to be modified if you're referring to the boot disk.
- Run the
pvs
command to ensure that the only LVM physical volume (PV) is the boot volume. - 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.
Follow these steps on Solaris:
- Edit
/etc/vfstab
. - Remove any mounts not on the boot disk.
- Run the
zpool export $POOLNAME
command for non-rootZFS
pools. Typically, those areZFS
pools other thanrpool
.
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.