How Do You Regain Access to Desktop Running in Oracle VirtualBox?

Problem scenario
You are using Oracle VirtualBox and a CentOS/RHEL/Fedora VM. You stepped away from your VM and now it appears the screen is locked. You do not see the desktop items you had open. You see there may be a new notification and you see the time. You tried to enter Ctrl-Alt-Del, Control-Alt-End, Control-Alt-Insert. None of the key combinations prompted you for your credentials. How do you log back in after the screen saver kicked in on your Red Hat distribution of Linux?

Why Should You Use virtualenv when Using Python?

Question
You were told to write a Python program in virtualenv (a layer of virtualization). Why are you being asked to do this?

Answer
Isolation of dependencies is one of the dozen factors in 12 Factor App. Using pip or pip3 on an entire Linux system to install packages for PyPI is inadvisable (according to page 32 of Expert Python Programming).

How Do You Get CentOS to Use the Internet Running Oracle VirtualBox (Because of an Error That the Network Is Unreachable)?

Problem scenario
On a CentOS server running in VirtualBox, networking is not working. You cannot ping the default gateway or get to the internet. When you try to ping something, you get the error message in a terminal “connect network is unreachable.” What should you do?

Solution
In Oracle VirtualBox, go to Devices -> Network Settings. Make sure the adapter is attached to “Bridged Adapter”.

How Do You Connect to a VM in Oracle VirtualBox from a Desktop?

Problem scenario
You are connecting to a VM in Oracle VirtualBox from a desktop. The pings to the VM are not responding. What should you do?

Solution
Go to Devices -Network -Network Settings
The “Attached to:” setting hould be “Bridged Adapter”
The “Name” setting should what you think is appropriate. Not uncommonly this will be en0 Wi-Fi.

How Do You Install CentOS when the Installation Source Option is a URL Exclusively (without an Option for a Local ISO)?

Problem scenario
You are trying to install CentOS in an offline manner. You get to the “Installation Summary” screen. The Software section says “Installation Source…Setting up installation source.” There is a yellow triangle with an exclamation point near the “Installation Source” button. The “Begin installation” button is grayed out. You want to choose a local ISO, and you thought it was installing via a local ISO. You do not have access to the internet.

How Do You Troubleshoot “Some of the defined forwarded ports would collide” after Running a Chef Kitchen or Ansible Molecule Command?

Problem scenario
You run a kitchen or molecule command. It fails with an error about ports. What should you do?

Solution
Find what other machines are running in your VPC. This error message seems to be relevant to Vagrant (because if you google it, you will see Vagrant-related postings). If you are using Vagrant, run this command: vagrant global-status

If you are not using Vagrant,

How Do You Install SUSE when It Fails with a Kernel Error with Little Information?

Problem scenario
Linux SUSE won’t install. When the installation process is happening it stops with an abortive error that exits the pretty GUI menu sequence. You get “linuxrc 7.0.15 (Kernel 5.3.18-lp152.19-default) an error occurred during the installation.” What should you do to install SUSE?

Possible Solution #1
Start over. When you see this window “YaST2 The system has an active network connection.

How Do You Troubleshoot the Vagrant Message “/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require’: cannot load such file — winrm (LoadError)”?

Problem scenario
You are running Vagrant, but you get this error: “/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require’: cannot load such file — winrm (LoadError)”

You run “gem list” (or “sudo gem list”) and see winrm is installed.

What should you do?

Possible Solution #1 (recommended)

  1. Run this command:

gem list | grep libvirt

2. Verify that libvirt’s version is at least 0.6 or higher.

How Do You Troubleshoot “/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require’: cannot load such file — winrm-elevated (LoadError)”?

Problem scenario
You run a Vagrant command. But you get this message: “/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:83:in `require’: cannot load such file — winrm-elevated (LoadError)”

What should you do?

Solution
Run this command:

vagrant plugin install winrm-elevated …