Collapse All
Virtuozzo Virtualization SDK C API Reference
ContentsIndex
PreviousUpNext
PHT_HW_GENERIC_PCI_DEVICE
Functions  Functions by Handle  Legend

The PHT_HW_GENERIC_PCI_DEVICE handle is used to obtain information about a generic PCI device installed in the host machine. The handle is obtained by calling the PrlSrvCfg_GetGenericPciDevice function. The handle is derived from PHT_HW_GENERIC_DEVICE, which provides additional functions.

Description

Generic PCI devices managed by this handle include devices that can be accessed directly by a virtual machine using the IOMMU technology, such as Intel's Vt-d. If you have a system with a PCI device that support the technology, you can choose the device assignment from one of the following options: 

Host Computer. If you select this assignment, the PCI device will be available to the host computer only. 

Virtual Machines. If you select this assignment, a pass-through driver will be automatically installed in the host operating system, which will make the device invisible to it. This will make it possible to assign the device directly to a virtual machine. 

To select the PCI device assignment, follows these steps: 

1. Call the PrlSrvCfg_GetGenericPciDevicesCount function to determine the number of PCI devices installed in the host. 

2. Iterate through the device list calling the PrlSrvCfg_GetGenericPciDevice function in each iteration. The function obtains a handle of type PHT_HW_GENERIC_PCI_DEVICE containing information about an individual device. 

3. Call the PrlSrvCfgPci_GetDeviceClass to determine the type of the device (video, network, sound). Choose the device(s) of interest and call the PrlSrvCfgDev_SetDeviceState function for each one passing a value indicating the desired assignment type. 

4. Populate the PHT_HANDLES_LIST handle with PHT_HW_GENERIC_PCI_DEVICE handles that you've selected in step 3. 

5. Call the PrlSrv_ConfigureGenericPci function passing the PHT_HANDLES_LIST handle as a parameter to submit the changes to the Virtuozzo Service. 

6. If you've selected the "Virtual Machines" assignment, you can now add the device to the virtual machine(s) of your choice. Please note that the device can be added to multiple virtual machines but it can be used only by a single machine at any given time. Once the device is added to the virtual machine, the latest device drivers should be installed in it (provided by the device manufacturer) the usual way.

Functions
 
Name 
Description 
 
Obtains the class of the PCI device (network, display, sound, etc.). 
Links
Copyright ©2016-2017 Parallels International GmbH. All rights reserved.