Docker Community Forums

Share and learn in the Docker community.

Docker - Windows 7 - CentOS:6 - Oracle XE

docker

(Krisrr3) #1

Hi guys,

I have Windows 7 and I am building an image which uses centos:6 as a base image, and I was now trying to install Oracle XE on it.

The error that I get is

This system does not meet the minimum requirements for swap space. Based on
the amount of physical memory available on the system, Oracle Database 11g
Express Edition requires 1992 MB of swap space. This system has 1154 MB
of swap space. Configure more swap space on the system and retry the
installation.

I read a few solutions which apply to increasing the swap size on on CentOS itself, but mkswap is not available on the base image and from the other blogs I have read as well it seems that the swap file is actually controlled by the host.

On my Windows machine, I checked the Virtual Memory is 3350 MB. Not really sure if this is linked… :neutral_face:

Can anybody please help me find a solution for this.

Cheers
Kris


(Ranjandas) #2

Hi, even though you are running Windows 7 your docker daemon might be running on a Linux VM right? So its the swap space of the VM that needs to be increased so that the containers gets that. It is not same as virtual memory on windows.

The same topic was discussed before, hope this will help you. Docker & swap space


(Krisrr3) #3

Hi Ranjandas,

thanks for the quick reply. I actually checked that post earlier and I missed the initial part, which is about changing the memory of the host.

So I tried changing the memory of the current host from Oracle Virtual Box GUI, but ended up with the same problem.

I then create a new host, by changing the docker start.sh script and adding the memory settings there

$DOCKER_MACHINE create --virtualbox-memory "2048" -d virtualbox $VM

buy then after running the ‘docker build’ command on my Dockerfile, it freezes at the step where Oracle XE installation starts and the Virtual Box changes the status of the VM to GURU_MEDITATION…

00:08:29.408150 Console: VM runtime error: fatal=false, errorID=HostMemoryLow message="Unable to allocate and lock memory. The virtual machine will be paused. Please close applications to free up memory or close the VM"
00:08:30.657286 Changing the VM state from ‘RUNNING’ to ‘GURU_MEDITATION’

I suppose I need to buy a more powerful laptop or is there something else I can try?

Cheers
Kris


(Ranjandas) #4

Hi,

How much RAM does your laptop have? Looks like you have allocated more RAM than that can be safely allocated to the VM. To increase the SWAP you can try to add a swapfile and mount it as swap on the docker host, which will not utilise your RAM.

Please have a look at the answer in this link. http://stackoverflow.com/questions/31061248/how-to-increase-the-swap-space-available-in-the-boot2docker-virtual-machine

Regards


(Krisrr3) #5

Hi Ranjandas,

I have been trying to figure out how to get these commands to work on windows

In the post you mentioned they used

boot2docker ssh
export SWAPFILE=/mnt/sda1/swapfile
sudo dd if=/dev/zero of=$SWAPFILE bs=1024 count=4194304
sudo mkswap $SWAPFILE
sudo chmod 600 $SWAPFILE
sudo swapon $SWAPFILE
exit

I am trying to figure out what should the paths translate it to on windows and here is what I came up with

use Quickstart terminal to ssh 
export SWAPFILE=/c/Users/dell/dockerworkspace/sda1/swapfile
sudo dd if=**/dev/zero** of=$SWAPFILE bs=2048 count=4194304
sudo mkswap $SWAPFILE
sudo chmod 600 $SWAPFILE
sudo swapon $SWAPFILE
exit

would you know which folder would the /dev/zero be changed to?

Cheers
Kris