Base VM

Overview

A Base VM is specially configured for the OccpAdmin program to use to deploy other VMs based on it. Base VMs are meant to be minimal installs and just enough framework for the OccpAdmin program to further configure it with ContentPacks during the ConfigurationPhases. In most cases only scenario contributors will be working with Base VMs directly; scenario users will typically only interact with machines that have already undergone additional configuration from the Base VM by the OccpAdmin program.

Generic Configuration Steps

  • Create a barebones VM, i.e. one that does not have extra features like a sound card, or USB 2. For better cross hypervisor compatibility choosing VMDK for the virtual hard drive format and attaching it via SAS LsiLogic.
  • Configuring eth0 to use DHCP and be brought up on boot automatically
  • Setting a root password of "0ccpadmin" (that is a zero)
  • Installing an SSH server and allowing root to log in with a password
  • Installing the Puppet Configuration Management System. http://puppetlabs.com
  • Remove any persistent settings, like udev net rules, that may cause issues with VM clones
  • Force "old", but consistent, network interface network scheme
  • Removing any other user accounts, cleaning up log files, removing bash histories, etc.

Updating a Base VM

The occpadmin application will create a snapshot against a basevm that has been used in a scenario. The snapshot name is linked and will persist between scenarios. Updates can be applied to a base vm as normal but will not take affect immediately. Remove the snapshot named linked and the occpadmin app will create a new one during the next scenario deployment. Any changes made to the basevm before this snapshot is created will be applied to any VMs created from it.

Fedora 20 Base VM

Download available on the Downloads page

Creation Procedure

  1. Create a new VM and remove any unnecessary hardware. Attach the Fedora 20 ISO and begin the installation.
  2. During the install, most defaults are acceptable. However, you should set root's password to be "0ccpadmin".
  3. Once the installaiton finishes and prompts you to reboot, do so, but do NOT continue the installation prompts after the VM reboots. Instead switch to TTY2 by pressing Ctrl+Alt+F2
  4. Login as root:0ccpadmin
    1. Install the Puppet Labs repository rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-fedora-20.noarch.rpm
    2. Install Puppet yum install -y puppet
    3. Ensure the agent service doesn't start on boot puppet resource service puppet enable=false
    4. Workaround udev NIC naming by adding net.ifnames=0 to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub
    5. Ensure /etc/ssh/sshd_config has a line "PermitRootLogin yes"
    6. Ensure sshd starts on boot. puppet resource service sshd ensure=running enable=true
    7. Clean up any history, log, or other files that would contain material from this setup process that you would not want in the VSN machines created from this Base VM.

Ubuntu 16.04 Base VM

Download available on the Downloads page (14.04 only)

Creation Procedure

Wehave upgraded from a 32 bit VM to a 64bit vm with the release of 16.04. Most people now have access to machines capable of running 64 bit VMs.

  1. Download the Ubuntu 16.04.2 Server 64-bit ISO
  2. Create a new VM and attach the ISO, then remove unnecessary virtual hardware.
  3. Follow the installation process, mostly accepting the default values. When asked use the following information:
    • Hostname: basevm
    • User account: occpadmin with password 0ccpadmin
      • however we will be deleting that account later on.
    • Additional packages: select Manual package install and OpenSSH server
    • Add the package ntpdate
  4. Once installed login and then elevate to root by typing:
    sudo su
    
  5. Then enter the password you used to login in with. Finally set root's password to "0ccpadmin" with the passwd command.
  6. Logout then log in as root to delete the user account
    userdel -f -r occpadmin
    
  7. Now install puppet, stop it from running on boot but allow puppet agent.
    apt-get update
    curl -O https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb
    dpkg -i puppetlabs-release-pc1-xenial.deb
    apt-get update
    apt install puppet
    systemctl disable puppet
    
  8. Force a workaround for udev NIC naming so network interfaces will use traditional eth0 naming. Edit /etc/default/grub to contain
    GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0 biosdevname=0"
    GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"
    
    Then run update-grub to apply those changes. Additionally you may need to update /etc/network/interfaces to use the eth0 name by default.
  9. Prevent udev net rules from being created
    touch /etc/udev/rules.d/75-persistent-net-generator.rules
    
  10. Allow root to login via SSH with a password by editing /etc/ssh/sshd_config. Ensure the PermitRootLogin line is set to "yes"
  11. Clean up. You may wish to remove traces of your environment such as IP addresses and domain names that could have been written to log files. Additionally you may wish to remove your bash history. The level of thoroughness is up to you.