Managing Physical PCI Devices

The PCI (Peripheral Component Interconnect) passthrough feature enables full access and direct control of a physical PCI device using a VM in your environment. The passthrough works for RAID and GPU (Graphical Processing Unit) devices that can be attached to a PCI bus. For example, to use a high-performance application that needs to directly attach storage to a VM, detach the RAID card from the hypervisor and directly attach it to the VM using the PCI slot. You must install the correct driver for the PCI device on the VM.

A PCI device that is attached to a VM is dedicated and cannot be shared with other VMs.

Note
You cannot perform a live migration on VMs that are using PCI passthrough.

To enable PCI passthrough in your environment, contact Metacloud Support and create a support ticket for your request; include the type of device and the device ID when submitting your request.

To test an instance with a RAID:

  1. Create a flavor using the --property option with the PCI alias:

    # openstack flavor set m1.large --property "pci_passthrough:alias"=<"RAID_DEVICE:#">
       
    +----------------------------+----------------------------------------+
    | Field                      | Value                                  |
    +----------------------------+----------------------------------------+
    | OS-FLV-DISABLED:disabled   | False                                  |
    | OS-FLV-EXT-DATA:ephemeral  | 0                                      |
    | disk                       | 80                                     |
    | id                         | 4                                      |
    | name                       | m1.large                               |
    | os-flavor-access:is_public | True                                   |
    | properties                 | pci_passthrough:alias='RAID_DEVICE:1'  |
    | ram                        | 8192                                   |
    | rxtx_factor                | 1.0                                    |
    | swap                       |                                        |
    | vcpus                      | 4                                      |
    +----------------------------+----------------------------------------+
    
  2. Launch an instance with the PCI requirements. The image must contain the driver to the assigned devices, so use the --key_name option for the key-pair:

    # nova boot --image rhel7 --key_name <KEY_NAME> --flavor m1.large <RAID_DEVICE>_vm
    
  3. Ensure the instance is active and you can log in to the VM:

    # nova show <RAID_DEVICE>
    # nova ssh --private <RAID_DEVICE> -i test.pem
    

To test an instance with a GPU:

  1. Create a flavor using the --property option with the PCI alias:

    # openstack flavor set m1.large --property "pci_passthrough:alias"=<"GPU_DEVICE">
    +----------------------------+----------------------------------------+
    | Field                      | Value                                  |
    +----------------------------+----------------------------------------+
    | OS-FLV-DISABLED:disabled   | False                                  |
    | OS-FLV-EXT-DATA:ephemeral  | 0                                      |
    | disk                       | 80                                     |
    | id                         | 1                                      |
    | name                       | m1.large                               |
    | os-flavor-access:is_public | True                                   |
    | properties                 | pci_passthrough:alias='GPU_DEVICE'    |
    | ram                        | 528                                    |
    | rxtx_factor                | 1.0                                    |
    | swap                       |                                        |
    | vcpus                      | 1                                      |
    +----------------------------+----------------------------------------+
    
    
  2. Launch an instance with the PCI requirements, the image must contain the driver to the assigned devices, use the --key_name option for the key-pair:

    # nova boot --image rhel7 --key_name <KEY_NAME> --flavor m1.large <GPU_DEVICE>_vm
    
  3. Ensure the instance is active and you can log in to the VM:

    # nova show <GPU_DEVICE>
    # nova ssh --private <GPU_DEVICE> -i test.pem
    

Using Host Aggregates

You can group servers together for a specific purpose, for example, servers dedicated to graphic rendering can be aggregated for instance scheduling. See Metacloud Capacity Planning for more information on scheduling.

Contact Metacloud Support to set up host aggregates in your configuration.