VirtFusion

Set up the VirtFusion WHMCS module: provisioning, options and SSO

Connect WHMCS to VirtFusion with an API token, install the provisioning module, create VPS products tied to VirtFusion packages, add configurable options and enable SSO.

AdvancedVPS hosting providers3 min read

The VirtFusion module for WHMCS automates the VPS lifecycle: when a customer orders and pays, WHMCS creates the server in VirtFusion; overdue invoices suspend it; cancellations terminate it. Customers can also jump from the WHMCS client area into the VirtFusion panel without a second login.

Before you start

  • A working VirtFusion setup with at least one hypervisor, IP block, OS templates and package; see add a hypervisor.
  • WHMCS installed and up to date; see install WHMCS.
  • The VirtFusion WHMCS module, downloaded from your VirtFusion account or its documentation.

Create an API token in VirtFusion

  1. In the VirtFusion admin area, open the API section and create a new token for WHMCS.
  2. Give it a clear name, for example WHMCS, and copy the token. It is shown only once.
  3. If VirtFusion lets you restrict the token by IP, allow only your WHMCS server's IP.

Install the module in WHMCS

  1. Upload the module files to your WHMCS installation, keeping the folder structure (provisioning modules go in modules/servers/).
  2. Follow any extra steps in the module's readme, such as hooks or an addon component.

Add VirtFusion as a server in WHMCS

  1. In WHMCS go to Configuration → System Settings → Servers and click Add New Server.
  2. Enter the VirtFusion panel hostname, choose the VirtFusion module type and paste the API token in the field the module uses.
  3. Click Test Connection, then save. Put the server in a server group if you have several.

Create VPS products

  1. Go to Configuration → System Settings → Products/Services and create a product of type Server/VPS.
  2. On Module Settings, select the VirtFusion module and server group.
  3. Choose the VirtFusion package (and hypervisor group, if offered) the product should use.
  4. Choose Automatically setup the product as soon as the first payment is received.
  5. Set pricing on the Pricing tab and save.

Configurable options

Use WHMCS configurable options to let customers pick extras such as the operating system, extra IPs, more memory or a location. Create an option group under Configuration → System Settings → Configurable Options, assign it to the product, and name the options exactly as the module documentation requires so they map to VirtFusion values.

Single sign-on

With the module active, the client area shows controls and a button to open the VirtFusion panel. The module creates the matching VirtFusion user automatically and logs the customer in through SSO, so they never need a separate password.

Verify

  1. Place a test order as a client and mark the invoice paid.
  2. Confirm the server appears in VirtFusion and boots.
  3. Test suspend, unsuspend and terminate from the WHMCS admin product page.

Troubleshooting

  • Test Connection fails: wrong hostname or token, or the token is IP-restricted to a different address.
  • Order stays pending: check Utilities → Logs → Module Log in WHMCS for the API error, for example no free IPs or no capacity in the package.
  • SSO button missing: the module's client-area template or hook is not installed.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.