vim_vm_devices

Niche VM virtual-device CRUD: vTPM, vGPU, serial port, video card.

Uses the same device-spec idiom as vim_vm_disk and vim_vm_nic: build a vim.vm.device.Virtual* device, wrap in a VirtualDeviceConfigSpec with operation="add|remove|edit", and call vm.ReconfigVM_Task.

saltext.vcf.clients.vim_vm_devices.tpm_add(opts, vm_id_or_name, profile=None)[source]

Attach a vTPM 2.0 device. VM must be powered off.

saltext.vcf.clients.vim_vm_devices.vgpu_add(opts, vm_id_or_name, profile_name, profile=None)[source]

Attach a vGPU (NVIDIA vGRID) device. Requires host with vGPU-capable card.

profile_name — vGPU profile string, e.g. grid_a100d-8c.

saltext.vcf.clients.vim_vm_devices.vgpu_remove(opts, vm_id_or_name, profile_name=None, profile=None)[source]

Detach a vGPU. If profile_name given, only remove that profile.

saltext.vcf.clients.vim_vm_devices.serial_add(opts, vm_id_or_name, *, backing='network', uri=None, direction='server', file_path=None, profile=None)[source]

Add a serial port.

backing"network" (URI) or "file". For "network", supply uri (e.g. tcp://0.0.0.0:9000) and direction (server/client). For "file", supply file_path (e.g. [ds1] vm/serial.log).

saltext.vcf.clients.vim_vm_devices.serial_remove(opts, vm_id_or_name, key=None, profile=None)[source]

Remove a serial port. If key is None, removes the first one.