Monday Dec 09, 2013

Make the Oracle Service Bus IDE feel at home on Linux

I played a lot with Oracle Service Bus (OSB) in the last few weeks. You will soon know why; no, I can't say right now. I installed it inside an Oracle Enterprise Linux virtual machine, and I must say the installation process is straightforward: install OEPE, install WebLogic, run RCU, run the installer, create a domain... It was nothing special, until I started the Service Bus IDE (OEPE with the OSB plugins). I got the following error messages:

  • Failed to parse the output of ‘adb version’
  • adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

My VM had all the prerequisites listed in the documentation installed. What was wrong, then? Turns out I had used the 64-bit version of Oracle Linux, and the IDE wanted some 32-bit dependencies. To fix the problem, I issued the following commands as root: 

yum install ncurses-libs.i686 libstdc++.i686 libgcc.i686
yum install zlib.i686 zlib-devel.i686

After that, the IDE started like a charm. Expect a few OSB-related posts from me in the future! 

Monday Dec 02, 2013

Put your VirtualBox VMs on a diet

One of the nice things with Oracle VM VirtualBox is that you don't need to allocate all the disk space in advance. It is possible, say, to give a 60 Gb hard drive to a virtual machine but have an actual footprint much lower than that by creating the hard drive in dynamically allocated storage mode. Basically, this means the actual size for the hard drive will match the size of the files it contains. The footprint will grow over time, as you add files. Unfortunately, this is a one way process. The virtual hard drive will take more space on disk as it grows, but will not release the space if it shrinks. This can be a problem, for example, if you copied several Fusion Middleware installers on the VM and want to recuperate that space after installation. 

I am currently playing with VMs a lot, and found a way to get the space back. This is a two step process. The first step is to fill the empty space with zeroes. There are utilities for that on Windows and OS X, but you can do it very easily on the command line on Oracle Enterprise Linux. Simply execute the following commands inside the virtual machine as root (or prefix with sudo):

dd if=/dev/zero of=/hugeemptyfile bs=4096k
rm -rf /hugeemptyfile

 Obviously, you should close all other programs before doing this, and ensure no background process will require disk space while dd is running.

Once this is done, shut down the VM and open a command line on the host machine. Go to the folder where VirtualBox is installed, and type something like this, substituting the correct path and file name for the virtual hard drive:

VBoxManage modifyhd "V:\VirtualBox VMs\Oracle\Oracle.vdi" -compact

 After a few minutes, you will get the wasted space back.

VirtualBox, by the way, has an extensive collection of command line utilities. You can even run a VM without opening the VirtualBox GUI using the VBoxHeadless command, for example. Also: did you know it is possible to start a VM in headless mode from the GUI? Simply press shift at the same time you click on the start button. 

About

Frédéric Desbiens

The musings of a member of the ADF Product Management team.

I focus here on my favorite development framework but also have a strong interest in Mobile Development, Oracle WebCenter and Oracle SOA Suite.

Attentive readers will even find posts about IT Strategy from time to time, an interest of mine since I completed my MBA in 2006.

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« December 2013 »
SunMonTueWedThuFriSat
1
3
4
5
6
7
8
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today