Ask Your Question
0

Allocate more ram to guests

asked 2015-05-28 02:31:58 -0500

itm-mra gravatar image

updated 2015-06-01 08:25:39 -0500

I have setup openstack using this guide: http://ubuntu-cloud-installer.readthedocs.org/en/latest/single-installer.guide.html (http://ubuntu-cloud-installer.readthe...)

I am able to create multiple instances with the m1.small flavor which uses 2 GB ram, but when I try to create an instance with any more ram it fails. When I try to create the instance in Horizon it gives the error:

"Error: Failed to launch instance "test": Please try again later [Error: No valid host was found. Exceeded max scheduling attempts 3 for instance 39f73c98-0b77-4613-a13d-244c357efb55. Last exception: [u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2039, in _do]."

Looking at the nova-conductor.log I have the error:

"internal error: process exited while connnecting to monitor: Cannot set up guest memory 'pc.ram': Cannot allocate memory"

I am assuming that I need to allow the virtulization to give each guest more than 2 gb ram, but I just do not know where to start setting that up.

EDIT:

I have checked the hypervisors in horizons admin panel, and it reports

Type: QEMU
VCPU: 3 used out of 1 total
Ram: 6.5GB out of 3.9GB total
Storage: 60GB out of 39 GB

So it seems that I am using more than what is available for the QEMU, but how do I increase that in this setup on ubuntu? A reinstallation of openstack is an ok solution if I can configure it on installation.

* EDIT 2 * I tried to see what qemu was actually running on the host and this is the output of ps -aux | grep qemu

root@VERA02:/etc# ps -aux | grep qemu
mysql     3189 23.1  2.4 10648276 6408256 ?    Sl   maj26 2055:53 qemu-system-x86_64 -enable-kvm -name ubuntu-local-machine-3 -S -machine pc-i440fx-trusty,accel=kvm,usb=off -m 6144 -realtime mlock=off [... snipped ...]
mysql     3219  6.0  0.4 4592928 1157632 ?     Sl   maj26 540:15 qemu-system-x86_64 -enable-kvm -name ubuntu-local-machine-2 -S -machine pc-i440fx-trusty,accel=kvm,usb=off -m 2048 -realtime mlock=off [... snipped ...]
mysql     3244 17.7  1.6 8517516 4289784 ?     Sl   maj26 1575:22 qemu-system-x86_64 -enable-kvm -name ubuntu-local-machine-1 -S -machine pc-i440fx-trusty,accel=kvm,usb=off -m 4096 -realtime mlock=off [... snipped ...]
root     16734  0.0  0.0  11940  2264 pts/8    S+   14:56   0:00 grep --color=auto qemu

I noticed two things. First off I wonder why the user is mysql? but perhaps more important the last entry has -name ubuntu-local-machine-1 which is the same as Horizons tells me the hypervisor is running on, and that entry has -m 4096 matching the memory of the hypervisor, so if this is indeed the correct process, how do I increase the memory? It must be set up automatically during the installation.

edit retag flag offensive close merge delete

Comments

How much ram does the physical compute host have?

jdexter gravatar imagejdexter ( 2015-05-28 12:26:38 -0500 )edit

The server has 250GB ram and is only to be used for this task.

itm-mra gravatar imageitm-mra ( 2015-05-29 01:06:29 -0500 )edit

Do you have any errors from libvirt? or in the compute.log?

jdexter gravatar imagejdexter ( 2015-05-29 10:53:43 -0500 )edit

I am unable to find the compute.log on both the host and on the nova instance, is it on another instance? libvirt only has debug messages where the latest is from May 26th and I just tried to start an instance on June 1st. All entries was 'virNetlinkEventCallback'

itm-mra gravatar imageitm-mra ( 2015-06-01 02:32:25 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2015-05-31 10:14:05 -0500

nd gravatar image

updated 2015-06-01 09:20:57 -0500

Can you check the following - which will tell us what problem do you have? 1. Login as admin 2. Under Admin tab - check the Hypervisors and see what does it report as RAM (used) and RAM (total) - This should tell us what is the hypervisor reporting

On my environment I tried to recreate your problem by creating an instance with memory more than available in the Hypervisor and I got exactly the same errors on dashboard, nova-conductor and nova-scheduler logs. So I definitely think whatever memory is reported by your hypervisor - you are trying to launch instance with more memory than that.

Update1 to my answer for your update

You said you have some 250 GB memory on your server - can you confirm whether this understanding is correct? Because if you really have 250 GB physical memory on your server but hypervisor is reporting only 4 GB - I suspect you may have installed 32 bit version of Ubuntu OS and hence it can actually able to use/see only 4 GB.

You can check using uname -a and see if it reports as i386 or as x86_64. If its i386 meaning you have installed 32 bit OS, then the only option is reinstall with 64 bit OS and then install Openstack again.

If you have 64 bit OS, then ideally the OS/Hypervisor should report the entire physical memory and not just 4 GB.

So my analysis of your situation is that either you have install 32 bit OS or you actually have only 4GB in your server and not 250GB as you initially mentioned.

Update 2

When Openstack creates an instance, in the backend (as you are using libvirt) libvirt creates instances, however I have seen the names to be something like instance-0000000c etc (which are the VMs created by libvirt - KVM/qemu in the backend) and not the actually names you see in Horizon.

Have you used your 250GB server to create your Openstack node as a VM itself by the name ubuntu-machine-1 or so. and then have installed openstack in that ubuntu-machine-1 as your Hypervisor thus showing 4GB as memory which is what is allocated to ubuntu-machine-1. Is this correct? If that's the case you may want to increase the memory allocated your Hypervisor [which itself is a VM] using virsh command - see link http://earlruby.org/2014/05/increase-...

Restart your Hypervisor and then check again.

edit flag offensive delete link more

Comments

Thanks nd, that seems to be a good place to start, I have updated the question. I am using more resources than allocated for the hypervisor. I am looking into how I can increase the resources allocated, do you have an idea of where I should start?

itm-mra gravatar imageitm-mra ( 2015-06-01 02:49:29 -0500 )edit

Here is my output: $ uname -a Linux VERA02 3.16.0-36-generic #48~14.04.1-Ubuntu SMP Wed Apr 15 13:11:28 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Free -g reports 251 total and 190 free.

itm-mra gravatar imageitm-mra ( 2015-06-01 07:21:10 -0500 )edit

Thank you very much for your help nd this last edit did the trick. I had some problems first because I could not access the VMs with virsh because openstack runs in lxc, but the guide I started following showed me how to attach to that and then the link you posted helped me the rest of the way!

itm-mra gravatar imageitm-mra ( 2015-06-01 11:18:39 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2015-05-28 02:31:58 -0500

Seen: 8,788 times

Last updated: Jun 01 '15