ZStack Cloud Platform
Single Server, Free Trial for One Year
Before using the GPU passthrough feature, ensure that requirements in Preparations have been met completely and correctly. Below is detailed operational procedures for setting up GPU passthrough:
.png)
.png)
Note: After enabling IOMMU in the host, you have to make sure that IOMMU Status on the same page is available. Otherwise, the GPU passthrough feature cannot work as expected. If IOMMU State is enabled, yet IOMMU Status is unavailable, the reasons could be as follows: ROM is a configuration file used for passing through pGPUs. The ROM file you upload is updated to the pGPU that the specification specifies.
ZStack Cloud provides built-in basic ROM files, which can satisfy the majority of passthrough needs. Additionally, you can obtain other ROM files you need on the official site of the GPU supplier and then upload them.
On the main menu of ZStack Cloud, choose . Select the pGPU that you need and click . A pop-up menu appears and you can upload ROM file herein.
.png)
Note: When uploading ROM file, note the following cases:.png)
.png)
In the management interface of VM Instance, select the name of one existing VM instance and enter its details page. Choose Configuration info on the top row. Find pGPU Device on this page and click Attach.
.png)
Note: If you detach a pGPU from a running VM instance, a blue screen or suspension may occur. We recommend stopping the VM instance before performing detach operation. Select one or more stopped VM instances in the management interface of VM Instance, and click . Then you have two options to choose, that is, attach GPU specification or attach GPU device.
.png)
Note: If you use AMD Firepro S7150 X2 that features two physical GPUs (pGPUs), and want the two pGPUs to be passed through to different VMs, please install the drivers of the same versions on your VMs, so that GPU monitoring data can be obtained normally.Obtain the driver and CUDA toolkit compatible with the GPU device.
lsmod | grep nouveau to check whether the Nouveau driver has been installed. If the output data suggests the Nouveau driver has been installed, you can perform the following operations to disable it. If no output is displayed, just skip this procedure.# touch /etc/modprobe.d/nvidia-installer-disable-nouveau.conf # Create a file and save the two lines below into it blacklist nouveau options nouveau modeset=0# yum install gcc kernel-devel-$(uname -r) kernel-headers-$(uname -r) # Reconstruct initramfs image # cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak # dracut /boot/initramfs-$(uname -r).img $(uname -r) --force # Only reboot the VM in the text mode # systemctl set-default multi-user.target # init 3 # reboot # lsmod | grep nouveau # After the VM instance is rebooted, check whether the nouveau driver is used or not# chmod +x NVIDIA-Linux-x86_64-346.47.run # Configure executable permissions # ./NVIDIA-Linux-x86_64-346.47.run # Execute the driver script After you run the commands, the driver package will begin to unpack and you can follow the installation instructions. During the installation, some warnings may appear. Confirm these warnings in sequence as they do not have any real impact. If some errors occur, please refer to the table below to check the environment.| Error Message | Solution |
|---|---|
| ERROR: Unable to find the kernel source tree for the currently running kernel. Please make sure you have installed the kernel source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have the 'kernel-source' or 'kernel-devel' RPM installed. If you know the correct kernel source files are installed, you may specify the kernel source path with the '--kernel-source-path' command line option. | You need to have all of the kernel source files (including kernel, kernel-headers, and kernel-devel) installed and ensure that they are of the same version |
| ERROR: The Nouveau kernel driver is currently in use by your system. This driver is incompatible with the NVIDIA driver, and must be disabled before proceeding. Please consult the ow to correctly disable the Nouveau kernel driver. | You have to disable the Nouveau kernel driver |
| ERROR: Failed to find dkms on the system! ERROR: Failed to install the kernel module through DKMS. No kernel module was installed; please try installing again without DKMS, or check the DKMS logs for more information. | You need to install DKMS, which helps maintain out-of-tree drivers by automatically regenerating new modules when the kernel version changes |
| ERROR: Unable to load the kernel module 'nvidia.ko'. This happens most frequently when this kernel module was built against the wrong or improperly configured kernel sources, with a version of gcc that differs from the one used to build the target kernel, or if a driver such as rivafb, nvidiafb, or nouveau is present and prevents the NVIDIA kernel module from obtaining ownership of the NVIDIA graphics device(s), or no NVIDIA GPU installed in this system is supported by this NVIDIA Linux graphics driver release. | Just run the commands ./NVIDIA-Linux-x86_64-384.98.run --kernel-source-path=/usr/src/kernels/3.10.0-XXX.x86_64/ -k $(uname -r) |
# lspci |grep NVIDIA # nvidia-smi# chmod +x cuda_8.0.61_375.26_linux.run # Configure executable permissions # ./cuda_8.0.61_375.26_linux.run # Execute the driver script 
vim /root/.bashrc command and save the content below to the same file:#gpu driver export CUDA_HOME=/usr/local/cuda-8.0 export PATH=/usr/local/cuda-8.0/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH="/usr/local/cuda-8.0/lib:${LD_LIBRARY_PATH}"# source ~/.bashrc # cd /usr/local/cuda-8.0/samples/1_Utilities/deviceQuery # make # ./deviceQuery# Create a mount point. mkdir /mnt/cdrom # Mount the CD-ROM image. mount /dev/cdrom /mnt/cdrom # Install GuestTools. cd /mnt/cdrom/ bash ./zs-tools-install.sh # Unmount the CD-ROM image(Optional) cd ~ umount /mnt/cdrom
Note: selinux. Otherwise, the QGA feature may be affected.

