GPU Model
Overview
You can configure GPU model selection as a customizable option for SolusVM products in WHMCS. This allows customers to choose a passthrough GPU when they order a virtual server. SolusVM assigns a free GPU of the selected model to the new server.
The GPU Model option works together with the GPU option. WHMCS only displays the GPU Model list when the customer selects the passthrough value in the GPU option. For more information, see
GPU.
Important:
SolusVM does not support changing a server’s GPU through WHMCS. Customers can only select a GPU model when they order the server for the first time. To change a server’s GPU, detach the current GPU and attach a different one. For steps, see our GPU Passthrough documentation.
Prerequisites
Before you configure a GPU Model configurable option, make certain that:
- You use version 1.0.69 or higher of the SolusVM 2 module.
- You use a KVM plan. GPUs are not available for VZ plans.
- You have configured at least one GPU for passthrough on a GPU-equipped compute resource.
- You have created the
GPUconfigurable option in the same configurable options group.
For steps to configure GPUs for passthrough and create a plan that offers a GPU model, see GPU Passthrough.
Create a GPU Model configurable option
To create the GPU Model option:
Log in to the WHMCS Admin Area.
Go to Configuration > System Settings > Configurable Options.
Select the group that contains the
GPUoption.Click Add New Configurable Option.
Enter
GPU Modelas the option name and select Dropdown as the option type.Run the following command on the management node to retrieve the GPU model IDs:
docker exec -it $(docker ps -q -f name=solus_postgres | head -n1) psql -U$(docker exec $(docker ps -q -f name=solus_postgres | head -n1) env | grep POSTGRES_USER | awk -F "=" {'print $2'}) $(docker exec $(docker ps -q -f name=solus_postgres | head -n1) env | grep POSTGRES_DB | awk -F "=" {'print $2'}) -c 'SELECT gm.id, gm.name, COUNT(DISTINCT g.compute_resource_id) AS connected_crs_count FROM gpu_models gm LEFT JOIN gpus g ON g.gpu_model_id = gm.id AND g.allocation_mode = '"'"'passthrough'"'"' GROUP BY gm.id ORDER BY gm.name;'The output lists each model’s ID and name. It also lists how many compute resources currently have a GPU of that model in passthrough mode:
id | name | connected_crs_count ----+-----------------------+--------------------- 3 | NVIDIA L4 | 1 7 | NVIDIA A100 80GB PCIe | 0Record the
idandnamevalues for the models that you want to offer.Enter
0|Noneas the first option value in the Add Option text box and click Save Changes.Enter each remaining option value as
GPU_MODEL_ID|DISPLAY_NAMEand click Save Changes after each one, where:GPU_MODEL_ID— Theidvalue from the command output.DISPLAY_NAME— The label that displays to customers.
For example:
0|None 3|NVIDIA L4 7|NVIDIA A100 80GB PCIeClick Close Window.
Important:
You must add the 0|None value as the first value in both the GPU Model and vGPU Profile options. When a customer changes the GPU option, WHMCS resets the list that no longer applies to its first value and hides it. If a GPU occupies the first position instead, WHMCS charges the customer for a GPU that they did not order.