13.3. Creating a custom GPU instance image
To enable your cloud users to create instances that use a virtual GPU (vGPU), you can create a custom vGPU-enabled image for launching instances. Use the following procedure to create a custom vGPU-enabled instance image with the NVIDIA GRID guest driver and license file.
- You have configured and deployed the overcloud with GPU-enabled Compute nodes.
Log in to the undercloud as the
$ source ~/overcloudrc
Create an instance with the hardware and software profile that your vGPU instances require:
(overcloud)$ openstack server create --flavor <flavor> \ --image <image> temp_vgpu_instance
<flavor>with the name or ID of the flavor that has the hardware profile that your vGPU instances require. For information about creating a vGPU flavor, see Creating a vGPU flavor for instances.
<image>with the name or ID of the image that has the software profile that your vGPU instances require. For information about downloading RHEL cloud images, see Image service in the Creating and Managing Images guide.
- Log in to the instance as a cloud user. For more information, see Connecting to an instance in the Creating and Managing Instances guide.
gridd.confNVIDIA GRID license file on the instance, following the NVIDIA guidance: Licensing an NVIDIA vGPU on Linux by Using a Configuration File.
Install the GPU driver on the instance. For more information about installing an NVIDIA driver, see Installing the NVIDIA vGPU Software Graphics Driver on Linux.注記
hw_video_modelimage property to define the GPU driver type. You can choose
noneif you want to disable the emulated GPUs for your vGPU instances. For more information about supported drivers, see Image metadata in the Creating and Managing Images guide.
Create an image snapshot of the instance:
(overcloud)$ openstack server image create \ --name vgpu_image temp_vgpu_instance
- Optional: Delete the instance.