As a DevOps engineer, you can review available VM resources and provision a stand-alone VM in a namespace on a Supervisor. Use the kubectl command to perform the following tasks.
Prerequisites
- Create a namespace and assign storage policies to it. See Create and Configure a vSphere Namespace.
- Create a content library and associate it with the namespace. See Creating and Managing Content Libraries for Stand-Alone VMs in vSphere with Tanzu.
- If a content library is protected by a security policy, all library items must be complaint. If the protected library includes a mix of compliant and non-compliant items, the kubectl get virtualmachineimages command fails to present VM images to the DevOps engineers.
- If you plan to deploy VMs with vGPU devices, you must have access to images with the boot mode set to EFI, such as CentOS.
- Associate default or custom VM classes with a namespace. See Working with VM Classes in vSphere with Tanzu.
If you plan to use NVIDIA vGPU or other PCI devices for your VMs, the VM class must include PCI configuration. See Add PCI Devices to a VM Class in vSphere with Tanzu.
View VM Resources Available on a Namespace in vSphere with Tanzu
As a DevOps engineer, verify that you can access VM resources on your namespace, and view VM classes and VM templates available in your environment. You can also list storage classes and other items you might need to self-service a VM.
Procedure
Deploy a Virtual Machine in vSphere with Tanzu
As a DevOps engineer, provision a VM and its guest OS in a declarative manner by writing VM deployment specifications in a Kubernetes YAML file.
Prerequisites
- Make sure to use appropriate VM class with PCI configuration. See Add PCI Devices to a VM Class in vSphere with Tanzu.
- VMs with vGPU devices require images that have boot mode set to EFI, such as CentOS.
- VMs with vGPU devices that are managed by VM Service are automatically powered off when an ESXi host enters maintenance mode. This might temporarily affect workloads running in the VMs. The VMs are automatically powered on after the host exists the maintenance mode.
Procedure
Results
What to do next
Install the NVIDIA Guest Driver in a VM in vSphere with Tanzu
If the VM includes a PCI device configured for vGPU, after you create and boot the VM in your vSphere with Tanzu environment, install the NVIDIA vGPU graphics driver to fully enable GPU operations.
Prerequisites
- Make sure that the VM you created references the VM class with vGPU definition. See Add PCI Devices to a VM Class in vSphere with Tanzu.
- Verify that you downloaded the vGPU software package from the NVIDIA download site, uncompressed the package, and have the guest drive component ready. For information, see appropriate NVIDIA Virtual GPU Software documentation.
Note: The version of the driver component must correspond to the version of the vGPU Manager that a vSphere administrator installed on the ESXi host.