Thinking Out Loud

April 13, 2017

My Vagrant Journey

Filed under: Vagrant,VirtualBox — mdinh @ 4:09 am

This is probably nothing new.

Wanted to build my own Vagrant box with prerequisite to install GI/DB.

Instead of creating new network, use existing to assign IP.

Shared Folder uses existing location versus having to copy binaries into Vagrant location.

Same Vagrantfile can be used with a little search and replace.

You might ask, why not automate GI/DB install. I like to practice installating and cloning.

Next, install GG and DG.

After, create 2 RAC clusters using the same Vagrant Box?

dinh@CMWPHV1 MINGW64 /f/Vagrant
$ vboxmanage list hostonlyifs
Name:            VirtualBox Host-Only Ethernet Adapter
GUID:            8898fc55-9a80-4d5e-9a82-d2dc776ef00e
DHCP:            Disabled
IPAddress:       192.168.146.1
NetworkMask:     255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:22
MediumType:      Ethernet
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter

dinh@CMWPHV1 MINGW64 /f/Vagrant
$ vagrant box list
There are no installed boxes! Use `vagrant box add` to add some.

dinh@CMWPHV1 MINGW64 /f/Vagrant
$ vagrant global-status
id       name   provider state  directory
--------------------------------------------------------------------
There are no active Vagrant environments on this computer! Or,
you haven't destroyed and recreated Vagrant environments that were
started with an older version of Vagrant.

dinh@CMWPHV1 MINGW64 /f/Vagrant
$ cd arrow1/

dinh@CMWPHV1 MINGW64 /f/Vagrant/arrow1
$ vagrant status
Current machine states:

arrow1                    not created (virtualbox)

The environment has not yet been created. Run `vagrant up` to
create the environment. If a machine is not created, only the
default provider will be shown. So if a provider is not listed,
then the machine is not created for that environment.

dinh@CMWPHV1 MINGW64 /f/Vagrant/arrow1
$ vagrant up
Bringing machine 'arrow1' up with 'virtualbox' provider...
==> arrow1: Box 'ol73-min' could not be found. Attempting to find and install...
    arrow1: Box Provider: virtualbox
    arrow1: Box Version: >= 0
==> arrow1: Box file was not detected as metadata. Adding it directly...
==> arrow1: Adding box 'ol73-min' (v0) for provider: virtualbox
    arrow1: Unpacking necessary files from: file:///F:/Vagrant/ol73-min.box
    arrow1:
==> arrow1: Successfully added box 'ol73-min' (v0) for 'virtualbox'!
==> arrow1: Importing base box 'ol73-min'...
==> arrow1: Matching MAC address for NAT networking...
==> arrow1: Setting the name of the VM: arrow1
==> arrow1: Clearing any previously set network interfaces...
==> arrow1: Preparing network interfaces based on configuration...
    arrow1: Adapter 1: nat
    arrow1: Adapter 2: hostonly
==> arrow1: Forwarding ports...
    arrow1: 22 (guest) => 2011 (host) (adapter 1)
==> arrow1: Running 'pre-boot' VM customizations...
==> arrow1: Booting VM...
==> arrow1: Waiting for machine to boot. This may take a few minutes...
    arrow1: SSH address: 127.0.0.1:2011
    arrow1: SSH username: vagrant
    arrow1: SSH auth method: private key
    arrow1: Warning: Remote connection disconnect. Retrying...
==> arrow1: Machine booted and ready!
[arrow1] GuestAdditions 5.1.18 running --- OK.
==> arrow1: Checking for guest additions in VM...
==> arrow1: Setting hostname...
==> arrow1: Configuring and enabling network interfaces...
==> arrow1: Mounting shared folders...
    arrow1: /vagrant => F:/Vagrant/arrow1
    arrow1: /sf_working => C:/dinh/Dropbox/working
    arrow1: /sf_OracleSoftware => F:/OracleSoftware

dinh@CMWPHV1 MINGW64 /f/Vagrant/arrow1
$ cd ../arrow2/

dinh@CMWPHV1 MINGW64 /f/Vagrant/arrow2
$ vagrant up
Bringing machine 'arrow2' up with 'virtualbox' provider...
==> arrow2: Importing base box 'ol73-min'...
==> arrow2: Matching MAC address for NAT networking...
==> arrow2: Setting the name of the VM: arrow2
==> arrow2: Clearing any previously set network interfaces...
==> arrow2: Preparing network interfaces based on configuration...
    arrow2: Adapter 1: nat
    arrow2: Adapter 2: hostonly
==> arrow2: Forwarding ports...
    arrow2: 22 (guest) => 2012 (host) (adapter 1)
==> arrow2: Running 'pre-boot' VM customizations...
==> arrow2: Booting VM...
==> arrow2: Waiting for machine to boot. This may take a few minutes...
    arrow2: SSH address: 127.0.0.1:2012
    arrow2: SSH username: vagrant
    arrow2: SSH auth method: private key
    arrow2: Warning: Remote connection disconnect. Retrying...
==> arrow2: Machine booted and ready!
[arrow2] GuestAdditions 5.1.18 running --- OK.
==> arrow2: Checking for guest additions in VM...
==> arrow2: Setting hostname...
==> arrow2: Configuring and enabling network interfaces...
==> arrow2: Mounting shared folders...
    arrow2: /vagrant => F:/Vagrant/arrow2
    arrow2: /sf_working => C:/dinh/Dropbox/working
    arrow2: /sf_OracleSoftware => F:/OracleSoftware

dinh@CMWPHV1 MINGW64 /f/Vagrant/arrow2
$ vagrant global-status
id       name   provider   state   directory
-----------------------------------------------------------------------
e779ae1  arrow1 virtualbox running F:/Vagrant/arrow1
7642809  arrow2 virtualbox running F:/Vagrant/arrow2

The above shows information about all known Vagrant environments
on this machine. This data is cached and may not be completely
up-to-date. To interact with any of the machines, you can go to
that directory and run Vagrant, or you can use the ID directly
with Vagrant commands from any directory. For example:
"vagrant destroy 1a2b3c4d"

dinh@CMWPHV1 MINGW64 /f/Vagrant/arrow2
$ vagrant box list
ol73-min (virtualbox, 0)

dinh@CMWPHV1 MINGW64 /f/Vagrant/arrow2
$ vboxmanage list runningvms
"arrow1" {d8e472d1-92c1-4211-ac86-99a8461f7cf5}
"arrow2" {66ad90a6-15ad-4096-a04e-e30c40ad2d70}

dinh@CMWPHV1 MINGW64 /f/Vagrant/arrow2
$ cat Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :

# vboxmanage list vms
# vagrant package --output ol73-min.box --base ol73-min
# vagrant box add --name arrow1 file:///F:/Vagrant/ol73-min.box
# vboxmanage sharedfolder add "arrow1" --name "OracleSoftware" --hostpath "F:\OracleSoftware" --automount
# vboxmanage modifyvm "ol73-min" --natpf1 "ssh,tcp,,2222,,22"

VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.define "arrow2" , primary: true do |config|
    config.vm.box = "ol73-min"
    config.vm.box_url = "file:///F:/Vagrant/ol73-min.box"
    config.vm.network "private_network", ip: "192.168.146.12"
    config.vm.network "forwarded_port", guest: 22, host: 2012, host_ip: "127.0.0.1", id: "ssh"
    config.vm.box_check_update = false
    config.ssh.insert_key = false
    config.vm.host_name = "arrow2"
    config.vm.synced_folder "F:\\OracleSoftware", "/sf_OracleSoftware", type: "nfs"
    config.vm.synced_folder "C:\\dinh\\Dropbox\\working", "/sf_working", type: "nfs"
    config.vm.provider "virtualbox" do |vb|
      #vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
      #vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
      vb.memory = "1536"
      vb.name = "arrow2"
    end
  end
end

dinh@CMWPHV1 MINGW64 /f/Vagrant/arrow2
$
Advertisements

April 9, 2017

Oracle Linux Vagrant Boxes

Filed under: oracle,Vagrant,VirtualBox — mdinh @ 5:57 pm

Almost like finding gold.

Oracle publishes Vagrant boxes based on Oracle Linux

March 26, 2017

racattack-ansible-oracle Up and Running

Filed under: RAC,Vagrant,VirtualBox — mdinh @ 2:04 pm

From a time long ago – https://mdinh.wordpress.com/2016/12/04/toys-for-when-you-i-are-bored/

With help from oravirt, I was able to install RAC VMs.

At this point, only the VM servers have been created and GI/DB are not installed; that’s coming up at some point.

Some clarification for setup=standard vagrant provision

setup=standard (shell environment variable)

vagrant provision (executable)

This is where the confusion was at first.

falcon@falconidae MINGW64 /e/racattack-ansible-oracle (master)
$ setup=standard vagrant provision

collabn2 eth1 lanip  :192.168.78.52
collabn2 eth2 privip :172.16.100.52
collabn2 dns server role is slave

collabn1 eth1 lanip  :192.168.78.51
collabn1 eth2 privip :172.16.100.51

======================================================================

E:\racattack-ansible-oracle>setup=standard vagrant provision
'setup' is not recognized as an internal or external command,
operable program or batch file.

E:\racattack-ansible-oracle>

Follow https://github.com/racattack/racattack-ansible-oracle

There were some errors but seems to be working fine.

Note: I used Git Bash this time around vs Window CMD.

One improvements I would make if I ever or whenever get good enough on the subject is to have shared folders for linuxamd64_12102*.zip use existing locations.

The way most vagrants are configure, will need multiple copies of the same binaries.

Alternatively, edit VM shared folder manually.

falcon@falconidae MINGW64 /e
$ git clone --recursive https://github.com/racattack/racattack-ansible-oracle
Cloning into 'racattack-ansible-oracle'...
remote: Counting objects: 320, done.
Receiving objects:  79%remote: Total 320 (delta 0), reused 0 (delta 0), pack-reused 320
Receiving objects: 100% (320/320), 52.22 KiB | 0 bytes/s, done.
Resolving deltas: 100% (210/210), done.
Submodule 'stagefiles/ansible-oracle' (https://github.com/oravirt/ansible-oracle) registered for path 'stagefiles/ansible-oracle'
Cloning into 'E:/racattack-ansible-oracle/stagefiles/ansible-oracle'...
remote: Counting objects: 2061, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 2061 (delta 1), reused 0 (delta 0), pack-reused 2052
Receiving objects: 100% (2061/2061), 517.76 KiB | 0 bytes/s, done.
Resolving deltas: 100% (954/954), done.
Submodule path 'stagefiles/ansible-oracle': checked out '00651e0caf9a876fcefe51d21e44a6e78c313e76'

======================================================================

falcon@falconidae MINGW64 /e
$ cd racattack-ansible-oracle

falcon@falconidae MINGW64 /e/racattack-ansible-oracle (master)
$ ls -l
total 20
drwxr-xr-x 1 falcon 197121    0 Mar 26 05:45 12cR1/
-rw-r--r-- 1 falcon 197121 3863 Mar 26 05:45 README.md
drwxr-xr-x 1 falcon 197121    0 Mar 26 05:45 stagefiles/
-rw-r--r-- 1 falcon 197121 9706 Mar 26 05:45 Vagrantfile

falcon@falconidae MINGW64 /e/racattack-ansible-oracle (master)
$ vi Vagrantfile

falcon@falconidae MINGW64 /e/racattack-ansible-oracle (master)
$ ls -l 12cR1/*.zip
-rw-r--r-- 1 falcon 197121 1673544724 Mar 25 13:20 12cR1/linuxamd64_12102_database_1of2.zip
-rw-r--r-- 1 falcon 197121 1014530602 Mar 25 13:32 12cR1/linuxamd64_12102_database_2of2.zip
-rw-r--r-- 1 falcon 197121 1747043545 Mar 25 13:44 12cR1/linuxamd64_12102_grid_1of2.zip
-rw-r--r-- 1 falcon 197121  646972897 Mar 25 13:42 12cR1/linuxamd64_12102_grid_2of2.zip

======================================================================

falcon@falconidae MINGW64 /e/racattack-ansible-oracle (master)
$ vagrant status

collabn2 eth1 lanip  :192.168.78.52
collabn2 eth2 privip :172.16.100.52
collabn2 dns server role is slave
on first boot shared disks will be created, this will take some time

collabn1 eth1 lanip  :192.168.78.51
collabn1 eth2 privip :172.16.100.51
collabn1 dns server role is master
Current machine states:

collabn2                  not created (virtualbox)
collabn1                  not created (virtualbox)

This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run `vagrant status NAME`.

======================================================================

falcon@falconidae MINGW64 /e/racattack-ansible-oracle (master)
$ vagrant up

collabn2 eth1 lanip  :192.168.78.52
collabn2 eth2 privip :172.16.100.52
collabn2 dns server role is slave
on first boot shared disks will be created, this will take some time

collabn1 eth1 lanip  :192.168.78.51
collabn1 eth2 privip :172.16.100.51
collabn1 dns server role is master
Bringing machine 'collabn2' up with 'virtualbox' provider...
Bringing machine 'collabn1' up with 'virtualbox' provider...
==> collabn2: Box 'kikitux/oracle6-racattack' could not be found. Attempting to find and install...
    collabn2: Box Provider: virtualbox
    collabn2: Box Version: >= 0
==> collabn2: Loading metadata for box 'kikitux/oracle6-racattack'
    collabn2: URL: https://atlas.hashicorp.com/kikitux/oracle6-racattack
==> collabn2: Adding box 'kikitux/oracle6-racattack' (v16.01.01) for provider: virtualbox
    collabn2: Downloading: https://atlas.hashicorp.com/kikitux/boxes/oracle6-racattack/versions/16.01.01/providers/virtualbox.box
    collabn2:
==> collabn2: Successfully added box 'kikitux/oracle6-racattack' (v16.01.01) for 'virtualbox'!
==> collabn2: Importing base box 'kikitux/oracle6-racattack'...
==> collabn2: Matching MAC address for NAT networking...
==> collabn2: Checking if box 'kikitux/oracle6-racattack' is up to date...
==> collabn2: Setting the name of the VM: collabn2.1703260556
==> collabn2: Fixed port collision for 22 => 2222. Now on port 2200.
==> collabn2: Clearing any previously set network interfaces...
==> collabn2: Preparing network interfaces based on configuration...
    collabn2: Adapter 1: nat
    collabn2: Adapter 2: hostonly
    collabn2: Adapter 3: hostonly
==> collabn2: Forwarding ports...
    collabn2: 22 (guest) => 2200 (host) (adapter 1)
==> collabn2: Running 'pre-boot' VM customizations...
==> collabn2: Booting VM...
==> collabn2: Waiting for machine to boot. This may take a few minutes...
    collabn2: SSH address: 127.0.0.1:2200
    collabn2: SSH username: vagrant
    collabn2: SSH auth method: private key
    collabn2: Warning: Remote connection disconnect. Retrying...
==> collabn2: Machine booted and ready!
[collabn2] GuestAdditions versions on your host (5.1.18) and guest (5.0.0) do not match.
Loaded plugins: security

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Setting up Install Process
http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'public-yum.oracle.com'"
Trying other mirror.
http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'public-yum.oracle.com'"
Trying other mirror.
http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'public-yum.oracle.com'"
Trying other mirror.
Could not get metalink https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=x86_64 error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.fedoraproject.org'"
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Package kernel-uek-devel-2.6.39-400.250.9.el6uek.x86_64 already installed and latest version
Package gcc-4.4.7-16.el6.x86_64 already installed and latest version
Package 1:make-3.81-20.el6.x86_64 already installed and latest version
Package 4:perl-5.10.1-141.el6.x86_64 already installed and latest version
Package bzip2-1.0.5-7.el6_0.x86_64 already installed and latest version
Nothing to do

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Copy iso file D:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
Installing Virtualbox Guest Additions 5.1.18 - guest version is 5.0.0
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.18 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.0.0 of VirtualBox Guest Additions...
Stopping VirtualBox Additions [FAILED]
(Cannot unload module vboxguest)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Removing existing VirtualBox non-DKMS kernel modules[  OK  ]
[  OK  ] VirtualBox Guest Addition service [  OK  ]
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Building Guest Additions kernel modules.
vboxadd.sh: You should restart your guest to make sure the new modules are actually used.
vboxadd.sh: Starting the VirtualBox Guest Additions.

Could not find the X.Org or XFree86 Window System, skipping.


Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   5.0.0
VBoxService inside the vm claims: 5.1.18
Going on, assuming VBoxService is correct...
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   5.0.0
VBoxService inside the vm claims: 5.1.18
Going on, assuming VBoxService is correct...
==> collabn2: Checking for guest additions in VM...
    collabn2: The guest additions on this VM do not match the installed version of
    collabn2: VirtualBox! In most cases this is fine, but in rare cases it can
    collabn2: prevent things such as shared folders from working properly. If you see
    collabn2: shared folder errors, please make sure the guest additions within the
    collabn2: virtual machine match the version of VirtualBox you have installed on
    collabn2: your host and reload your VM.
    collabn2:
    collabn2: Guest Additions Version: 5.0.0
    collabn2: VirtualBox Version: 5.1
==> collabn2: Setting hostname...
==> collabn2: Configuring and enabling network interfaces...
==> collabn2: Mounting shared folders...
    collabn2: /vagrant => E:/racattack-ansible-oracle
    collabn2: /media/sf_12cR1 => E:/racattack-ansible-oracle/12cR1
==> collabn2: Detected mount owner ID within mount options. (uid: 54320 guestpath: /media/sf_12cR1)
==> collabn2: Detected mount group ID within mount options. (gid: 54321 guestpath: /media/sf_12cR1)
    collabn2: /media/stagefiles => E:/racattack-ansible-oracle/stagefiles
==> collabn2: Detected mount group ID within mount options. (gid: 54321 guestpath: /media/stagefiles)
==> collabn2: Running provisioner: shell...
    collabn2: Running: inline script
==> collabn2: overwriting /etc/resolv.conf
==> collabn2: Running provisioner: shell...
    collabn2: Running: inline script
==> collabn2: Stopping named:
==> collabn2: [  OK  ]
==> collabn2: wrote key file "/etc/rndc.key"
==> collabn2: Stopping named:
==> collabn2: [  OK  ]
==> collabn2: Starting named:
==> collabn2: [  OK  ]
==> collabn2: successfully completed named steps
==> collabn1: Box 'kikitux/oracle6-racattack' could not be found. Attempting to find and install...
    collabn1: Box Provider: virtualbox
    collabn1: Box Version: >= 0
==> collabn1: Loading metadata for box 'kikitux/oracle6-racattack'
    collabn1: URL: https://atlas.hashicorp.com/kikitux/oracle6-racattack
==> collabn1: Adding box 'kikitux/oracle6-racattack' (v16.01.01) for provider: virtualbox
==> collabn1: Importing base box 'kikitux/oracle6-racattack'...
==> collabn1: Matching MAC address for NAT networking...
==> collabn1: Checking if box 'kikitux/oracle6-racattack' is up to date...
==> collabn1: Setting the name of the VM: collabn1.1703260604
==> collabn1: Fixed port collision for 22 => 2222. Now on port 2201.
==> collabn1: Clearing any previously set network interfaces...
==> collabn1: Preparing network interfaces based on configuration...
    collabn1: Adapter 1: nat
    collabn1: Adapter 2: hostonly
    collabn1: Adapter 3: hostonly
==> collabn1: Forwarding ports...
    collabn1: 22 (guest) => 2201 (host) (adapter 1)
==> collabn1: Running 'pre-boot' VM customizations...
==> collabn1: Booting VM...
==> collabn1: Waiting for machine to boot. This may take a few minutes...
    collabn1: SSH address: 127.0.0.1:2201
    collabn1: SSH username: vagrant
    collabn1: SSH auth method: private key
    collabn1: Warning: Remote connection disconnect. Retrying...
==> collabn1: Machine booted and ready!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[collabn1] GuestAdditions versions on your host (5.1.18) and guest (5.0.0) do not match.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Loaded plugins: security
Setting up Install Process
http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'public-yum.oracle.com'"
Trying other mirror.
http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'public-yum.oracle.com'"
Trying other mirror.
http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'public-yum.oracle.com'"
Trying other mirror.
Could not get metalink https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=x86_64 error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.fedoraproject.org'"
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Package kernel-uek-devel-2.6.39-400.250.9.el6uek.x86_64 already installed and latest version
Package gcc-4.4.7-16.el6.x86_64 already installed and latest version
Package 1:make-3.81-20.el6.x86_64 already installed and latest version
Package 4:perl-5.10.1-141.el6.x86_64 already installed and latest version
Package bzip2-1.0.5-7.el6_0.x86_64 already installed and latest version
Nothing to do
Copy iso file D:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
Installing Virtualbox Guest Additions 5.1.18 - guest version is 5.0.0
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.18 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.0.0 of VirtualBox Guest Additions...
Stopping VirtualBox Additions [FAILED]
(Cannot unload module vboxguest)
Removing existing VirtualBox non-DKMS kernel modules[  OK  ]
[  OK  ] VirtualBox Guest Addition service [  OK  ]
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Building Guest Additions kernel modules.
vboxadd.sh: You should restart your guest to make sure the new modules are actually used.
vboxadd.sh: Starting the VirtualBox Guest Additions.

Could not find the X.Org or XFree86 Window System, skipping.


Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   5.0.0
VBoxService inside the vm claims: 5.1.18
Going on, assuming VBoxService is correct...
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   5.0.0
VBoxService inside the vm claims: 5.1.18
Going on, assuming VBoxService is correct...
==> collabn1: Checking for guest additions in VM...
    collabn1: The guest additions on this VM do not match the installed version of
    collabn1: VirtualBox! In most cases this is fine, but in rare cases it can
    collabn1: prevent things such as shared folders from working properly. If you see
    collabn1: shared folder errors, please make sure the guest additions within the
    collabn1: virtual machine match the version of VirtualBox you have installed on
    collabn1: your host and reload your VM.
    collabn1:
    collabn1: Guest Additions Version: 5.0.0
    collabn1: VirtualBox Version: 5.1
==> collabn1: Setting hostname...
==> collabn1: Configuring and enabling network interfaces...
==> collabn1: Mounting shared folders...
    collabn1: /vagrant => E:/racattack-ansible-oracle
    collabn1: /media/sf_12cR1 => E:/racattack-ansible-oracle/12cR1
==> collabn1: Detected mount owner ID within mount options. (uid: 54320 guestpath: /media/sf_12cR1)
==> collabn1: Detected mount group ID within mount options. (gid: 54321 guestpath: /media/sf_12cR1)
    collabn1: /media/stagefiles => E:/racattack-ansible-oracle/stagefiles
==> collabn1: Detected mount owner ID within mount options. (uid: 1000 guestpath: /media/stagefiles)
==> collabn1: Detected mount group ID within mount options. (gid: 54321 guestpath: /media/stagefiles)
==> collabn1: Running provisioner: shell...
    collabn1: Running: inline script
==> collabn1: overwriting /etc/resolv.conf
==> collabn1: Running provisioner: shell...
    collabn1: Running: inline script
==> collabn1: wrote key file "/etc/rndc.key"
==> collabn1: Stopping named:
==> collabn1: [  OK  ]
==> collabn1: Starting named:
==> collabn1: [  OK  ]
==> collabn1: successfully completed named steps

======================================================================

falcon@falconidae MINGW64 /e/racattack-ansible-oracle (master)
$ vagrant status

collabn2 eth1 lanip  :192.168.78.52
collabn2 eth2 privip :172.16.100.52
collabn2 dns server role is slave

collabn1 eth1 lanip  :192.168.78.51
collabn1 eth2 privip :172.16.100.51
collabn1 dns server role is master
Current machine states:

collabn2                  running (virtualbox)
collabn1                  running (virtualbox)

This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run `vagrant status NAME`.

falcon@falconidae MINGW64 /e/racattack-ansible-oracle (master)
$ vboxmanage list runningvms
"hashicorp_default_1490531708969_67077" {ab780940-aeef-4e4c-a868-6b5c6f81af2b}
"collabn2.1703260556" {71023f40-8635-4664-8c6e-730a1bfbe0e1}
"collabn1.1703260604" {d20095ef-e5ed-4554-96e0-0168125b3dd8}

======================================================================

falcon@falconidae MINGW64 /e/racattack-ansible-oracle (master)
$ vagrant ssh collabn1

collabn1 eth1 lanip  :192.168.78.51
collabn1 eth2 privip :172.16.100.51
collabn1 dns server role is master
Last login: Sun Mar 26 13:20:43 2017 from 10.0.2.2
[vagrant@collabn1 ~]$ ls -al
total 32
drwx------  3 vagrant vagrant 4096 Mar 26 13:10 .
drwxr-xr-x. 5 root    root    4096 Aug  4  2015 ..
-rw-------  1 vagrant vagrant  139 Mar 26 13:22 .bash_history
-rw-r--r--  1 vagrant vagrant   18 May  7  2015 .bash_logout
-rw-r--r--  1 vagrant vagrant  176 May  7  2015 .bash_profile
-rw-r--r--  1 vagrant vagrant  124 May  7  2015 .bashrc
-rw-r--r--  1 vagrant vagrant  121 Dec 20  2012 .kshrc
drwx------  2 vagrant vagrant 4096 Aug  4  2015 .ssh

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Don't know password and not same as username.
[vagrant@collabn1 ~]$ su - oracle
Password:
su: incorrect password
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

[vagrant@collabn1 ~]$ sudo su - oracle
[oracle@collabn1 ~]$ exit
logout
[vagrant@collabn1 ~]$ sudo su -
[root@collabn1 ~]# cat /etc/passwd | column -t -s :
root       x  0      0      root                          /root                /bin/bash
bin        x  1      1      bin                           /bin                 /sbin/nologin
daemon     x  2      2      daemon                        /sbin                /sbin/nologin
adm        x  3      4      adm                           /var/adm             /sbin/nologin
lp         x  4      7      lp                            /var/spool/lpd       /sbin/nologin
sync       x  5      0      sync                          /sbin                /bin/sync
shutdown   x  6      0      shutdown                      /sbin                /sbin/shutdown
halt       x  7      0      halt                          /sbin                /sbin/halt
mail       x  8      12     mail                          /var/spool/mail      /sbin/nologin
uucp       x  10     14     uucp                          /var/spool/uucp      /sbin/nologin
operator   x  11     0      operator                      /root                /sbin/nologin
games      x  12     100    games                         /usr/games           /sbin/nologin
gopher     x  13     30     gopher                        /var/gopher          /sbin/nologin
ftp        x  14     50     FTP User                      /var/ftp             /sbin/nologin
nobody     x  99     99     Nobody                        /                    /sbin/nologin
vcsa       x  69     69     virtual console memory owner  /dev                 /sbin/nologin
rpc        x  32     32     Rpcbind Daemon                /var/cache/rpcbind   /sbin/nologin
rpcuser    x  29     29     RPC Service User              /var/lib/nfs         /sbin/nologin
nfsnobody  x  65534  65534  Anonymous NFS User            /var/lib/nfs         /sbin/nologin
saslauth   x  499    76     "Saslauthd user"              /var/empty/saslauth  /sbin/nologin
postfix    x  89     89     /var/spool/postfix            /sbin/nologin
sshd       x  74     74     Privilege-separated SSH       /var/empty/sshd      /sbin/nologin
named      x  25     25     Named                         /var/named           /sbin/nologin
dbus       x  81     81     System message bus            /                    /sbin/nologin
oracle     x  54321  54321  /home/oracle                  /bin/bash
applmgr    x  54322  54321  /home/applmgr                 /bin/bash
puppet     x  52     52     Puppet                        /var/lib/puppet      /sbin/nologin
vboxadd    x  498    1      /var/run/vboxadd              /bin/false
vagrant    x  1000   1000   /home/vagrant                 /bin/bash
[root@collabn1 ~]# df -h
Filesystem        Size  Used Avail Use% Mounted on
/dev/sda3          27G  2.6G   23G  11% /
tmpfs             1.5G     0  1.5G   0% /dev/shm
/dev/sda1         485M   93M  367M  21% /boot
/dev/sdb1          50G  180M   48G   1% /u01
vagrant           466G  370G   97G  80% /vagrant
media_sf_12cR1    466G  370G   97G  80% /media/sf_12cR1
media_stagefiles  466G  370G   97G  80% /media/stagefiles
[root@collabn1 ~]# cd /media/sf_12cR1/
[root@collabn1 sf_12cR1]# ls -l
total 4962982
-rwxrwxrwx 1 54320 oinstall          0 Mar 26 12:45 keep
-rwxrwxrwx 1 54320 oinstall 1673544724 Mar 25 20:20 linuxamd64_12102_database_1of2.zip
-rwxrwxrwx 1 54320 oinstall 1014530602 Mar 25 20:32 linuxamd64_12102_database_2of2.zip
-rwxrwxrwx 1 54320 oinstall 1747043545 Mar 25 20:44 linuxamd64_12102_grid_1of2.zip
-rwxrwxrwx 1 54320 oinstall  646972897 Mar 25 20:42 linuxamd64_12102_grid_2of2.zip
-rwxrwxrwx 1 54320 oinstall        181 Mar 26 12:45 readme.txt
[root@collabn1 sf_12cR1]#

======================================================================

falcon@falconidae MINGW64 /e/racattack-ansible-oracle (master)
$ vagrant ssh collabn2

collabn2 eth1 lanip  :192.168.78.52
collabn2 eth2 privip :172.16.100.52
collabn2 dns server role is slave
Last login: Sun Mar 26 13:10:38 2017 from 10.0.2.2
[vagrant@collabn2 ~]$ ls -al
total 32
drwx------  3 vagrant vagrant 4096 Mar 26 13:14 .
drwxr-xr-x. 5 root    root    4096 Aug  4  2015 ..
-rw-------  1 vagrant vagrant   56 Mar 26 13:14 .bash_history
-rw-r--r--  1 vagrant vagrant   18 May  7  2015 .bash_logout
-rw-r--r--  1 vagrant vagrant  176 May  7  2015 .bash_profile
-rw-r--r--  1 vagrant vagrant  124 May  7  2015 .bashrc
-rw-r--r--  1 vagrant vagrant  121 Dec 20  2012 .kshrc
drwx------  2 vagrant vagrant 4096 Aug  4  2015 .ssh
[vagrant@collabn2 ~]$ sudo su -
[root@collabn2 ~]# cat /etc/passwd | column -t -s :
root       x  0      0      root                          /root                /bin/bash
bin        x  1      1      bin                           /bin                 /sbin/nologin
daemon     x  2      2      daemon                        /sbin                /sbin/nologin
adm        x  3      4      adm                           /var/adm             /sbin/nologin
lp         x  4      7      lp                            /var/spool/lpd       /sbin/nologin
sync       x  5      0      sync                          /sbin                /bin/sync
shutdown   x  6      0      shutdown                      /sbin                /sbin/shutdown
halt       x  7      0      halt                          /sbin                /sbin/halt
mail       x  8      12     mail                          /var/spool/mail      /sbin/nologin
uucp       x  10     14     uucp                          /var/spool/uucp      /sbin/nologin
operator   x  11     0      operator                      /root                /sbin/nologin
games      x  12     100    games                         /usr/games           /sbin/nologin
gopher     x  13     30     gopher                        /var/gopher          /sbin/nologin
ftp        x  14     50     FTP User                      /var/ftp             /sbin/nologin
nobody     x  99     99     Nobody                        /                    /sbin/nologin
vcsa       x  69     69     virtual console memory owner  /dev                 /sbin/nologin
rpc        x  32     32     Rpcbind Daemon                /var/cache/rpcbind   /sbin/nologin
rpcuser    x  29     29     RPC Service User              /var/lib/nfs         /sbin/nologin
nfsnobody  x  65534  65534  Anonymous NFS User            /var/lib/nfs         /sbin/nologin
saslauth   x  499    76     "Saslauthd user"              /var/empty/saslauth  /sbin/nologin
postfix    x  89     89     /var/spool/postfix            /sbin/nologin
sshd       x  74     74     Privilege-separated SSH       /var/empty/sshd      /sbin/nologin
named      x  25     25     Named                         /var/named           /sbin/nologin
dbus       x  81     81     System message bus            /                    /sbin/nologin
oracle     x  54321  54321  /home/oracle                  /bin/bash
applmgr    x  54322  54321  /home/applmgr                 /bin/bash
puppet     x  52     52     Puppet                        /var/lib/puppet      /sbin/nologin
vboxadd    x  498    1      /var/run/vboxadd              /bin/false
vagrant    x  1000   1000   /home/vagrant                 /bin/bash
[root@collabn2 ~]# df -h
Filesystem        Size  Used Avail Use% Mounted on
/dev/sda3          27G  2.6G   23G  11% /
tmpfs             1.5G     0  1.5G   0% /dev/shm
/dev/sda1         485M   93M  367M  21% /boot
/dev/sdb1          50G  180M   48G   1% /u01
vagrant           466G  370G   97G  80% /vagrant
media_sf_12cR1    466G  370G   97G  80% /media/sf_12cR1
media_stagefiles  466G  370G   97G  80% /media/stagefiles
[root@collabn2 ~]# cd /media/sf_12cR1/
[root@collabn2 sf_12cR1]# ls -l
total 4962982
-rwxrwxrwx 1 54320 oinstall          0 Mar 26 12:45 keep
-rwxrwxrwx 1 54320 oinstall 1673544724 Mar 25 20:20 linuxamd64_12102_database_1of2.zip
-rwxrwxrwx 1 54320 oinstall 1014530602 Mar 25 20:32 linuxamd64_12102_database_2of2.zip
-rwxrwxrwx 1 54320 oinstall 1747043545 Mar 25 20:44 linuxamd64_12102_grid_1of2.zip
-rwxrwxrwx 1 54320 oinstall  646972897 Mar 25 20:42 linuxamd64_12102_grid_2of2.zip
-rwxrwxrwx 1 54320 oinstall        181 Mar 26 12:45 readme.txt
[root@collabn2 sf_12cR1]#

======================================================================

falcon@falconidae MINGW64 /e/racattack-ansible-oracle (master)
$ vagrant ssh-config

collabn2 eth1 lanip  :192.168.78.52
collabn2 eth2 privip :172.16.100.52
collabn2 dns server role is slave

collabn1 eth1 lanip  :192.168.78.51
collabn1 eth2 privip :172.16.100.51
collabn1 dns server role is master
Host collabn2
  HostName 127.0.0.1
  User vagrant
  Port 2200
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile C:/Users/falcon/.vagrant.d/insecure_private_key
  IdentitiesOnly yes
  LogLevel FATAL

Host collabn1
  HostName 127.0.0.1
  User vagrant
  Port 2201
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile C:/Users/falcon/.vagrant.d/insecure_private_key
  IdentitiesOnly yes
  LogLevel FATAL


falcon@falconidae MINGW64 /e/racattack-ansible-oracle (master)
$

Using username "vagrant".
Authenticating with public key "imported-openssh-key"
Last login: Sun Mar 26 14:00:36 2017 from 10.0.2.2
[vagrant@collabn1 ~]$

Using username "vagrant".
Authenticating with public key "imported-openssh-key"
Last login: Sun Mar 26 14:01:14 2017 from 10.0.2.2
[vagrant@collabn2 ~]$

March 25, 2017

RAC Attack Vagrant FAILED

Filed under: Vagrant,VirtualBox — mdinh @ 10:34 pm

If anyone has successfully configured RAC Attack using Vagrant, I really would love to know how you did it.

First, instructions are all over the place and I finally followed the one below.

https://en.wikibooks.org/wiki/RAC_Attack_-_Oracle_Cluster_Database_at_Home/RAC_Attack_Automation

Does anyone know what the vagrant password is?

E:\vagrantfile\OracleLinux\racattack12cR1>vagrant up

collabn2 eth1 lanip  :192.168.78.52
collabn2 eth2 privip :172.16.100.52
collabn2 dns server role is slave
on first boot shared disks will be created, this will take some time

collabn1 eth1 lanip  :192.168.78.51
collabn1 eth2 privip :172.16.100.51
collabn1 dns server role is master
Bringing machine 'collabn2' up with 'virtualbox' provider...
Bringing machine 'collabn1' up with 'virtualbox' provider...
==> collabn2: Importing base box 'racattack/oracle65'...
==> collabn2: Matching MAC address for NAT networking...
==> collabn2: Checking if box 'racattack/oracle65' is up to date...
==> collabn2: Setting the name of the VM: collabn2.1703251454
==> collabn2: Fixed port collision for 22 => 2222. Now on port 2200.
==> collabn2: Clearing any previously set network interfaces...
==> collabn2: Preparing network interfaces based on configuration...
    collabn2: Adapter 1: nat
    collabn2: Adapter 2: hostonly
    collabn2: Adapter 3: hostonly
==> collabn2: Forwarding ports...
    collabn2: 22 (guest) => 2200 (host) (adapter 1)
==> collabn2: Running 'pre-boot' VM customizations...
==> collabn2: Booting VM...
==> collabn2: Waiting for machine to boot. This may take a few minutes...
    collabn2: SSH address: 127.0.0.1:2200
    collabn2: SSH username: vagrant
    collabn2: SSH auth method: private key
    collabn2:
    collabn2: Vagrant insecure key detected. Vagrant will automatically replace
    collabn2: this with a newly generated keypair for better security.
    collabn2:
    collabn2: Inserting generated public key within guest...
    collabn2: Removing insecure key from the guest if it's present...
    collabn2: Key inserted! Disconnecting and reconnecting using new SSH key...
    collabn2: Warning: Authentication failure. Retrying...
..........	
    collabn2: Warning: Authentication failure. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

E:\vagrantfile\OracleLinux\racattack12cR1>

++++++++++++++++++++++++++++

E:\vagrantfile\OracleLinux\racattack12cR1>vagrant plugin install vagrant-rekey-ssh
Installing the 'vagrant-rekey-ssh' plugin. This can take a few minutes...
Fetching: sshkey-1.9.0.gem (100%)
Fetching: vagrant-rekey-ssh-0.1.9.gem (100%)
Installed the plugin 'vagrant-rekey-ssh (0.1.9)'!

E:\vagrantfile\OracleLinux\racattack12cR1>vagrant box list
racattack/oracle65 (virtualbox, 16.01.01)
ubuntu/trusty64    (virtualbox, 20170313.0.7)

E:\vagrantfile\OracleLinux\racattack12cR1>vagrant reload

collabn2 eth1 lanip  :192.168.78.52
collabn2 eth2 privip :172.16.100.52
collabn2 dns server role is slave

collabn1 eth1 lanip  :192.168.78.51
collabn1 eth2 privip :172.16.100.51
collabn1 dns server role is master
==> collabn2: Less insecure SSH key not found, generating key
==> collabn2: Less insecure SSH key generated and stored at C:/Users/falcon/.vagrant.d/less_insecure_private_key
==> collabn2: Attempting graceful shutdown of VM...
    collabn2: Guest communication could not be established! This is usually because
    collabn2: SSH is not running, the authentication information was changed,
    collabn2: or some other networking issue. Vagrant will force halt, if
    collabn2: capable.
==> collabn2: Forcing shutdown of VM...
==> collabn2: Checking if box 'racattack/oracle65' is up to date...
==> collabn2: Setting the name of the VM: collabn2.1703251507
==> collabn2: Clearing any previously set forwarded ports...
==> collabn2: Fixed port collision for 22 => 2222. Now on port 2200.
==> collabn2: Clearing any previously set network interfaces...
==> collabn2: Preparing network interfaces based on configuration...
    collabn2: Adapter 1: nat
    collabn2: Adapter 2: hostonly
    collabn2: Adapter 3: hostonly
==> collabn2: Forwarding ports...
    collabn2: 22 (guest) => 2200 (host) (adapter 1)
==> collabn2: Running 'pre-boot' VM customizations...
==> collabn2: Booting VM...
==> collabn2: Waiting for machine to boot. This may take a few minutes...
    collabn2: SSH address: 127.0.0.1:2200
    collabn2: SSH username: vagrant
    collabn2: SSH auth method: private key
    collabn2: Warning: Authentication failure. Retrying...
..........	
    collabn2: Warning: Authentication failure. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

E:\vagrantfile\OracleLinux\racattack12cR1>

++++++++++++++++++++++++++++++

E:\vagrantfile\OracleLinux\racattack12cR1>vagrant ssh

collabn2 eth1 lanip  :192.168.78.52
collabn2 eth2 privip :172.16.100.52
collabn2 dns server role is slave

collabn1 eth1 lanip  :192.168.78.51
collabn1 eth2 privip :172.16.100.51
collabn1 dns server role is master
This command requires a specific VM name to target in a multi-VM environment.

E:\vagrantfile\OracleLinux\racattack12cR1>vagrant box list
racattack/oracle65 (virtualbox, 16.01.01)
ubuntu/trusty64    (virtualbox, 20170313.0.7)


E:\vagrantfile\OracleLinux\racattack12cR1>vagrant ssh collabn1

collabn1 eth1 lanip  :192.168.78.51
collabn1 eth2 privip :172.16.100.51
collabn1 dns server role is master
VM must be created before running this command. Run `vagrant up` first.

E:\vagrantfile\OracleLinux\racattack12cR1>vboxmanage list runningvms
"ubuntu_default_1490460698004_34177" {78574166-49a6-433f-af6a-f3d03146a5f4}
"collabn2.1703251507" {ef37e131-f44a-49f8-ae2a-7eed423c1c7e}

E:\vagrantfile\OracleLinux\racattack12cR1>vagrant ssh collabn2

collabn2 eth1 lanip  :192.168.78.52
collabn2 eth2 privip :172.16.100.52
collabn2 dns server role is slave
vagrant@127.0.0.1's password:
vagrant@127.0.0.1's password:
vagrant@127.0.0.1's password:
Connection to 127.0.0.1 closed by remote host.
Connection to 127.0.0.1 closed.

E:\vagrantfile\OracleLinux\racattack12cR1>vagrant ssh collabn2

collabn2 eth1 lanip  :192.168.78.52
collabn2 eth2 privip :172.16.100.52
collabn2 dns server role is slave
vagrant@127.0.0.1's password:
vagrant@127.0.0.1's password:

E:\vagrantfile\OracleLinux\racattack12cR1>

++++++++++++++++++++++++++++++

E:\vagrantfile>vagrant box list
racattack/oracle65 (virtualbox, 16.01.01)
ubuntu/trusty64    (virtualbox, 20170313.0.7)

E:\vagrantfile>vagrant box remove racattack/oracle65

collabn2 eth1 lanip  :192.168.78.52
collabn2 eth2 privip :172.16.100.52
collabn2 dns server role is slave
on first boot shared disks will be created, this will take some time
Removing box 'racattack/oracle65' (v16.01.01) with provider 'virtualbox'...

E:\vagrantfile>vagrant box list
ubuntu/trusty64 (virtualbox, 20170313.0.7)

E:\vagrantfile>

Vagrant was unable to mount VirtualBox shared folders – Solved

Filed under: Vagrant,VirtualBox — mdinh @ 5:14 pm

My starting point of installing Vagrant on Windows:
https://www.sitepoint.com/getting-started-vagrant-windows/
http://tech.osteel.me/posts/2015/01/25/how-to-use-vagrant-on-windows.html

If you are attempting to use Vagrant with VirtualBox, you may encountered issues with mounting shared folders.

Update VirtualBox to 5.1.18r114002

E:\Vagrant\sitepoint>vagrant version

Installed Version: 1.9.3
Latest Version: 1.9.3

You're running an up-to-date version of Vagrant!

E:\Vagrant\sitepoint>vagrant init ubuntu/trusty64

A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

E:\Vagrant\sitepoint>vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/trusty64'
    default: URL: https://atlas.hashicorp.com/ubuntu/trusty64
==> default: Adding box 'ubuntu/trusty64' (v20170313.0.7) for provider: virtualbox
    default: Downloading: https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/20170313.0.7/providers/virtualbox.box
==> default: Successfully added box 'ubuntu/trusty64' (v20170313.0.7) for 'virtualbox'!
..........
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default:
    default: Guest Additions Version: 4.3.36
    default: VirtualBox Version: 5.1
==> default: Mounting shared folders...
    default: /vagrant => E:/Vagrant/sitepoint
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:

mount -t vboxsf -o uid=1000,gid=1000 vagrant /vagrant

The error output from the command was:

: No such file or directory

E:\Vagrant\sitepoint>vboxmanage –version

5.1.16r113841

E:\Vagrant\sitepoint>vboxmanage list runningvms

"sitepoint_default_1490457189188_6052" {b176bb95-09ff-44d8-863f-def329afb003}

E:\Vagrant\sitepoint>vboxmanage showvminfo b176bb95-09ff-44d8-863f-def329afb003

Name:            sitepoint_default_1490457189188_6052
Groups:          /
Guest OS:        Ubuntu (64-bit)

Shared folders:
Name: 'vagrant', Host path: '\\?\E:\Vagrant\sitepoint' (machine mapping), writable

E:\Vagrant\sitepoint>vagrant plugin install vagrant-vbguest

Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Fetching: micromachine-2.0.0.gem (100%)
Fetching: vagrant-vbguest-0.13.0.gem (100%)
Installed the plugin 'vagrant-vbguest (0.13.0)'!

E:\Vagrant\sitepoint>vboxmanage controlvm sitepoint_default_1490457189188_6052 poweroff

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

E:\Vagrant\sitepoint>vboxmanage unregistervm sitepoint_default_1490457189188_6052 –delete

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

Update VirtualBox and Try Again

This time, create new directory: E:\Vagrant\ubuntu

E:\Vagrant\ubuntu>vboxmanage –version

5.1.18r114002

E:\Vagrant\ubuntu>vagrant init ubuntu/trusty64

A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

E:\Vagrant\ubuntu>vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/trusty64'
    default: URL: https://atlas.hashicorp.com/ubuntu/trusty64
==> default: Adding box 'ubuntu/trusty64' (v20170313.0.7) for provider: virtualbox
    default: Downloading: https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/20170313.0.7/providers/virtualbox.box
    default: Progress: 100% (Rate: 1519k/s, Estimated time remaining: --:--:--)
==> default: Successfully added box 'ubuntu/trusty64' (v20170313.0.7) for 'virtualbox'!
..........
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default:
    default: Guest Additions Version: 4.3.36
    default: VirtualBox Version: 5.1
==> default: Mounting shared folders...
    default: /vagrant => E:/Vagrant/ubuntu

E:\Vagrant\ubuntu>

Config Public and Private Keys

E:\Vagrant\ubuntu>vagrant ssh-config

Host default
  HostName 127.0.0.1
  User vagrant
  Port 2222
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile E:/Vagrant/ubuntu/.vagrant/machines/default/virtualbox/private_key
  IdentitiesOnly yes
  LogLevel FATAL

Connect to server: with passwordless auto login using PuTTY

Using username "vagrant".
Authenticating with public key "imported-openssh-key"
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-113-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Sat Mar 25 17:23:22 UTC 2017

  System load:  0.0               Processes:           74
  Usage of /:   3.6% of 39.34GB   Users logged in:     0
  Memory usage: 25%               IP address for eth0: 10.0.2.15
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

0 packages can be updated.
0 updates are security updates.

New release '16.04.2 LTS' available.
Run 'do-release-upgrade' to upgrade to it.


Last login: Sat Mar 25 17:23:22 2017 from 10.0.2.2
vagrant@vagrant-ubuntu-trusty-64:~$

E:\Vagrant\ubuntu>vagrant ssh

Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-113-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Sat Mar 25 17:36:01 UTC 2017

  System load:  0.0               Processes:           77
  Usage of /:   3.6% of 39.34GB   Users logged in:     1
  Memory usage: 25%               IP address for eth0: 10.0.2.15
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

0 packages can be updated.
0 updates are security updates.

New release '16.04.2 LTS' available.
Run 'do-release-upgrade' to upgrade to it.


Last login: Sat Mar 25 17:36:01 2017 from 10.0.2.2
vagrant@vagrant-ubuntu-trusty-64:~$

December 18, 2016

Cloning 12c SE2 Oracle Home for Windows 2012 R2

Filed under: 12c,cloning,VirtualBox,Windows — mdinh @ 6:13 am

Process is pretty much similar to *nix environment with a few exceptions.

It was harder than it should be since I wanted to perform task using CLI vs GUI.

This does not cover zip and unzip of OH and I cannot believe how junky Winzip has become since I have typically been using 7-Zip.

Click link below for details.
Cloning 12c SE2 Oracle Home for Windows 2012 R2

 

 

May 28, 2014

Headless VirtualBox on Windows 7

Filed under: VirtualBox — mdinh @ 1:04 am

Recently I came to know about Headless features for VirtualBox and was curious as to how it works.

When using Headless, there is not a need to start VirtualBox GUI which is nice and removes clutters from Desktop.

Here’s a demo on how to start VirtualBox Headless.

List available VMs.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\dinh>cd "c:\Program Files\Oracle\VirtualBox"

c:\Program Files\Oracle\VirtualBox>VBoxManage.exe list vms
"arrow" {202d474e-7b00-4fce-a38a-844a650545b8}

Start VM Headless.

c:\Program Files\Oracle\VirtualBox>VBoxManage.exe startvm arrow --type headless
Waiting for VM "arrow" to power on...
VM "arrow" has been successfully started.

c:\Program Files\Oracle\VirtualBox>exit

Test connection to VM.
VM was shutdown in the next step while connected.

dinh@CMWPHV1 ~
$ ssh oracle@192.168.56.11
oracle@192.168.56.11's password:
Last login: Tue May 27 17:34:30 2014 from 192.168.56.1
The Oracle base remains unchanged with value /u01/app/oracle
oracle@arrow:san:/home/oracle
$
Broadcast message from root@arrow.localdomain
        (unknown) at 17:38 ...

The system is going down for halt NOW!

Broadcast message from root@arrow.localdomain
        (unknown) at 17:38 ...

The system is going down for halt NOW!
Connection to 192.168.56.11 closed by remote host.
Connection to 192.168.56.11 closed.

dinh@CMWPHV1 ~
$

Shutdown VM.

c:\Program Files\Oracle\VirtualBox>VBoxManage.exe controlvm arrow acpipowerbutton

January 15, 2013

OEL 6.3 Minimal Install VirtualBox for 11.2.0.3 Database

Filed under: 11g,linux,oracle,VirtualBox — mdinh @ 4:15 am

I am a lazy DBA. The less configuration I do the less chance I have to make a mistake.

Surprisingly, oracle-rdbms-server-11gR2-preinstall does not configure pam.d/login and selinux.

Here’s how to create kernel panic with incorrect configuration.

kernelpanic

NOTE: Configuration should be SELINUX=disabled NOT SELINUXTYPE=disabled

At the same time, I need to slow down and read more carefully.

Here is the super condensed version since there are already many blogs on how to install Linux on VirtuaBox.

Customize Minimal Install

Base System
> Base
> Client Management Tools
Desktops
> Desktop
> Desktop Platform
> Graphical Administration Tools
> X Window System

NTP not configured

Reboot

Disable Firewall/Disable Software Updates

yum install oracle-rdbms-server-11gR2-preinstall

Note: I did not have to modify public-yum-ol6.repo for OEL 6.3

Read more about it here https://blogs.oracle.com/linux/entry/oracle_rdbms_server_11gr2_pre

Modify /etc/grub.conf to include: divider=10

Read more about it here http://www.virtualbox.org/manual/ch12.html#idp13392912 via @rmoff https://twitter.com/rmoff/status/287187594712862721

Modify /etc/pam.d/login to include: session required pam_limits.so

Modify /etc/selinux/config: SELINUX=disabled

Install Guest Additions.

yum clean all

Configure /etc/hosts accordingly.

Reboot

As root, Configure oracle:

passwd oracle
usermod -G dba,vboxsf oracle
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oraInventory
mkdir -p /u01/app/oracle/cfgtoollogs
mkdir -p /u01/app/oracle/product/11.2.0.3/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01

As oracle, Modify /home/oracle/.bash_profile to include:

# User specific environment and startup programs
if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi

export TEMP=/tmp
export TMPDIR=$TEMP
export BASE_PATH=$PATH
export ORACLE_TERM=xterm;
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.3/db_1
export LD_LIBRARY_PATH=/lib:/usr/lib
export ORACLE_HOSTNAME=gg1.localdomain
export ORAENV_ASK=NO
export PS1=”
${LOGNAME}@`hostname -a`:\${ORACLE_SID}:\${PWD}
> ”

Install oracle software only

January 6, 2013

Cloning VM RAC node

Filed under: VirtualBox — mdinh @ 5:46 pm

Software Configuration

Windows 7 SP1 x64 (guest OS)

VirtualBox-4.2.6-82870-Win

VirtualBox installed at D:\VirtualBox

VM Configuration

Clone VM to rac02

VBoxManage clonevm rac01 –mode machine –name rac02 –register

Clone created new directory rac02 as well as copies for all asm disks (rac02-disk?.vdi)

Remove disk attachment from rac02

VBoxManage storageattach rac02 –storagectl “SATA” –port 1 –device 0 –type hdd –medium none

VBoxManage storageattach rac02 –storagectl “SATA” –port 2 –device 0 –type hdd –medium none

VBoxManage storageattach rac02 –storagectl “SATA” –port 3 –device 0 –type hdd –medium none

VBoxManage storageattach rac02 –storagectl “SATA” –port 4 –device 0 –type hdd –medium none

Remove disk image from VirtualBox media registry

Be sure to change directory to where the disks are located.

VBoxManage closemedium disk rac02-disk1.vdi

VBoxManage closemedium disk rac02-disk2.vdi

VBoxManage closemedium disk rac02-disk3.vdi

VBoxManage closemedium disk rac02-disk4.vdi

Delete rac02 virtual disk image

del rac02-disk*.vdi

Attach asm*.vdi to rac02:

Be sure to change directory to where the disks are located.

VBoxManage storageattach rac02 –storagectl “SATA Controller” –port 1 –device 0 –type hdd –medium asm01.vdi –mtype shareable

VBoxManage storageattach rac02 –storagectl “SATA Controller” –port 2 –device 0 –type hdd –medium asm02.vdi –mtype shareable

VBoxManage storageattach rac02 –storagectl “SATA Controller” –port 3 –device 0 –type hdd –medium asm03.vdi –mtype shareable

VBoxManage storageattach rac02 –storagectl “SATA Controller” –port 4 –device 0 –type hdd –medium asm04.vdi –mtype shareable

MWSnap004 2013-01-01, 19_18_48

 

January 7, 2011

VirtualBox Command Line

Filed under: VirtualBox — mdinh @ 4:20 am

I have manually configured VirtualBox Host-Only Ethernet Adapter for static IP.

However, the IP can change after reboot which affects connectivity with the Guest with static IP.

I have not been able able to figure out why.

However, one method to resolve this is to add the following commands in a batch file and have it executed at startup.

VBoxManage hostonlyif ipconfig “VirtualBox Host-Only Ethernet Adapter” –ip 192.168.56.1
VBoxManage dhcpserver modify –ifname “VirtualBox Host-Only Ethernet Adapter” –disable
VBoxManage list -l hostonlyifs

C:\>VBoxManage hostonlyif ipconfig "VirtualBox Host-Only Ethernet Adapter" --ip 192.168.56.1

C:\>VBoxManage dhcpserver modify --ifname "VirtualBox Host-Only Ethernet Adapter" --disable

C:\>VBoxManage list -l hostonlyifs
Name:            VirtualBox Host-Only Ethernet Adapter
GUID:            97cdbf73-e6e7-45d3-a8fe-ea4ee0fd5939
Dhcp:            Disabled
IPAddress:       192.168.56.1
NetworkMask:     255.255.255.0
IPV6Address:     fe80:0000:0000:0000:ecfc:c04f:b7dd:4054
IPV6NetworkMaskPrefixLength: 64
HardwareAddress: 08:00:27:00:98:7d
MediumType:      Ethernet
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter

C:\>

Create a free website or blog at WordPress.com.