本次是在ESXi 5.5 U2 及 view 6.2 环境下,配置K1过程,采用VSGA方式配置。


1、下载驱动

 

2、安装NVIDIA驱动

使ESXi主机进入维护模式

# vim-cmd hostsvc/maintenance_mode_enter

安装驱动

# esxcli software vib install -v /<path_to_vib>/NVIDIA_vib

退出维护模式

# vim-cmd hostsvc/maintenance_mode_exit

检查驱动安装

# esxcli software vib list | grep NVIDIA

 

3、开启xorg服务

# /etc/init.d/xorg start

也可以使用Web Client,主机-配置-安全配置文件-属性,开启xorg服务

 

4、重启主机

# reboot

 

5、配置虚拟机

升级虚拟机版本到10

wKioL1mALnKBGnt4AAEYtCw0iH0134.png


3D渲染器,选择“硬件”


wKiom1mALpWCAOlWAAI74hkqTZU011.png



6、编辑桌面池

默认显示协议:PCoIP

允许用户选择协议:否

3D呈现器:硬件

单击“3D呈现器”-“配置”,设置虚拟机显卡缓存大小,最大支持512MB

然后开启桌面虚拟机。


7、查看K1显卡使用情况

使用SSH登录ESXi

# gpuvm


wKioL1mALyPiXwSrAAEzLt7f7LI745.jpg


查看GPU资源使用状态


wKioL1mAL02ggTxDAAEVhl4arFY022.jpg


8、在vCenter下查看K1使用情况

如下所示,即配置正常。

wKioL1mAL2TTUQVqAAF_f7i02bk146.jpg





配置虚拟机显卡前,先按以下所示配置BIOS:

wKiom1mAL3vy0IKKAAMs0q9G25o366.png

wKioL1mAL3vhC_9bAABX6Hg0Dhc654.png



 

9、参考资料

Uninstalland Update the GPU VIB

To update the GPUVIB, you must uninstall the currently installed VIB and install the new VIB.

To uninstall thecurrently installed VIB:

1. Stop all virtualmachines th atuse 3D acceleration.

a. Place the ESXi hostinto maintenance mode.

b. Open a c ommandprompt on the ES Xi host.

c. Stop the Xorgservice by running the following command:

# /etc/init.d/xorg stop

2. Remove the NVIDIAVMkernel driver by running thefo llowing command:

# vmkload_mod -u nvidia

3. Identify the NVIDIAVIB nameby running thefo llowing command:

# esxcli software viblist | grep NVIDIA

4. Remove the VIB byrunning thefo llowing command:

# esxcli software vibremove -n <nameofNVIDIAVIB>

You can now install anewer GPU VIB.

 

 

2. Place the ESXi hostin main tenance mode.

# vim-cmd hostsvc/maintenance_mode_enter

3. Open a commandprompt on the ESXi host and run one of thef ollo wing commands:

# esxcli software vib install -v/<path_to_vib>/nvidia_vib

 

# vim-cmd hostsvc/maintenance_mode_exit

 

reboot

 

Start the Xorg Service

Before you start anyvirtual machines, make sure that the Xorg service is running. You can use thevSphere Client, the vSphere Web Client, or the CLI

 

To use thevSphere Client to verify that the Xorg service is running:

1. Connect t othe ESXihost.

a. On the Configurationtab under Software, click Security Profile.

b. Click the Propertieslink for Services.

c. Verify that Xorg is Runningandhas the desired startup policy.

2. If Xorg isStopped:

a. Select xorgand click Options.

b. Click Start.

c. Select the Startup Policyand click OK.

To use thevSphere Web Client to verify that the Xorg service is running:

1. Connect to vCenterServer.

From the Inventory, select the ESXi host.

On the Manage tab under System, click Security Profile.

Click the Editbutton for Services.

Verify that Xorg is Runningand has the desired startup policy.

2. If Xorg is S topped:

a. Select xorgand click Start.

b. Select the Startup Policyand click OK.

To use the CLI to verify that the Xorgservice is running, run the following command:

#/etc/init.d/xorg start

 

 

Post-InstallationChecks

Thissection contains various commands that can be used to install the GPU card andits respective drivers correctly.

Xorg

Xorgis a full-featured X server that was originally designed for UNIX and UNIX-likeoperating systems running on Intel x86 hardware. It now runs on a wider rangeof hardware and OS platforms, including ESXi. To check the status of Xorg, runthe following command in an SSH session:

# /etc/init.d/xorg status

IfXorg is not started, run the following command to start it:

# /etc/init.d/xorg start

IfXorg fails to start, go to the Troubleshooting section.

gpuvm

Thegpuvm command gives a list of working GPUs, withinformation on which virtual machine is using which GPU and the amount of videomemory reserved for each GPU.

Issuethe gpuvm command through an ESXi SSH session:

# gpuvm

Ifthis command has no output at all, then the Xorg service is most likely notrunning. Run the following command in an SSH session to show the status ofXorg:

# /etc/init.d/xorg status

IfXorg is not started, run the following command to start it:

# /etc/init.d/xorg start

IfXorg fails to start, go to the Troubleshooting section.

 

 

nvidia-smi

TheNVIDIA-specific nvidia-smi tool shows how much of each GPU is in use when theNVIDIA driver is used. To use nvidia-smi,issue the following command in an SSH session:

# nvidia-smi

This showsseveral details of GPU usage at the time you issue the command. This display isnot dynamic and must be reissued to update the information. You can also issuethe following command:

# watch n1 nvidia-smi

This command issues thenvidia-smicommand every second toprovide a refresh of that point-in-time information. Sample output is shown inFigure 2.

 

wKioL1mAL6WAr2wcAABk0HYQgtc680.jpg


# gpuvm

 

For NVIDIA-basedGPUs:

# esxcli software vib list | grep NVIDIA