“Oracle Linux Server” as VirtualBox guest OS: a few administrational experiences

There is a VM appliance, that I run …, and that appliance uses Oracle Linux Server as its OS.

I want the appliance’s hostname to be oracle000 – it’s going to be my Oracle Databaser server anyway.

Q: The appliance’s network connection to outside – how to activate it?

Initially the appliance’s network connection seems to be down – what’s wrong? The “Terminals” on the top bar let you activate the connection. BTW: By default this is a NAT connection – so accessing the appliance network-wise from outside is a bit weird – but we are going to replace the NAT set-up with a “more natural” one in a minute.

Q: How to access the appliance at its own IP address from within the LAN or even further outside?

Within “Oracle VM VirtualBox Manager” I set this VM Network Adapter’s “Attached to” to “Bridged Adapter“. Now my LAN’s DHCP server (i.e. the router) assigns an IP address on the LAN to the VM, and actually I told the router to always use the same IP addresss, and I also named the network device there oracle000.

Q: ssh w/o account name from within the appliance to outside and from outside the appliance into it

 

If you do not mention an account with the ssh command, it assumes you want to reach an account by the same name on the remote side. But you are able to configure another account name on a particular remote host via an entry in a local ssh related file: $HOME/.ssh/config . You can do that on the appliance for reaching other hosts; you can do that on the other hosts around in order to reach the appliance’s main account oracle.

This is one of the possible kinds of entries on $HOME/.ssh/config :

Host 10.0.2.2
    User xyz

Q: rsync over ssh

Add this to $HOME/.bash_profile :

export RSYNC_RSH=ssh

Q: installing my favourite tools

My VM host has a couple of handy utilities, that I am always eager to install:

$ ssh 10.0.2.2 # logging into the VM host
…
$ rsync -va 10.0.2.2:bin $HOME
$ rsync -va 10.0.2.2:Computers $HOME

Q: How to adapt the timezone to e.g. Europe/Berlin?
A: Make /etc/localtime a symlink to the right file below /usr/share/zoneinfo/ !

Timezone-wise the appliance runs in EST, and I want it to run in Europe/Berlin:

$ ~/bin/create_snapshot.sh /etc/localtime
$ ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime

Q: ssh into the appliance w/o password – … .ssh/authorized_keys …

You should know this in advance: Oracle Linux Server makes use of SELinux. That makes it safe but also complicated.

The home directory of user oracle is /u01/oracle – for SELinux that is a non-standard directory, and although I attempted to follow this page WRT an extra file to be created within /etc/selinux/targeted/modules/active by the name of file_contexts.local , I did not succeed.

If you want to switch SELinux off temporarily, this is how to achieve this:

$ echo 0 > /selinux/enforce

With SELinux turned off, ssh into the appliance works as expected.

Q: Suppplying the appliance with the hosts’s VirtualBox Guest Additions

The ones installed in the appliance are older then the manager software installed on the host and that seems to cause trouble.

First I thought, I should remove the old addtions before getting the up-to-date one installed, but later I got the impression the installation process removes old additions. But here I am going to describe how I manually removed the old additions:
Apparently they do not come as RPM, so it’s impossible to get hold on them in one go. I created an extra hierarchy /etc/rc.d-QUARANTINE, and I moved all start-up scripts and links to within there. …

How to install the host’s up-to-data …/VBoxGuestAdditions.iso? Add the ISO to a SATA  Storage Controller Controller. After booting into the appliance:

$ cd /media/VBOXADDITION*
$ sudo ./VBoxLinuxAdditions.run

That process announced it cleans up earlier installations.

Now after rebooting the appliance the appliance’s window on the host scales perfectly, i.e. resizing the host window also resizes the X-Window server details – everything is fine there now.

Q: …

This site uses Akismet to reduce spam. Learn how your comment data is processed.