Issuing about running multiple VMs simultaneously

Discussions related to using VirtualBox on Linux hosts.
Post Reply
elanozturk
Posts: 5
Joined: 23. Jan 2018, 13:16

Issuing about running multiple VMs simultaneously

Post 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?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Issuing about running multiple VMs simultaneously

Post 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).
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
elanozturk
Posts: 5
Joined: 23. Jan 2018, 13:16

Re: Issuing about running multiple VMs simultaneously

Post by elanozturk »

My log file attached,i start VMs in headless mode with bash script.
Attachments
VBoxSVC.log.zip
(2.58 KiB) Downloaded 76 times
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Issuing about running multiple VMs simultaneously

Post 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?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
elanozturk
Posts: 5
Joined: 23. Jan 2018, 13:16

Re: Issuing about running multiple VMs simultaneously

Post 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
Attachments
Vbox.log.zip
(48.5 KiB) Downloaded 75 times
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Issuing about running multiple VMs simultaneously

Post 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?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
elanozturk
Posts: 5
Joined: 23. Jan 2018, 13:16

Re: Issuing about running multiple VMs simultaneously

Post 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?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Issuing about running multiple VMs simultaneously

Post 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...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
elanozturk
Posts: 5
Joined: 23. Jan 2018, 13:16

Re: Issuing about running multiple VMs simultaneously

Post 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.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Issuing about running multiple VMs simultaneously

Post 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...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply