Can I provision VMs remotely using WHMCS?
You can provision VMs from your own WHMCS installation by connecting it to a Virtualizor Master using the official Virtualizor modules. This guide covers module installation, server configuration, product setup and troubleshooting for both reseller and provider deployments.
Yes. You can provision VMs from your own WHMCS using Virtualizor's official Provider module, pointed at a Virtualizor Master that you run. Hostworld VPS are managed through Virtualizor in the Hostworld client area, and we do not document an API for provisioning our VPS from your own WHMCS, so if that is what you are trying to do, open a support ticket and ask before you build anything around it.
Before you start
- A working WHMCS install that meets the current requirements. WHMCS 9.0 needs PHP 8.2 or newer with a matching IonCube Loader.
- API credentials for the Virtualizor Master you will connect to, generated in Virtualizor on that Master.
- Network access from your WHMCS server to the Virtualizor Master on TCP 4081–4085. If WHMCS runs over HTTPS and you want console/SSO in WHMCS, the Virtualizor panel needs valid SSL.
Step 1: Install the correct Virtualizor WHMCS module
Get the official module from Virtualizor. Use the Provider module if you run your own Master. Virtualizor also publishes a Reseller/Cloud module, which applies only where the operator of the Master has given you reseller access to it. Follow the install steps on the linked docs page and use the latest version available.
Step 2: Add the Virtualizor Master in WHMCS
This tells WHMCS where to send API calls. Only add the Master, not any slave nodes.
- In your WHMCS admin go to Setup, Servers, Add New Server.
- Enter the Master's hostname, and the API key and API password you generated in Virtualizor.
- Select the matching module and use Test Connection. Ports 4081–4085 must be reachable for this to work.
Step 3: Create a product and link a plan
This maps your WHMCS product to a Virtualizor plan.
- Create or edit a product in WHMCS and select the Virtualizor module and the virtualisation Type required.
- Click Save Changes before expecting plans to appear. Then choose the Plan and the default Node or Group from your Virtualizor Master.
- Create the Custom Fields exactly as shown in the Virtualizor docs. The vpsid field must be stored so suspend, terminate and other actions target the correct VM. The OS field is a comma-separated list of template names as they appear in Virtualizor. Omit file extensions and include a none option if you offer ISO or no-OS choices.
Before you test any of this against a live VM, understand what the destructive actions do. Terminate in WHMCS deletes the VM in Virtualizor. That is irreversible and it destroys the VM's data. Re-Install OS wipes the VM's disk, again with no recovery, so anything not backed up elsewhere is gone. Test with a VM you are willing to lose, and make sure a wrong vpsid cannot point a terminate at the wrong machine.
Once a VM is managed through WHMCS, make changes through WHMCS. Editing a Virtualizor-managed VM directly in Virtualizor, for example adding a disk, leaves the two systems holding different views of the same VM, and later Suspend or Terminate actions can fail or behave unexpectedly as a result.
Step 4: Set automation and cron
This controls when VM creation runs.
- In the product's Module Settings choose one of the automation options: on order, on first payment, on manual accept, or no automatic setup. See WHMCS' automation documentation if unsure.
- Ensure the WHMCS cron is configured and running on your server at the recommended frequency, typically every 5 minutes. Provisioning, suspensions and other tasks depend on it.
If it does not work
- Connection errors or timeouts. Open TCP 4081–4085 between your WHMCS host and the Virtualizor Master. These commands request the Virtualizor login on the API/GUI ports and show the HTTP status. They are the same on AlmaLinux and Ubuntu.
curl -Ik https://YOUR-VIRTUALIZOR-HOST:4083/ curl -Ik https://YOUR-VIRTUALIZOR-HOST:4085/Expect an HTTP 302. If it fails, adjust your firewall or routing.
- Plans do not load in the product. After selecting the module and Type, click Save Changes first. Ensure the Virtualizor server hostname you added in WHMCS resolves from the WHMCS server. Remove any apostrophes from the WHMCS server name, which can break plan loading.
- Console or SSO fails inside WHMCS. If WHMCS runs over HTTPS, the Virtualizor panel must have a valid SSL certificate as well. Without SSL on Virtualizor, the embedded console and SSO will not work.
If you need a port check from our side, or you want to know what is and is not possible with a Hostworld VPS, open a support ticket.
What next
For a deeper walkthrough of module choices, custom fields, callbacks and common pitfalls, see our VPS guides. Our London VPS range runs from a UK data centre in London, and is managed through Virtualizor in the Hostworld client area.
Common questions
Which Virtualizor module do I need for WHMCS?
Use the Provider module if you run your own Virtualizor Master, or the Reseller/Cloud module if you have reseller access on Hostworld.
What network access does WHMCS need to Virtualizor?
Your WHMCS server must have access to TCP ports 4081-4085 on the Virtualizor Master.
Why are my Virtualizor plans not showing in WHMCS?
Click Save Changes after selecting the module and virtualisation type. Ensure the Virtualizor hostname resolves from your WHMCS server and contains no apostrophes.
Can I use console and SSO with Virtualizor in WHMCS?
Only if both WHMCS and the Virtualizor panel run over HTTPS with valid SSL certificates.
What is the WHMCS cron used for in VM provisioning?
The cron job runs provisioning, suspensions and other automated tasks. It should run at least every 5 minutes.
Was this article helpful?
0 people found this helpful