VM Images and Templates in OLVM

Peter Goldthorp, Dito. February 2022

Instructions and notes for VM template and image management in OLVM

ISO image upload

  1. Download an iso image to your laptop
  2. Navigate to the Storage - Disks and select Start from the upload drop down

    Upload iso image OLVM

  3. Select the image you want to upload and hit the Test Connection button

    OLVM image upload dialog

  4. Hit OK to upload the image if the connection shows a green connection successful message
  5. Install TLS Cert if the connection fails

    OLVM upload image failure

    • Google Chrome:
      1. Open Settings > Advanced >Manage certificates
      2. This will open a Certificates pop-up window
      3. Navigate to the “Trusted Root Certification Authorities” and import the downloaded certificate
    • Mozilla Firefox:
      1. Open Options > Privacy & Security > Certificates
      2. Then click on “View Certificates” and this will open a Certificate Manager pop-up window
      3. Navigate to the Authorities tab and import the downloaded certificate.
      4. While importing the certificate check the “Trust this CA to identify websites” checkbox.

Create a VM from the ISO image

Make sure your computer has virt-viewer installed. This can be setup using yum|dnf|apt-get install virt-viewer on linux or by downloading a Windows MSI from the VMM Website. Note virt-viewer is not supported on Mac OS X.

  1. Navigate to the Compute - Virtual Machines and hit New

    Create new VM

  2. Hit the Create button under Instance Images to create one or more disks for the VM

    Create VM Disks

  3. Select Server in the Optimized for drop down, supply a name and select a network interface profile

    VM General

  4. Click on System (Hit the Advanced Options to expand the menu you don’t see a Systems item). Edit the Memory, Virtual CPU and Hardware Clock time. Note if the KVM host has been configured with hyper-threading enabled 2 virtual CPUs = 1 core.

    VM System

  5. Click on Boot Options. In the Boot Sequence section set the First Device to CD-ROM. Check the Attach CD checkbox and select the ISO image from the drop down

    VM Boot Options

  6. Hit OK

  7. The New VM should appear in the VM list with a status of Down

    Starting a VM

    Start the VM and use the Console to install the OS from the iso image

    1. Select the VM row
    2. Hit the Run button
    3. Hit the Console button to launch a console window in virt-viewer (it may take 30 seconds for the Console button to become enabled)
  8. Follow the setup instructions in the OS installer
    • OEL 7 Install Guide
    • OEL 8 Install Guide
    • Assign an a static IP address and FQDN during installation
    • Set the following partition sizes for database server VMs
        root  30G
        /home 50G
        /sw   75G
        /u01  25G
      
    • Verify the assigned values are recorded in the /etc/hosts files on dns servers
    • Set the DNS search order to reference the dns servers.
  9. Edit the Boot Options to remove the CD-ROM from the boot sequence before rebooting when the OS installer completes

Create template from VM

  1. Shutdown the VM and select Make Template from the More Actions menu

    Make template

  2. Name the template, update the disk allocation aliases and check the Seal Template checkbox

    VM template dialog

    Sealing the template should perform the following

    • Remove SSH host keys rm -rf /etc/ssh/ssh_host_*
    • Remove udev rules rm -rf /etc/udev/rules.d/70-*
    • Remove the HWADDR and UUID lines in the /etc/sysconfig/network-scripts/ifcfg-eth* file.
    • Delete all the logs from /var/log and build logs from /root.
    • Cleanup the command history history -c
  3. Hit the OK button

Copyright © Dito LLC, 2023