Skip to main content

Oracle VM memory issue

After some first baby steps with Oracle VM I wanted to push this thing a little bit further. So my idea was to have more than a couple of VM's running simultaneously.
The Oracle VM told me however that I had not enough memory to do this.
So I was sitting in front of my dedicated laptop and told the screen that there should be 4 GB inside. The laptop however had one of his funny days and told me (using free and top) that really nothing more than 572 MB would be inside the machine.

Hmm - when a machine tells me something I am the first to listen. So I shutdown everything, got my screwdriver, opened the memory compartment and had a look. Indeed 1 bank of 2GB. I didn't check the second bank as this is hidden underneath the keyboard. Closing the machine and powering it up, I prepared myself for another round of telling it that it should recognize a little bit more than 572 MB.

I examined the dmesg and still it told me that there was only 572 MB inside.

Now imagine, you have just seen 2 GB inside (and hope that 3 or 4 are in there) while the Oracle VM keeps telling me that only a very limited part of that memory was there.

So friends and neighbors, there are two possibilities:
a) The memory was KAPUT
b) Something prevents Linux to see/use it all.

As I could not prove or examine option a) I had a look at option b).

A long long time ago I was pretty good with low level Linux (baking my own kernels and so on). And then I remembered that with Xen it is possible to fool around with the memory during boot time.

Checking the menu.lst of the GRUB I found the following:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda2
# initrd /initrd-version.img
#boot=/dev/sda
# Detect64 claims this is 64 bit box
default=2
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Oracle VM Server-ovs (xen-3.4.0 2.6.18-128.2.1.4.9.el5ovs)
root (hd0,0)
kernel /xen-32bit.gz dom0_mem=572M
module /vmlinuz-2.6.18-128.2.1.4.9.el5xen ro root=UUID=ad545ccc-b2bb-450b-a048-a58b22c51cc4
module /initrd-2.6.18-128.2.1.4.9.el5xen.img
title Oracle VM Server-ovs serial console (xen-3.4.0 2.6.18-128.2.1.4.9.el5ovs)
root (hd0,0)
kernel /xen-32bit.gz console=com1,vga com1=57600,8n1 dom0_mem=572M
...

Gotcha!

dom0_mem=572M

So I found the reason for the lack of memory (an amnesic laptop ;-)

Off we go - with a modified menu.lst:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda2
# initrd /initrd-version.img
#boot=/dev/sda
# Detect64 claims this is 64 bit box
default=2
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Oracle VM Server-ovs (xen-3.4.0 2.6.18-128.2.1.4.9.el5ovs)
root (hd0,0)
kernel /xen-32bit.gz dom0_mem=572M
module /vmlinuz-2.6.18-128.2.1.4.9.el5xen ro root=UUID=ad545ccc-b2bb-450b-a048-a58b22c51cc4
module /initrd-2.6.18-128.2.1.4.9.el5xen.img
title Andreas VM Server-ovs (xen-3.4.0 2.6.18-128.2.1.4.9.el5ovs)
root (hd0,0)
kernel /xen-32bit.gz dom0_mem=2048M
module /vmlinuz-2.6.18-128.2.1.4.9.el5xen ro root=UUID=ad545ccc-b2bb-450b-a048-a58b22c51cc4
module /initrd-2.6.18-128.2.1.4.9.el5xen.img
title Oracle VM Server-ovs serial console (xen-3.4.0 2.6.18-128.2.1.4.9.el5ovs)
root (hd0,0)
kernel /xen-32bit.gz console=com1,vga com1=57600,8n1 dom0_mem=572M
...

I added the "Andreas Server-ovs" stanza, to prevent me from a re-installation if something would not work.

So after a reboot my laptop tells me that it has the large amount I was hoping for.

As this part of the memory is just the amount Xen is using there is some more in it.

Checking what really is in there:

[root@ovm ~]# xm info | grep memory
total_memory : 3447
free_memory : 1363
node_to_memory : node0:1363

This looks better.
Well i keep it like this for a while and play with my 2GB for now.

Comments

Just a hint: try to set your grub.conf back to what is was and hit "xm list | grep total_memory" ;)

Popular posts from this blog

Different silent install files WLS 10.3.2 and 10.3.3

Today I tried to cut some corners and use a silent.xml file for WLS 10.3.3 for a silent installation of 10.3.2. To my amazement on a clean machine I received the following error: oracle@xxx001:/opt/oracle$ java -Djava.io.tmpdir=/opt/oracle/tmp -jar /nfsstage/wls1032_generic.jar -mode=silent -silent_xml=./silent/wls_silent.xml -log=/tmp/wls.log Extracting 0%....................................................................................................100% The local BEA product registry is corrupted. Please select another Middleware Home or contact Oracle Support I checked the wls_silent.xml file and found that it includes Coherence, which was not bundled with the 10.3.2 version. So I modified the 10.3.3 silent_xml file from value="WebLogic Server/Core Application Server|WebLogic Server/Administration Console|WebLogic Server/Configuration Wizard and Upgrade Framework|WebLogic Server/Web 2.0 HTTP Pub-Sub Server|WebLogic Server/WebLogic JDBC Drivers|WebLogic Server/Third ...

Unpacking Oracle cpio for AIX

When extracting a cpio file with Oracle software from OTN on AIX you might encounter the following problem: oracle@mymachine-app:/install/oracle/MRCA>cpio -idmv cpio: 0511-903 Out of phase! cpio attempting to continue... cpio: 0511-904 skipping 642010 bytes to get back in phase! One or more files lost and the previous file is possibly corrupt! Segmentation fault The solution is to use the option -idcmv oracle@mymachine-app:/install/oracle/MRCA>cpio -idcmv c Reads and writes header information in ASCII character form. If a cpio archive was created using the c flag, it must be extracted with c flag.

Oracle VirtualBox - first (short) impressions

I am using Oracle VirtualBox now since a couple of weeks in order to establish if it can replace my VMWare Server. I want to put down a couple of quick impressions - which will hopefully be followed up by some more insight. Speed: It seems that Oracle VirtualBox is faster than the VMWare Server. Creating an image as well as starting it up and shutting it down are pretty fast. However if your machine is pushing the limits on memory the shutdown process of an image can easily take 5 minutes. FAT/NTFS: I have not yet found the possibility to create a disk file in chunks of 2GB. VMWare offered this OOTB. Now when I move my image from my Windows7 NTFS filesystem to the FAT external disk it complains about a 20GB file. More research is needed here. Distributing images: I copied the images and gave them to some colleagues during several trainings. My experience is that the different laptops we use are not handled well by VirtualBox. E.g. I had to remove a network from the vbox-file in order t...