[rdo-list] How to assign two same type PCI pass-through devices (Ethernet cards) to 2 different VM instances?

Chinmaya Dwibedy ckdwibedy at gmail.com
Mon May 23 06:28:29 UTC 2016


Hi Dotan,


Thank you for your response. I agree that, there is no need of different
alias.


I configured the followings in nova.conf.

1)      pci_passthrough_whitelist =
[{"vendor_id":"8086","product_id":"154d"}]

White list of Ethernet PCI devices available to VMs.

2)      pci_alias={"vendor_id":"8086", "product_id":"154d", "name":"a1"}

The pci alias 'a1' to present a request for PCI devices with vendor_id as
0x8086 and product_id as 154d.


Please suggest how to update a flavor that requires only one PCI device?
Note that, both the Ethernet Controllers have same product ID and vendor
ID.

nova flavor-key  m1.large set  "pci_passthrough:alias"="a1" . With this
both the PCI devices are being assigned to one VM. But I need to assign
fists Ethernet device to VMa and second Ethernet device ti VMb.


Please feel free to correct me if I have misunderstood anything.



Regards,

Chinmaya

On Sun, May 22, 2016 at 12:13 PM, Dotan, Alon <alon.dotan at hpe.com> wrote:

> why different alias?
>
> if I understood correctly, what you try to do is to map same kind of
> device to 2 vms
>
>
>
> example:
>
> pool of 4 Intel ixgbe ports (on 2 or 1 card), map 2 ports to first vm and
> 2 to second
>
>
>
> if I’m right you need single alias and to configure the quantity in the
> flavor declaration
>
>
>
> *From:* rdo-list-bounces at redhat.com [mailto:rdo-list-bounces at redhat.com] *On
> Behalf Of *Chinmaya Dwibedy
> *Sent:* Friday, May 20, 2016 8:54 AM
> *To:* rdo-list at redhat.com
> *Subject:* [rdo-list] How to assign two same type PCI pass-through
> devices (Ethernet cards) to 2 different VM instances?
>
>
>
> Hi All,
>
>
>
> Can we assign two same type PCI pass-through devices (Ethernet cards) to 2
>
> different VM instances separately? Please note that, both the cards have
>
> same vendor_id and product_id.
>
>
>
> I configured it in pci_passthrough_whitelist and create two different
>
> pci_alias (Say a1 and a2). Modified the Nova flavor to use a1 by VM1 and
>
> VM2. Followed the procedures mentioned at
>
>
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Administration_Guide/chap-Guest_virtual_machine_device_configuration.html
>
>
>
> With this edited xml files of both the instances (after shutting down).
>
> Added a device entry in the <source> section to assign the PCI device to
>
> the guest virtual machine. and accordingly configured domain, bus, slot and
>
> function. Restarted the VMs using #virsh start command. Made an Query pci
>
> device in nova DB and found that two Ethernet PCI devices have been
>
> assigned to single VM.
>
>
>
> I cannot assign 2 same type PCI pass-through Ethernet devices to 2 VM
>
> instances separately. Can you please let me know how to accomplish the
>
> same? Thanks in advance for your time and help.
>
>
>
> Regards,
>
> Chinmaya
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rdoproject.org/pipermail/dev/attachments/20160523/d9d4b048/attachment.html>


More information about the dev mailing list