Page 1 of 1

Issuing about running multiple VMs simultaneously

Posted: 23. Jan 2018, 13:38
by elanozturk
I am having issues about running multiple VMs simultaneously .
On my home ubuntu machine i am running 150 instances simultaneously with core i7 CPU and 64GB ram.Guest is lubuntu with 256 mb ram.
But on my dedicated server with same hardware specs I can just run only 30 VMs.
They seem to be running but when I try to show the machines I get black screens.
I also watching cpu load with htop and noticed after couple of minutes cpu load is decreasing dramatically.
I tried both virtualbox 5.2.4 and 5.2.6 with extension pack installed but no luck.Even tried to increase the memory on guest.
Can someone help me?

Re: Issuing about running multiple VMs simultaneously

Posted: 23. Jan 2018, 13:48
by socratis
elanozturk wrote:i am running 150 instances simultaneously
Wait... WHAT??? Are you familiar with the rule:
  • Total CPUs for your guests Host CPUs + 1.
  • Total RAM+vRAM+overhead for your guests Host available RAM + some.
elanozturk wrote:Even tried to increase the memory on guest.
I believe you're moving in the wrong direction.
elanozturk wrote:I can just run only 30 VMs.
We'll need to see a log from the 31st VM that you attempt to run, or any VM that fails:
  • Start the VM from cold-boot (not from a paused or saved state) / Observe error / Shutdown the VM (force close it if you have to).
  • With the VM completely shut down (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log".
  • Save only the first "VBox.log", ZIP it and attach it to your response (see the "Upload attachment" tab below the reply form).

Re: Issuing about running multiple VMs simultaneously

Posted: 23. Jan 2018, 15:26
by elanozturk
My log file attached,i start VMs in headless mode with bash script.

Re: Issuing about running multiple VMs simultaneously

Posted: 23. Jan 2018, 18:45
by socratis
I'm sorry, I'm looking for the "VBox.log", not the "VBoxSVC.log".
And what do you mean by a bash script? Can I have that as well?

Re: Issuing about running multiple VMs simultaneously

Posted: 23. Jan 2018, 21:05
by elanozturk
Sure it's like;

Code: Select all

#!/bin/bash
for i in {10..50}; do 
vboxmanage startvm $i --type headless;
sleep 5; 
done
and i found the correct log files and attached some of vms log files

Re: Issuing about running multiple VMs simultaneously

Posted: 23. Jan 2018, 21:39
by socratis
  1. I don't need several logs, I need just one log, from the VM that fails. Maybe two (from a working one) to do the comparison.
  2. The logs are incomplete. I told you to shutdown the VM or force close it if it normal shutdown fails. That's the only way the whole log gets written. Now it's... half.
  3. Don't you think that the "sleep 5" is too short of a time? I can see issues with launching so many VMs in such a short time; think hard disk I/O. Maybe you should take it to 60 for a start and then keep on lowering it if you have to?

Re: Issuing about running multiple VMs simultaneously

Posted: 23. Jan 2018, 22:15
by elanozturk
I tried already with various time delays but not 60 seconds yet,i'll try that.
I shutted down vms with vboxmanage controlvm $i acpipowerbutton within bash script,should i use poweroff prefix to get proper log file?

Re: Issuing about running multiple VMs simultaneously

Posted: 24. Jan 2018, 00:38
by socratis
elanozturk wrote:I shutted down vms with vboxmanage...
Let me get this correct; your VMs all start and all shut down? Correctly? There's no point when VM #n hangs? And I don't know why the logs end prematurely if you shut down the VMs with the ACPI power button...

BTW, another thing that came to mind after a couple of discussions is that 130 VMs will require about 80 GB of availabe/free RAM on the host. Do you have that? I won't even go in the number of CPUs, that's a "no it doesn't work" area...

Re: Issuing about running multiple VMs simultaneously

Posted: 24. Jan 2018, 10:59
by elanozturk
When I open the VirtualBox GUI and list the running VMs with "VboxManage list runningvms" command all VMs looks working. However when I try to check the machines with "Show" option on the GUI I get just black screen, I have different hardware configurations like; dual Xeon e5 CPU + 128 GB RAM, Core i7 CPU + 64 GB RAM.

Re: Issuing about running multiple VMs simultaneously

Posted: 24. Jan 2018, 11:52
by socratis
Geez, you have a weird problem, don't you? Why are you launching so many VMs? Have you done the math to see how much RAM, CPU, and most importantly disk I/O is required? You're killing your host, most probably running out of RAM and it never properly finishes starting all the VMs.

From my point of view, this is an unsupported configuration. I'm not sure how to diagnose this... I don't see a software error, more of like a human error/misunderstanding. Maybe I'm wrong on this, but the math doesn't support your case...