How Do You Know If Guest Additions Have Been Installed on Your Linux Guest Running Via Oracle VirtualBox on a Windows Host?

Question:  How do you find out if Guest Additions have been installed on your Linux guest running via Oracle VirtualBox on a Windows host?

Background  We find this message to be ignorable when installing Guest Additions:  "Could not find the X.org or XFree86 Window System, skipping."

Answer
Go into the Linux guest and run this command:

lsmod | grep -i vbox

You should see results related to vbox.  If you see no results, then Guest Additions have not been installed.

Two AWS Servers Cannot Ping Each Other. What Is Wrong?

Problem scenario:  You have two AWS instances in the same security group.  The Security Group has rules for "All TCP" associated with both the public IP address (visible in the EC2 portion of the AWS Console) and the private IP address (found when you issue an "ifconfig" at the OS level of the server).  You find that the servers cannot ping each other.  You cannot SSH from one to the other either.

How do you get AWS instances to be able to ping each other?

Root cause:  The AWS Security Group rules are not properly configured for the servers to communicate with each other. There is a difference between "All traffic" and "All TCP." The "Type" options "All TCP" and/or "TCP" will not allow pings to work.  Pings are ICMP echo requests.  

Solution

Do the following:

  1. Find the IP address of each server at the OS level (e.g., with an "ifconfig" command).
  2. Go to "Security Groups" in the AWS Console.
  3. Click on the radio button for the security group that governs the instances (this step will not apply if you only have one security group).
  4. Go to the "Inbound" tab near the bottom then click the "Edit" button.
  5. Create a rule with Type "All traffic", and for the field with the IP address, use one of the IP addresses above with a "/32" at the end.  The result should be like this: x.x.x.x/32
  6. Create a rule with Type "All traffic", and for the field with the IP address, use the other IP address from above with a "/32" at the end.  The result should be like this: x.x.x.x/32
  7. Click save.

Relevant parting tips:

To have a more secure Security Group and have pings work without other communication working, for "Type" use "All ICMP - IPv4" (instead of "All Traffic").  Remember that SSH will not work when you have hardened your Security Group with such a configuration.

The Public IP address is usually not relevant for configuring AWS Security Groups for the purposes of allowing TCP/IP networking between instances. 

Optional reading: You may want to view this article on troubleshooting network problems.

You Cannot Apply Security Updates to Ubuntu Due to Errors about vim. What Should You Do?

Problem scenario:  You are running Ubuntu 16.10. When you log in you see this message:
65 packages can be updates. 33 updates are security updates.
As root you run this: apt-get upgrade
However you get this ominous message:
"The following packages have unmet dependencies: vim: Depends: vim-common (= 2:7.4.1829-1ubuntu2.1 2:7.4.1829-1ubuntu2 is to be installed vim-runtime (= 2.7.4.1829-1ubuntu2.1) but 2:7.4.1829-1ubuntu2 is installed
vim-tiny : Depends vim-common (= 2:7.4.1829-1ubuntu2.1) but 2:7.4.1829-1ubuntu2 is installed"

You tried to install aptitude to address this problem, but you receive an error similar to the messages above.  How can you apply the security updates for Ubuntu?

Solution:  To get around this problem with vim, try this command: "apt-get -f install".  Then run "apt-get update".  Finally, run "apt-get upgrade". The command "apt-get update" should be run first to update the meta data about potential packages and updates themselves.  This way when you install something, the latest package will be selected.  The command "apt-get upgrade" actually installs packages and updates on your machine (rather than merely update meta data about the updates that are available).  For more information, see this link.

How Do You Use Oracle VirtualBox for The First Time?

Problem scenario:  To install Oracle VirtualBox on a Windows host, use this link.  Assuming you have Oracle VirtualBox on a Windows host, you now want to create a virtual server also known as a guest machine.  You want Oracle VirtualBox to run a guest Ubuntu VM so you can have access to a Linux server straight from your laptop. 

Solution
1.  Open Oracle VM VirtualBox Manager
2.  Click the "New" button
3.  Give the server a name.  For the "Type" drop-down, choose "Linux."   For the version, choose "Ubuntu (32-bit)."  (Selecting this means you'll need a 32-bit version of Ubuntu.)
4.  Click Next.  
5.  For the Memory size, choose 1024 MB, unless you desire something else.  Then click "Next."
6.  Leave the option checked for "Create a virtual hard disk now. " Click "Create."
7.  For the "Hard disk file type" choose the VDI option unless you desire something else.  Click "Next."
8.  Leave the "Dynamically allocated" option checked unless you desire something else.  Click "Next."
9.  For the "Create Virtual Hard Disk" window, leave it at the default 8 GB unless you desire something else. Click "Create"
10.  Right-click the server (which should be in the upper left-hand corner with the name you entered).  Go to "Start" -> "Normal Start."
11.  You will be prompted with "Select start-up disk."   Do one of two things:  
i) Insert a DVD with a bootable .iso with a 32-bit version of Ubuntu.  Then choose the DVD drive in the pop-up window for Oracle VirtualBox. Then click "Start."  Finish the installation by following the directions in this link.
ii)  Leave this prompt open and do the following substeps:
a) Download this file:  http://mirror.pnl.gov/releases/16.10/ubuntu-16.10-server-i386.iso
  b) Windows can mount this .iso as if it were a bootable DVD drive. ISO GUI viewers or DVD software applications will allow you to mount it.  Using a CyberLink ISO Viewer (assuming it is installed), highlight the .iso file you just downloaded. Then click the icon for "Mount this ISO."
  c) Go back to Oracle VirtualBox.  Choose the drive letter that you mounted to in step "11.ii.b" (the previous sub-step).  Install Ubuntu.  For directions on how to install Ubuntu, see this link.  Once Linux is installed as a guest server, you can use this link to get to the Internet from the guest.

Connection Refused Error When Trying to Configure Chef Server on RedHat

Problem scenario:  You are trying to set up a Chef Client on a VM to be configured to communicate with your Chef Server (version 12). The OS of both servers (the Chef server and the server that will be the Chef client) is RHEL 7.3.

You run this command from a server that you want to be a Chef client:

knife client list

You get this:

    ERROR: Connection refused connecting to https://chef-server.name/organizations/myorg/clients, retry 1/5 ...

You need to keep SELinux enabled. There is no firewalld or iptables running on either server.  What do you do?

Solution There is an intermediate firewall that is blocking port 443.  Between the two servers, port 443 is filtered.  Assuming both servers are AWS instances, here is a solution.  

First find the IP addresses via the "ifconfig" command on two servers -- the Chef master server and the Chef client server.  In the AWS Security Group, create a Custom TCP rule.  Use these settings:

-For the "Type" have it be HTTPS.
-For the "Source" use "Custom."
-The field next to custom should have the IP address of the Chef Server obtained above with a "/32" at the end.  It will look like this: 172.31.21.5/32

Create a second inbound rule.  It should use these settings:

-For the "Type" have it be HTTPS.
-For the "Source" use "Custom."
-The field next to custom should have the IP address of the Chef Client obtained above with a "/32" at the end.  It will look like this: 172.31.21.6/32

How Do You Troubleshoot Common Problems With Puppet?

Problem scenario:  You want to troubleshoot a variety of issues with Puppet.  You go to Puppet's page for "Troubleshooting Common Errors." It says that a "A newer version is available; see the version menu above for details." ​

But every link newer than Version 2.8 you try gives you this "We tried to find that page, but 404."

Solution
Google the error itself.  If there is no error and it is a Puppet manifest that is not working properly, try this link.  Other useful links outside of the manifest not working include this one from Puppet and this one from Upguard.

How To Install Oracle VirtualBox 5.1 on Windows 7 Professional

Problem scenario  Your employer has no licenses for another virtual server.  You need a hypervisor to host a guest VM that runs a Linux OS.  Your workstation is running Windows 7 Professional.  What should you do?

Solution  Install Oracle VirtualBox 5.1. on your workstation. These directions are for how to install it on Windows 7 Professional.

1.  Get the installation media from this link.  Go to "Windows hosts" and download the file.  As of 1/20/17, it is 118 MB.

2.  Double-click the file.  Answer "Yes" to the "Open Executable File?" prompt.

3.  Click "Next" to the "Welcome to the Oracle VM VirtualBox 5.1.14 Setup Wizard" window.

4.  You can choose where to install it.  You may want to put it on a different hard drive.  But if you only have one (e.g., you are using a laptop), the default installation location is probably fine.  After deciding about where to install it, just choose "Next."

5.  For the next Window, you can unselect any option you do not want.  I would unselect "Create a shortcut in the Quick Launch Bar."  Then click "Next."

6.  Click "Yes" to the "Proceed with installation now?" prompt.

7.  Click "Install" to proceed.

8.  Click "Yes" to the Windows UAC confirmation prompt.

9.  You will be prompted to install this device software.  Choose "Install."

10.  You will be prompted to install this device software a second time.  Choose "Install."

11.  You will be prompted to install this device software a third time.  Choose "Install."

12.  Click "Finish" to the "Oracle VM VirtualBox installation is complete" window.

How To Install The Linux OS (or How to Build a Server Running Ubuntu Server 16)

How To Install Linux / How To Install Ubuntu Server 16

Note: The settings in the directions below are for a typical U.S. user who wants a basic Ubuntu server without strong security.  You do not have to follow the directions exactly.  The directions can apply to different installation target mediums (e.g., a physical server or a virtual server).  The directions are great for installing Ubuntu on a virtual instance hosted by Oracle VirtualBox running on a laptop that has Windows Professional 7 (step #1-3).  You may not want to put anything sensitive on such a server.  The directions are almost step-by-step for initial configuration of Ubuntu that would be good for testing things and learning.  It would not take too much deviation from the steps below to have a production-ready Linux server.

Step #1.  The first step is to either

  1. boot a physical server to the CD/DVD-ROM (e.g., an .iso on a DVD that is in the drive), or
  2. boot a physical server to a USB stick (e.g., a USB stick with bootable installation media for Ubuntu should be inserted into the computer before the computer is turned on), or
  3. start Oracle VirtualBox and boot to an .iso file that was downloaded to a Windows desktop and mounted as a drive, with a drive letter.  One example of such an .iso is linked here.  Various applications can allow you to temporarily mount an .iso to a drive letter.

Step #2.  Follow these directions:
    a) Choose the language you want and press enter.  
    b) Choose Install Ubuntu Server and press enter.
    c) Choose "English" and press enter.
    d) Chose "United States" and press enter.
    e) Choose "No" to the question about detecting a keyboard.
    f) Choose "English (US)" and press enter
    g) Choose "English (US)" and press enter
       Don't be surprised if you just see purple for a minute. This next process may take 10 minutes.
    h) Enter a hostname for this server.  Then choose "Continue."
    i) Enter a full name for the user.
    j) Enter a user name.
    k) Enter a password.
    l) For "Encrypt hard drive" choose "No."  (It would be more secure to do it.  I'm suggesting "No" because I believe most people following these directions are using Oracle VirtualBox and want something to run on a laptop reasonably quickly.)
     m) You can change the time zone.  More than likely you should just choose "Yes" and press enter.
    n) For "Partition disks" choose "Guided - use entire disk and set up LVM"  (It would be more secure to choose the option with encrypted LMV.  I'm suggesting a different option because I believe most people following these directions will be installing Ubuntu Desktop on their Oracle VirtualBox.  These users want something to run on a laptop reasonably quickly and will not put sensitive data on their Ubuntu server.)
    o) Choose the default option for the "Select disk to partition."
    p) For the "Write changes to disks..." prompt, choose "Yes" and press enter.
    q) At the "Amount of volume group to use..." change if desired.  Otherwise choose "Next" and press enter.
    r) At the "Write changes to disks?" prompt, choose "Yes" and press enter.
    This portion may take the installer several minutes to complete.
    s) For the "Configure the package manager" leave it blank.  Press tab to highlight "Continue."  Press Enter.
    t) For the prompt about managing upgrades, choose "Install security updates automatically."
   u) For the "Software selection" prompt, leave "standard system utilities" unless you know you want something else.  Then choose "Continue."  The installer may take several minutes to complete this section.
    v) For the "Install the GRUB boot loader..." prompt, choose "Yes" and press "Enter."
   w) When you see "Finish the installation" go to "Devices" in Oracle VirtualBox.  Then go to "Optical Devices" and uncheck the drive letter that had the mounted media.  Then in the Ubuntu menu, choose "Continue."
    x) Now you can use Ubuntu.

How Do You Find What Version of Chef That You Are Using on a Linux Server?

Question:  How Do You Find What Version of Chef That You Are Using On A Linux Server?  If you are not sure if Chef is installed or not on your Linux server, see this article.

Answers (one for Chef client and one for Chef server)
To find the version of Chef client that is installed, run this:

chef-client -v

If the response is "command not found" chef-client is not installed.  If chef-client is installed, the above command will result in a display of the version of chef-client.

To find the version of Chef server that is installed, this command may or may not work:
cat /usr/lib/ruby/vendor_ruby/chef-server/version.rb
# On RHEL 7.3 with Chef 12.11.1, it did not work for us.  But some people found it to work.

This command should work for a modern version of Chef server:
sudo find / -name version-manifest.txt | grep opscode | xargs cat * | grep -i chef-server

What Is Robotic Process Automation (or RPA)?

Question
What is robotic process automation (or RPA)?

Answer
Robotic process automation, or RPA, is the term for automating user interface (UI) operations (mouse clicks and inserting text) with image recognition in a typical graphical user environment.  Some applications have no exposed API.  RPA enables the user to script a series of computer desktop activities to be performed in a scheduled and unattended manner.

RPA is not available for character-based (non-GUI) operating systems such as some distributions of Linux, Unix, and Windows (e.g., Core).

Robotic process automation software is software that enables a human user to create a repeatable sequence of events that involve the usage of graphical user interface applications (through pattern recognition, mouse clicks, and inserted text).  RPA programs can perform unattended screen scraping tasks and data entry.

In our opinion RPA software does not necessarily leverage artificial intelligence (or machine learning).  RPA could easily be integrated with artificial intelligence.  To meet the threshold of robotic process automation, graphical image recognition and UI functions must be present.  Such a process would not necessarily be considered artificially intelligent. If you want to learn more, see this page on Deloitte's website.