Fix: Virtualizor Not Showing IPs From Pool on VPS Creation
Problem Description
Have you encountered a situation where you've correctly configured an IP Pool in the Virtualizor control panel, but when you go to the "Create VPS" screen, the IP Address dropdown is empty or doesn't show all the IPs you assigned to the pool? If so, you're not alone. This is a common issue, especially for systems managing a large number of IP addresses.
- Symptom: The IP list is empty or incomplete on the VPS creation page.
- Condition: The IP Pool is created and assigned correctly, and the number of IPs in the pool is large (typically over 250).
The Cause
The root of this problem isn't a misconfiguration on your part, but rather a predefined limit set in Virtualizor's source code to optimize performance. Specifically:
In the main Virtualizor configuration file located at /usr/local/virtualizor/universal.php
, a variable is set with a default value of 250:
This variable limits the maximum number of IPs that are loaded and displayed in the VPS creation form. The purpose is to prevent the loading of an excessively large list (thousands of IPs), which could slow down or hang the browser. When the number of IPs in your pool exceeds this value, they will not be displayed.
How to Fix It
To resolve this, we simply need to increase the value of the $globals['max_ips']
variable to a number higher than the total number of IPs you have. Follow these steps:
- SSH into your server:
Use a terminal or Putty to SSH into your Virtualizor Master node with root privileges.
- Back up the configuration file:
This is a critical step for safety. Always create a backup of the file before editing.
cp /usr/local/virtualizor/universal.php /usr/local/virtualizor/universal.php.bak - Open the file for editing:
Use a text editor like
nano
orvim
.nano /usr/local/virtualizor/universal.php - Find and change the value:
In the
nano
editor, press Ctrl + W to open the search prompt, then typemax_ips
and press Enter. You will see the line:$globals['max_ips'] = 250;
Change the number
250
to a larger value.Which value should you choose?Select a number that is higher than the total number of IPs you plan to use.
Safe values are typically 1024, 2048, or higher.
For example:
$globals['max_ips'] = 1024;
- Save and exit:
Press Ctrl + X, then type Y and press Enter to save the changes.
Verification
You do not need to restart any services. Simply return to the Virtualizor admin panel in your browser and press F5 to refresh the "Create VPS" page. The IP Address dropdown menu should now display the full list of IPs.
Conclusion
This is a simple issue that can cause confusion for new administrators. By adjusting the $globals['max_ips']
limit, you can easily manage large IP pools in Virtualizor. Happy hosting!
If you encounter more complex issues during server operation, our Server Management service is always available to assist you.