# GPU Passthrough Example

In a previous section, a Service Plan was created which consumes a GPU when a VM is provisioned using that Plan. This section shows an example provisioning a workload using that Plan and a GPU-accelerated workload running on the VM. In this example, there is an Nvidia GeForce RTX 3050 connected to one of the HVM Hosts. By passing the GPU hardware through to a provisioned VM, hardware-accelerated AI workloads can be run on the VM.

Begin by navigating to Provisioning > Instances. The list of all currently-managed Instances is here along with high level information (power state, etc). To begin a new Instance, click + ADD. Choose type HVM and click NEXT. On the next pane, choose the Group and Cloud in which your desired HVM Cluster resides, name the Instance, and click NEXT.

On the CONFIGURE tab, the main thing to note for this example is the PLAN configuration. This dropdown contains some default Plans that are included with HPE Morpheus VM Essentials and compatible with the HVM provisioning technology (named “1 CPU, 1GB Memory”, etc). This dropdown also includes user-created Plans, such as those you’ve created to consume GPU hardware. In the screenshot below, you can see the “GPU Plan” was selected.

![../../_images/showPlan.png](https://support.hpe.com/hpesc/public/api/document/sd00008014en_us/GUID-1FD71B7E-138D-4F35-B57F-AA2C3AA2E357-high.png)

From here, complete the Instance provisioning wizard selecting any automation or lifecycle configurations and wait for the Instance provisioning to complete.

With provisioning complete, check the attached device(s) from the HPE Morpheus VM Essentials UI. This is done from the VM level rather than the Instance level. From the Instance detail page, click on the Resources tab. Click on the name of the desired VM to access the VM detail page. Click on the Devices tab. As in the screenshot below, the attached GPU should be shown.

![../../_images/attachedGpu.png](https://support.hpe.com/hpesc/public/api/document/sd00008014en_us/GUID-5AC07D64-3534-439B-925D-858854858310-high.png)

To go further, open a console session to the new VM either through HPE Morpheus VM Essentials UI or by connecting to the VM over SSH from a local terminal session. Use the `lspci` command to view all devices connected to PCI buses. The attached GPU should be shown here as it is in the UI.

At this point, the VM is ready to run GPU-accelerated workloads normally. To test this, I’ll run Ollama which is an open-source tool designed to make it easy to run large language models (LLMs) locally. In the screenshot below, see the AI chatbot response to an input. This result took only a few seconds thanks to GPU hardware acceleration.

![../../_images/ollamaOutput.png](https://support.hpe.com/hpesc/public/api/document/sd00008014en_us/GUID-FEED6AA7-831F-4630-93F2-BD77DAB2EF2C-high.png)

With the request completed, we can run the `ollama ps` command which confirms the model was running under GPU acceleration.

![../../_images/gpuUsed.png](https://support.hpe.com/hpesc/public/api/document/sd00008014en_us/GUID-15D2AC03-19A9-47B0-8D16-7EA83603BDF2-high.png)
