oracledba.help works great on your mobile device too!

oracledba.help

VirtualBox 5.x

<- SpecialTopics

Overview

The following covers the essential steps to implement Oracle VirtualBox on a Windows system.

For optimal performance of your VMs:

  1. On your host systems Power Options use the (x) High performance power plan.
  2. Use Fixed disks (as opposed to Dynamic).
  3. Use the baseline settings in your VM's shown here.

TOC

Special Topics

Prerequisites

  • Download Oracle VM VirtualBox
    Example: Windows (32-bit/64-bit) VirtualBox-5.1.4-110228-Win.exe
  • Download Oracle VM VirtualBox Extension Pack
    Example: Oracle_VM_VirtualBox_Extension_Pack-5.1.4-110228.vbox-extpack
  • Download the Corresponding Guest Editions .iso
    Example: VBoxGuestAdditions_5.1.4.iso
  • Download or have available your OS iso files.
  • Create work directories that the VMs can access from the host system.
    Place the corresponding software in the volumes or directories.

      Your software directory:
        C:\software 
      A directory for ISO files used to create new VMs:
        C:\software\iso
      A directory for VM files:
        C:\VirtualBoxes
    

Note: The [Right-Ctrl] key will allow your mouse to be used outside the VM window.

Installation

Run: VirtualBox-5.x.x-nnnnnn-Win.exe
1. Welcome
   [Next]
2. Custom Setup
   a. Features
      [Next] Accepting defaults.
   b. Options
      [Next] Accepting defaults.
3. Warning: Network Interfaces
   Note that you will lose connectivity temporarily during this process.
   Proceed: [Yes]
4. Ready to Install
   [Install]

   Installation process runs...

5. Windows Security Popup
   Would you like to install this device software?
      [x] Always trust software from "Oracle Corporation"
      [Install]

6. Oracle VM VirtualBox 5.x.x installation is complete.
   [x] Start Oracle VM after installation
   [Finish]

   The Oracle VM VirtualBox Manager will launch.

Configure Preferences

From File -> Preferences:

  1. Set directory for your Virtual Boxes.
    • Select General
    • Default Machine Folder: C:\VirtualBoxes
  2. Disable Updates
    • Select Update
      [ ] Check for Updates
  3. Add Extensions Package
    • Select Extensions
    • Add Package button (small right button).
      Filename: <PathToExt>Oracle_VM_VirtualBox_Extension_Pack-5.1.4-110228.vbox-extpack
    • Press [Open] -> [Install]

Create Virtual Machine

Configure VM

Example here is of CentOS 7 Server but are generally the same for all OS's.

  1. Select New toolbar button.
  2. Name and Operating System
    • Name: [MyOSName]
    • Type: Linux
    • Version: Red Hat (64-bit)
  3. Memory Size At least 4096mb (you can back it down later).
  4. Hard Drive
    • (x) Create a virtual hard drive now.
    • [Create]
  5. Hard Drive File Type
    • (x) VDI
  6. Storage On Physical Hard Disk
    • Dynamically allocated
  7. File Location and Size
    • 116gb
    • [Create]
  8. Configure baseline VM settings.

VM OS Installation

  1. Select the Start button.
  2. Select Start-up Disk
    • To Use an ISO
      Use full path to your iso file.
      Example: C:\software\iso\CentOS-7-x86_64-DVD-1511.iso
    • To use a DVD
      a. Place installation DVD in drive.
      b. Select 'Host Drive' option.
  3. Select Start
  4. Follow normal OS installation. See OS install cheat sheets as needed.

Install Guest Additions

  1. Start VM.
    1. On LINUX login as root.
    2. On Windows login as Administrator.
  2. Install Guest Additions CD Image
    Shared drives will not be available until this is done.
    • Devices -> Optical Drive -> Choose disk image: select VBoxGuestAdditions_5.1.4.iso
    • Run install for Guest Editions from mounted .iso drive (should auto-run).
    • Accept defaults then VM reboots.
  3. Set Shared Folders
    • Shutdown OS if not already done so.
    • Settings -> Shared Folders
    • Add: C:\software
    • Restart OS.

On LINUX systems you should see a shortcut on the desktop for each shared folder.

OS Cheat Sheets

RHEL7\CentOS 7\Oracle Linux 7

For Linux OS for Oracle here.

Windows 2012

Language to install:      English
Time and currency format: English
Keyboard of input method: US
[Install now]

Version
 Windows Server 2012 R2 Standard (Server with a GUI)
License
 [x] I accept the licence terms
Type
 Custom: Install Windows only (advanced)
Where
 Used selected drive.
 - Create any drives as needed.
   Process runs...
Settings
 Username: Administrator
 Password: VeryComplexPW1!

Post Install
 - Set PageFile (RAM * 2.5)
 - Set autologin via SysInternals AutoLogon tool.
   https://technet.microsoft.com/en-us/sysinternals/bb963905
 - Defrag disk(s).

Windows 2008

- Windows 2008 R2 Standard (Full Installation) x64
- License Terms: Accept
- Custom (advanced)
- Drive Options - choose: Disk 0 Unallocated Space
  Process runs and multiple reboots will occur.
- On first login set password: [OK]
  Administrator\<EnterStrongPassword>

Windows XP

- English (United States)
- Press Enter to Continue and install OS.
- Accept device settings detected.
- C = Create Partition then ENTER to Install
- Format partition as NTFS (quick format) \\
  Install reboots VM at this point in install... 
- Initial Boot into GUI
  * Welcome [Next]
  * Regional and Language Options [Next]
  * Name: WinXP_VBox, Org:
  * Product Key:

- Computer Info
    Name (WINXP-XXXXXXX)
    Password: ********
  - Date and Time
    (GMT-0500) Eastern Time
    [ ] Auto adjust clock of daylight savings changes
  - Network: (x) Typical
  - Registering Components ...
  - [Finish]

Install Updates (Linux)

  1. Ensure Guest Editions installed and can ping Internet.
  2. Menu: Applications -> System Tools -> Applications Installer
  3. Click Updates button at top.
  4. Click the Refresh button at topic left.
    Checking for updates will be displayed.
    This may take several minutes...
  5. Select the Restart & Install button at top.

You may have to reinstall the Guest Editions CD if large update.

Enable Internet Access

Settings -> Network:

  1. Adapter 1
    • Set Attached to = Host-only Adapter
    • Advanced: Promiscuous Mode = Allow All
  2. Adapter 2
    • [x] Enable Network Adapter
    • Set Attached to = NAT
  3. Restart your VM and test.
    • Ex: ping google.com

Create a Shared Folder

  1. Ensure the dir to share exists on host systems hard drive.
    • Example: C:\software
  2. Go to: Settings -> Shared Folders
  3. Select Add Folder button on right.
  4. Select host folder: C:\software
    • Folder name: software
    • [ ] Read-only
    • [x] Auto-mount

Create Internal Network IP

Configure VirtualBox

  1. From the VirtualBox Manager: Settings -> Network
  2. [x] Enable (a new) Network Adapter
    • Attached to: Internal Network
    • Name: MyNet1 <== Choose name to easily identify from VirtualBox Manager.
    • From Advanced note the MAC address (regen a new on if not unique).
  3. Start VirtualBox.

Create ifg File

  1. cd to /etc/sysconfig/network-scripts
  2. vi ifcfg-<InterfaceMatchingMAC> and Set Values

Example: /etc/sysconfig/network-scripts/ifcfg-enp0s9

DEVICE=enp0s9
BOOTPROTO=none
ONBOOT=yes
PREFIX=24
IPADDR=192.168.1.50

Edit /etc/hosts

Add new IP to hosts file. Example:

192.168.1.50    db01

If need be, set system hostname using: hostnamectl set-hostname <hostname>

Bounce VirtualBox.

Create Virtual Machine for ASM (RHEL7 Example)

Change as needed for your testing environment.

Configure Core VM

  1. Select New toolbar button.
  2. Name and Operating System
    • Name: [MyOSName]
    • Type: Linux
    • Version: Red Hat (64-bit)
  3. Memory Size At least 1024mb
  4. Hard Drive
    • (x) Create a virtual hard drive now.
    • [Create]
  5. Hard Drive File Type
    • (x) VDI
  6. Storage On Physical Hard Disk
    • Fixed Size
  7. File Location and Size
    • 25gb
    • [Create]

Create Shared Disk

Create Disk

  1. Settings -> Storage
  2. Select Controller: SATA -> Add hard disk.
  3. Create New Disk
  4. (x) VDI
  5. Fixed size
  6. File location and Size
    • Ex: DISK01
    • Ex: 8.00 GB
  7. Create

Set Disk as Shareable

  1. File -> Virtual Media Manager
  2. Right-Click disk -> Modify -> (x) Shareable

Attach Vbox to Shared Disk

  1. Select vbox (ex: rac02).
  2. Settings -> Storage
  3. Select Controller: SATA -> Add Hard Disks
  4. Choose existing disk -> Select disk from displayed file explorer.

RAD Vbox Backup\Restore

This is not a supported way to save/restore images in VirtualBox, but it is very simple and worked well. The restore is limited to the VirtualBox setup where images were saved.

Stop both VMs. Find the location where VB stores images: Main menu | File | Preferences | General, "Default Machine Folder" box. For example: "C:\Users\scott\VirtualBox VMs". Go to this folder and locate "rac1", "rac2" directories and "rac_shared_disk1.vdi" file. Make a .zip or .rar file containing these three items. If you don't have compressing tools and there is enough disk space, you can copy these three items to another location. The images are saved!

In order to restore these images:

  1. Make sure VMs are stopped.
  2. Go to the "VirtualBox VMs" folder and delete "rac1", "rac2" directories, and "rac_shared_disk1.vdi" files.
  3. Restore these three items from the .zip file or copy from the location where these items were saved

The restored VMs are ready to run.

Baseline VirtualBox Defaults

General

 • Advanced: Shared Clipboard: Bidirectional

System

 • Base Memory: 4096mb (minimum for RAC 9216mb).
 • Processors: 2 (minimum for RAC 4).
 • Acceleration -> Paravirtualization Interface: None

Display

 • Video Memory: 128mb (256mb if possible)
 • Enable the acceleration options.

Storage

 • Controller: IDE  ->  Optical Drive: ->  <Choose Linux ISO for Install>
 • Controller: SATA [x] Use Host I/O Cache

Shared Folders

 • D:\software: [x] Auto-mount

Interfaces for RAC

  • Adapters 1 & 2 used for local and Internet connectivity.
  • Adapters 3 & 4 used for RAC.

Settings -> Network
Adapter 1

[x] Enable Network Adapter
Attached to: NAT

Adapter 2

[x] Enable Network Adapter
Attached to: Host-only Adapter
Promiscuous Mode: Allow All

Adapter 3

[x] Enable Network Adapter
Attached to: Internal Network
Name: pubnet
Promiscuous Mode: Allow All

Adapter 4

[x] Enable Network Adapter
Attached to: Internal Network
Name: privnet
Promiscuous Mode: Allow All

Note the MAC addresses - they will be needed in OS install.

Linux Preferences

Disable Power Saving (screen saver)

 Applications -> System Tools -> Settings
 Power -> Blank screen: Never

Disable Screen Locking

 Applications -> System Tools -> Settings
 Privacy -> Screen Lock -> Automatic Screen Lock: OFF

Misc Checkoff

 - Baseline VM settings in place.
 - OS Software Updated.
 - .bashrc Common Aliases set.
 - initLnxForOra.sh (12.2.x) run.
 - Oracle's Preinstallation rpm installed.
 - Logged into GUI as root, grid and oracle. 
   -- Disabled screen saver.
   -- Disabled screen locking.
 - Additional rpms installed: cvuqdisk-1.0.9-1,Flash, rlwrap, dconf-editor.
 - gnome, Changed default app settings (gedit, nautilus).

Network Interface Change Bug

Topic

 From GUI: Applications -> System Tools -> Settings -> Network

If you to change a network interface IP and do not need a Gateway:

  1. You may need to put in a bogus Gateway address (0.0.0.0) to be able to hit Apply.
  2. Then after you save it, turn the interface Off then On to bind it.

<- SpecialTopics