Skip to main content

VMware with GPU

Overview

This guide will walk you through the process of deploying Barbara OS on a VMware virtual machine with GPU support. By leveraging the power of GPU acceleration, you can significantly enhance the performance of your AI workloads, enabling faster training and inference times.

Download the OS image

To begin, navigate to the OS Images section of the panel. Search for the VMWare VM (amd64/gpu) OS Image and download it to your device. Once downloaded, unzip the contents of the downloaded file. You will use in the next section.

Download OS Image

Download OS Image

General Hardware Requirements

Minimum

  • RAM: 2GB
  • Hard Drive: 32GB
  • Processor: 1 processor / 2 cores
  • Network: 1 x Ethernet Interface
  • RAM: 4GB
  • Hard Drive: 64GB
  • Processor: 2 processor / 2 cores
  • Network: 2 x Ethernet Interface

Creating the Virtual Machine in the ESXi Host Client

Requirements

Convert the virtual disk

This section guides you through converting the original virtual disk file (.vmdk) obtained from the downloaded archive from Panel (a compressed .zip file) into a format compatible with your vSphere environment.

Using the vSphere Web Client

  1. Locate the Datastore Path: Launch the vSphere web interface and navigate to the storage section. Identify the datastore path where you intend to store the virtual machine files. Copy this path for later use.

Copy Datastore path

Copy Datastore path

  1. Upload the Original Disk: Open the datastore explorer within the vSphere web client. Create a new folder within the datastore to store the original .vmdk file. Navigate to this folder and upload the original .vmdk file from the downloaded archive.

Upload original disk

Upload original disk

  1. Prepare for Conversion: Create a separate folder within the datastore to store the converted virtual disk file. Ensure this folder is empty before proceeding.

Create conversion folder

Create conversion folder

Converting the disk (SSH)

  1. Access via SSH: Establish an SSH connection to the vSphere host using appropriate credentials.
  2. Navigate to Datastore: Use the cd command within teh SSH session to navigate to the datastore path you copied earlier. Verify the existence of the two folders you created using the ls command.

Check previous folders

Check previous folders

  1. Perform Conversion: Execute the following command to convert the original .vmdk file originalDiskPath to the desired format and save it as convertedDiskPath.

Converting .vmdk file

Converting .vmdk file

vmkfstools -i originalDiskPath convertedDiskPath

By following these steps, you should have successfully converted the virtual disk file and prepared it for use with your vSphere virtual machine.

Creating the Virtual Machine

  1. Create a New Virtual Machine:
  • Enter in the ESXi Host Client and go to "Virtual Machines" section.
  • Select "Create/Register a Virtual Machine"
  • In the wizard, choose Create a new virtual machine and click Next.

Add VM in VSphere

Add VM in VSphere

  1. Provide Basic Information:
  • Enter a descriptive name for your VM in the "Name" field.
  • Fill in other details (refer to image below):
    • Compatibility: ESXi 8.0 U2 Virtual Machine
    • Guest OS Family: Linux
    • Guest OS Version: Linux 6.x or later (64 bits)
  • Click Next to proceed.

Add Name and compatibility

Add Name and compatibility

  1. Select the desired storage and press Next:

Select Storage

Select Storage

  1. Configure Virtual Hardware. Go to section Memory:
    • Under "Reservation", select 8GB.
    • Check the box for Reserve all guest memory (All locked).

Reserve Memory

Reserve Memory

  1. Configure Virtual Machine Options. Go to section Boot options:
    • Under "Firmware", select EFI.
    • Uncheck the box for Secure UEFI Boot.

Select EFI

Select EFI

  1. Confirm the configuration.Review the configuration summary displayed. Click Finish to confirm.

Confirm Settings

Confirm Settings

  1. Edit Virtual Machine Settings:

    • Before powering on the VM, we need to modify its hardware configuration. Remember to click "Finish" to complete the initial creation process.
    • Right-click the newly created VM and select "Edit settings."

Edit VM Settings

Edit VM Settings

  1. Remove Default Hardware:

    • In the "Hardware" tab, select and delete the existing hard disk and CD/DVD drive

Delete HD & CD

Delete HD & CD

  1. Click "OK" to save the changes and exit the settings window. Do not edit further settings yet, as the disk deletion might not be applied otherwise.

  2. Add Converted Hard Disk:

    • Edit the VM settings again by right-clicking the VM and selecting "Edit settings."
    • Under the "Hard Disks" section, click "Add Hard Disk."
    • Choose "Existing virtual disk" and select the converted virtual disk file you prepared earlier.
warning

If you haven't already converted the downloaded .vmdk file from Barbara Panel, follow the instructions in previous section before proceeding.

Add Existing Hard Drive

Add Existing Hard Drive

  1. Add a NVMe controller under the add device option:

Add NVMe Controller

Add NVMe Controller

  1. Attach Hard Disk to NVMe Controller

Use NVMe Controller

Use NVMe Controller

  1. Select VMXNET3as the network driver

Select Network Driver

Select Network Driver

  1. Add 2 new PCI Devices:
  • A VGA Compatible Controller
  • An Audio Device

PCI Devices Added

PCI Devices Added

  1. Go to Virtual Machine Optionsand select Edit Configuration Parameters.

Edit Configuration Parameters

Edit Configuration Parameters

Add the following parameters:

ParameterValueDescription
pciPassthru.use64bitMMIOTRUEThe pciPassthru.use64bitMMIO parameter enables 64-bit MMIO for PCI passthrough devices in a VM, allowing devices like high-end GPUs to use more than 32GB of MMIO space.
pciPassthru.64bitMMIOSizeGB128The pciPassthru.64bitMMIOSizeGB parameter specifies the amount of 64-bit MMIO space (in gigabytes) to allocate for a PCI passthrough device in a VM.
pciPassthru.msiEnabledFALSEThe pciPassthru.msiEnabled parameter enables Message Signal Interrupts (MSI) for a PCI passthrough device in a VM, improving device performance and reducing CPU overhead.
hypervisor.cpuid.v0TRUEThe hypervisor.cpuid.v0 parameter modifies the CPUID information presented to the VM, potentially allowing for better compatibility with certain hardware or software, especially when dealing with GPU passthrough or specific driver requirements.

Configuration Parameters finally added

Configuration Parameters finally added

  1. Save the changes and you're ready to start the Virtual Machine in next section.

Start the Virtual Machine

  1. Start the Virtual Machine and wait until the following screen appears to get the BarbaraID:

QR Code

QR Code

  1. Scan the QR and you'll get the Barbara ID to be able to add your device to Barbara Panel:

Get BarbaraId

Get BarbaraId

  1. Once in Barbara Panel, click on the NEW NODE button to add the virtual machine:

Add a New Node

Add a New Node

  1. Then fill in the field with the ID you previously got add a descriptive name. When the disk finishes encrypting, it should appear as connected.

New VM Online

New VM Online

Now you can freely use your virtual machine as a device to deploy your solutions.