Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot allocate memory for VM #14

Open
Brandonage opened this issue Sep 15, 2017 · 2 comments
Open

cannot allocate memory for VM #14

Brandonage opened this issue Sep 15, 2017 · 2 comments

Comments

@Brandonage
Copy link

Hi again:

I'm sorry I'm coming with new issues :P. But I'm back with some experiments with vagrant and this time I need VM's with more RAM. The problem I think is that g5k assigns physical machines with less physical memory than the one I specify and some of them fail. I attach the log but basically the message is:

==> test-7: Waiting for the job to be running
==> test-7: OAR.test-7.1389082.stderr:  + '[' 8 == -1 ']'
==> test-7: + SMP=8
==> test-7: + echo 'SMP = 8'
==> test-7: + shift
==> test-7: + KEEP_SYSTEM_MEM=1
==> test-7: + '[' 32768 == -1 ']'
==> test-7: + VM_MEM=32768
==> test-7: + echo 'VM_MEM = 32768'
==> test-7: + shift
==> test-7: + net=
==> test-7: + '[' BRIDGE == BRIDGE ']'
==> test-7: + shift
==> test-7: ++ net_bridge .vagrant/test-vagrant-g5k/subnet -drive file=/home/abrandon/public/centos7.3_dcos.qcow2,if=virtio -snapshot
==> test-7: ++ SUBNET_FILE=.vagrant/test-vagrant-g5k/subnet
==> test-7: ++ ipnumber=184
==> test-7: +++ cat .vagrant/test-vagrant-g5k/subnet
==> test-7: +++ head -n 185
==> test-7: +++ tail -n 1
==> test-7: ++ IP_MAC='10.144.120.185	00:16:3E:90:78:B9'
==> test-7: +++ echo 10.144.120.185 00:16:3E:90:78:B9
==> test-7: +++ awk '{print $1}'
==> test-7: ++ IP_ADDR=10.144.120.185
==> test-7: +++ echo 10.144.120.185 00:16:3E:90:78:B9
==> test-7: +++ awk '{print $2}'
==> test-7: ++ MAC_ADDR=00:16:3E:90:78:B9
==> test-7: +++ sudo create_tap
==> test-7: ++ TAP=tap0
==> test-7: ++ echo '-net nic,model=virtio,macaddr=00:16:3E:90:78:B9 -net tap,ifname=tap0,script=no'
==> test-7: + net='-net nic,model=virtio,macaddr=00:16:3E:90:78:B9 -net tap,ifname=tap0,script=no'
==> test-7: ++ hostname
==> test-7: + echo griffon-7.nancy.grid5000.fr
==> test-7: + echo -net nic,model=virtio,macaddr=00:16:3E:90:78:B9 -net tap,ifname=tap0,script=no
==> test-7: + shift
==> test-7: + export TMPDIR=/tmp
==> test-7: + TMPDIR=/tmp
==> test-7: + trap clean_shutdown 12
==> test-7: + wait
==> test-7: + kvm -m 32768 -smp cores=8,threads=1,sockets=1 -fsdev local,security_model=none,id=fsdev0,path=/home/abrandon -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare -nographic -monitor unix:/tmp/vagrant-g5k.1389082.mon,server,nowait -localtime -enable-kvm -net nic,model=virtio,macaddr=00:16:3E:90:78:B9 -net tap,ifname=tap0,script=no -drive file=/home/abrandon/public/centos7.3_dcos.qcow2,if=virtio -snapshot
==> test-7: Cannot set up guest memory 'pc.ram': Cannot allocate memory
==> test-7: An error occurred. The error will be shown after all tasks complete.

log_vagrant_memory.pdf

@msimonin
Copy link
Owner

msimonin commented Oct 3, 2017

Oh yes griffon has only 16GB RAM :)
https://www.grid5000.fr/mediawiki/index.php/Nancy:Hardware#Griffon

Maybe we should find a way to prevent this.

@msimonin
Copy link
Owner

msimonin commented Oct 4, 2017

When the amount of ram is specified we should check that it's less than the total available memory : https://github.com/msimonin/vagrant-g5k/blob/master/lib/vagrant-g5k/util/launch_vm.sh#L44-L51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants