{"id":4045,"date":"2014-07-20T02:42:42","date_gmt":"2014-07-20T00:42:42","guid":{"rendered":"http:\/\/www.b.shuttle.de\/hayek\/hayek\/jochen\/wp\/blog-en\/?p=4045"},"modified":"2014-07-20T02:42:42","modified_gmt":"2014-07-20T00:42:42","slug":"oracle-linux-server-as-virtualbox-guest-os-a-few-administrational-experiences","status":"publish","type":"post","link":"https:\/\/wp.jochen.hayek.name\/blog-en\/2014\/07\/20\/oracle-linux-server-as-virtualbox-guest-os-a-few-administrational-experiences\/","title":{"rendered":"&#8220;Oracle Linux Server&#8221; as VirtualBox guest OS: a few administrational experiences"},"content":{"rendered":"<p>\t\t\t\tThere is a VM appliance, that I run \u2026, and that appliance uses Oracle Linux Server as its OS.<\/p>\n<p>I want the appliance&#8217;s hostname to be <em>oracle000<\/em> \u2013 it&#8217;s going to be my Oracle Databaser server anyway.<\/p>\n<p>Q: The appliance&#8217;s network connection to outside \u2013 how to activate it?<\/p>\n<p>Initially the appliance&#8217;s network connection seems to be down \u2013 what&#8217;s wrong?\u00a0The &#8220;Terminals&#8221; on\u00a0the top bar let you activate the connection. BTW: By default this is a NAT connection \u2013 so accessing the appliance network-wise from outside is a bit weird \u2013 but we are going to replace the NAT set-up with a &#8220;more natural&#8221; one in a minute.<\/p>\n<p>Q: How to access the appliance at its own IP address from within the LAN or even further outside?<\/p>\n<p>Within &#8220;Oracle VM VirtualBox Manager&#8221; I set this VM Network Adapter&#8217;s &#8220;<em>Attached to<\/em>&#8221; to &#8220;<em>Bridged Adapter<\/em>&#8220;. Now my LAN&#8217;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 <em>network device\u00a0<\/em>there <em>oracle000<\/em>.<\/p>\n<p>Q: ssh\u00a0w\/o account name from within the appliance to outside and from outside the appliance into it<\/p>\n<p>&nbsp;<\/p>\n<p>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:\u00a0<span style=\"line-height: 1.5\">$HOME\/.ssh\/config . You can do that\u00a0<\/span>on the appliance for reaching other hosts; you can do that on the other hosts around in order to reach the appliance&#8217;s main account oracle.<\/p>\n<p>This is one of the possible kinds of entries on $HOME\/.ssh\/config :<\/p>\n<pre>Host 10.0.2.2\n\u00a0 \u00a0 User xyz<\/pre>\n<p>Q: rsync over ssh<\/p>\n<p>Add this to $HOME\/.bash_profile :<\/p>\n<pre>export RSYNC_RSH=ssh<\/pre>\n<p>Q: installing my favourite tools<\/p>\n<p>My VM host has a couple of handy utilities, that I am always eager to install:<\/p>\n<pre>$ ssh 10.0.2.2 # logging into the VM host\n\u2026\n$ rsync -va 10.0.2.2:bin $HOME\n$ rsync -va 10.0.2.2:Computers $HOME<\/pre>\n<p>Q: How to adapt the timezone to e.g. Europe\/Berlin?<br \/>\n<span style=\"line-height: 1.5\">A: Make \/etc\/localtime a symlink to the right file below \/usr\/share\/zoneinfo\/ !<\/span><\/p>\n<p>Timezone-wise the appliance runs in EST, and I want it to run in Europe\/Berlin:<\/p>\n<ul>\n<li><a href=\"https:\/\/wiki.debian.org\/TimeZoneChanges\">https:\/\/wiki.debian.org\/TimeZoneChanges<\/a>\u00a0\u2013 t<span style=\"line-height: 1.5\">his page told me, the timezone is determined by \/etc\/localtime<\/span><\/li>\n<\/ul>\n<pre>$ ~\/bin\/create_snapshot.sh \/etc\/localtime\n$ ln -s \/usr\/share\/zoneinfo\/Europe\/Berlin \/etc\/localtime<\/pre>\n<p>Q: ssh into the appliance w\/o password \u2013 \u2026\u00a0.ssh\/authorized_keys \u2026<\/p>\n<p>You should know this in advance: Oracle Linux Server makes use of SELinux. That makes it safe but also complicated.<\/p>\n<p>The home directory of user oracle is \/u01\/oracle \u2013 for SELinux that is a non-standard directory, and although I attempted to follow <a href=\"http:\/\/arstechnica.com\/civis\/viewtopic.php?t=1226871\">this<\/a> page WRT an extra file to be created within <code>\/etc\/selinux\/targeted\/modules\/active<\/code> by the name of <code>file_contexts.local<\/code> , I did not succeed.<\/p>\n<p>If you want to switch SELinux off temporarily, this is how to achieve this:<\/p>\n<pre>$ echo 0 &gt; \/selinux\/enforce<\/pre>\n<p>With SELinux turned off, ssh into the appliance works as expected.<\/p>\n<p>Q: Suppplying the appliance with the hosts&#8217;s VirtualBox Guest Additions<\/p>\n<p>The ones installed in the appliance are older then the manager software installed on the host and that seems to cause trouble.<\/p>\n<p>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:<br \/>\n<em><span style=\"line-height: 1.5\">Apparently they do not come as RPM, so it&#8217;s impossible to get hold on them in one go.\u00a0<\/span><span style=\"line-height: 1.5\">I created an extra hierarchy \/etc\/rc.d-QUARANTINE, and I moved all start-up scripts and links to within there. \u2026<\/span><\/em><\/p>\n<p>How to install the host&#8217;s up-to-data \u2026\/VBoxGuestAdditions.iso? Add the ISO\u00a0to a SATA \u00a0Storage Controller Controller. After booting into the appliance:<\/p>\n<pre>$ cd \/media\/VBOXADDITION*\n$ sudo .\/VBoxLinuxAdditions.run<\/pre>\n<p>That process announced it cleans up earlier installations.<\/p>\n<p>Now after rebooting the appliance the appliance&#8217;s window on the host scales perfectly, i.e. resizing the host window also resizes the X-Window server details \u2013 everything is fine there now.<\/p>\n<p>Q: \u2026<\/p>\n<p>\u2026\t\t\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is a VM appliance, that I run \u2026, and that appliance uses Oracle Linux Server as its OS. I want the appliance&#8217;s hostname to be oracle000 \u2013 it&#8217;s going to be my Oracle Databaser server anyway. Q: The appliance&#8217;s network connection to outside \u2013 how to activate it? Initially the appliance&#8217;s network connection seems [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_share_on_mastodon":"0"},"categories":[769,306,688],"tags":[],"class_list":["post-4045","post","type-post","status-publish","format-standard","hentry","category-debian","category-linux","category-virtualbox"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paO0kP-13f","jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/4045","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/comments?post=4045"}],"version-history":[{"count":0,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/4045\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/media?parent=4045"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/categories?post=4045"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/tags?post=4045"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}