Directly connect NIC or other cards to VM?

Is there a way to directly connect a specific device (ie, NIC) to a particular VM? I've figured out how to map a specific network interface to a VM, thats one step, but in the end I may need direct access to the PCI device itself. Second to that, for network interfaces mapped to a particular VM, is there a way for the VM to be able to properly detect physical link state of that interface? Right now that's a 'configurable option' inside network interface settings on the VM in the manager (ie, plugged, not plugged, and link state up /down) Thanks, David

Still easy enough to do with vdsm-hooks -- Dan On Thu, Feb 12, 2015 at 6:28 PM, David Smith <dsmith@mypchelp.com> wrote:
Is there a way to directly connect a specific device (ie, NIC) to a particular VM?
I've figured out how to map a specific network interface to a VM, thats one step, but in the end I may need direct access to the PCI device itself.
Second to that, for network interfaces mapped to a particular VM, is there a way for the VM to be able to properly detect physical link state of that interface? Right now that's a 'configurable option' inside network interface settings on the VM in the manager (ie, plugged, not plugged, and link state up /down)
Thanks, David
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

On 13 Feb 2015, at 15:09, Dan Yasny <dyasny@gmail.com> wrote: =20 Still easy enough to do with vdsm-hooks =20 -- Dan =20 On Thu, Feb 12, 2015 at 6:28 PM, David Smith <dsmith@mypchelp.com> = wrote: Is there a way to directly connect a specific device (ie, NIC) to a =
=20 I've figured out how to map a specific network interface to a VM, =
=20 Second to that, for network interfaces mapped to a particular VM, is =
--Apple-Mail=_FFE80847-886D-458B-B13C-9D1FB481489B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi David, maybe if you gave us a little bit more of the big picture we can find = some way. What is the the reason for the actions you take? What are you = trying to achieve? Martin particular VM? thats one step, but in the end I may need direct access to the PCI = device itself. there a way for the VM to be able to properly detect physical link state = of that interface? Right now that's a 'configurable option' inside = network interface settings on the VM in the manager (ie, plugged, not = plugged, and link state up /down)
=20 Thanks, David =20 _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users =20 =20 _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
--Apple-Mail=_FFE80847-886D-458B-B13C-9D1FB481489B Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJU3hdVAAoJENsSVGhnNZo+ekEH/2tJ2ANDth4J5bjHOa+r+PU9 oWyh6maqqS5wSviyiR7ftomDdmcvqRW4S/73B5gX981C1D4p5Lc0PIEEh9VSpjas 5eenFoHM9+5k9vmrRQWNvGFt3chHKKWMWiiYxfbVHVZ/M0tRl6wehMmbx7bIZ/Wc 4DwLgRxyAdxqFwaAE3La35l7JaK15qKz7SOOoMJ+eUsxub5WwZkR+X9klLa5BMse Sln+s3r9nWz/wq+XjXT+HS+j7B6zDaC59vZCsPGsw9hsYPXxd6SjHXv7xiKdYd5V 8VkdaFo88PsG9nCcABGNBc70x1f6OJdnhkTTyzDzDULtEvJC1VQblsP359Czlrw= =hvq8 -----END PGP SIGNATURE----- --Apple-Mail=_FFE80847-886D-458B-B13C-9D1FB481489B--

I do physical layer testing of ethernet switches. I want to virtualize the test servers for scalability, reliability, and a VM solution allows easy change of system configuration. The bottom line is that testing often requires opening the network port in promiscuous mode to sniff traffic, many tests need to be able to use ethtool to view network properties (speed, duplex, link state, etc) and to set properties (auto-neg, forced speed, duplex, link state, etc). We use TOE cards which also allow offloading data from the CPU to the card allowing higher throughput, some tests we use this to send ~1Gbps traffic and monitor the data rate. So there are multiple scenarios, the main one being the ability to see and set physical layer properties, the other being able to offload traffic for maximum throughput. The latter can possibly be accomplished through OS layer drivers on the hypervisor but the former requires better driver access than what i currently see in the VM. On Fri, Feb 13, 2015 at 7:25 AM, Martin Pavlík <mpavlik@redhat.com> wrote:
Hi David,
maybe if you gave us a little bit more of the big picture we can find some way. What is the the reason for the actions you take? What are you trying to achieve?
Martin
On 13 Feb 2015, at 15:09, Dan Yasny <dyasny@gmail.com> wrote:
Still easy enough to do with vdsm-hooks
-- Dan
On Thu, Feb 12, 2015 at 6:28 PM, David Smith <dsmith@mypchelp.com> wrote: Is there a way to directly connect a specific device (ie, NIC) to a particular VM?
I've figured out how to map a specific network interface to a VM, thats one step, but in the end I may need direct access to the PCI device itself.
Second to that, for network interfaces mapped to a particular VM, is there a way for the VM to be able to properly detect physical link state of that interface? Right now that's a 'configurable option' inside network interface settings on the VM in the manager (ie, plugged, not plugged, and link state up /down)
Thanks, David
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

Hi David, On 13/02/15 01:28, David Smith wrote:
Is there a way to directly connect a specific device (ie, NIC) to a particular VM?
I've figured out how to map a specific network interface to a VM, thats one step, but in the end I may need direct access to the PCI device itself.
I think this 3.6 feature might do exactly what you want: http://www.ovirt.org/Features/hostdev_passthrough It's gonna be a while before 3.6 is out, but once the feature is merged it'll be available if you install the nightly snapshot. CCing Martin Polednik, the feature owner.
Second to that, for network interfaces mapped to a particular VM, is there a way for the VM to be able to properly detect physical link state of that interface? Right now that's a 'configurable option' inside network interface settings on the VM in the manager (ie, plugged, not plugged, and link state up /down)
If I'm not mistaken, once you have direct access to the PCI device you'll be able to query for its actual state using e.g. ethtool.
Thanks, David
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

----- Original Message -----
From: "Lior Vernia" <lvernia@redhat.com> To: "David Smith" <dsmith@mypchelp.com> Cc: "users" <users@ovirt.org>, "Martin Polednik" <mpoledni@redhat.com> Sent: Monday, February 16, 2015 9:15:41 AM Subject: Re: [ovirt-users] Directly connect NIC or other cards to VM?
Hi David,
On 13/02/15 01:28, David Smith wrote:
Is there a way to directly connect a specific device (ie, NIC) to a particular VM?
I've figured out how to map a specific network interface to a VM, thats one step, but in the end I may need direct access to the PCI device itself.
I think this 3.6 feature might do exactly what you want: http://www.ovirt.org/Features/hostdev_passthrough
It's gonna be a while before 3.6 is out, but once the feature is merged it'll be available if you install the nightly snapshot. CCing Martin Polednik, the feature owner.
Hello, just on the status of the feature (as it's exactly what you require - direct pci device attachment) - the host side is hopefully ~week away from being ready, the UI side will take longer though - if you wanted, you could probably run nightly and spawn the VM yourself and treat is as external VM. CCing Martin Betak, who is the one to blame for the UI :) You also need RHEL 7 (ideal support will be in 7.1) and I suggest reading the chapter on IOMMU groups, as you might need to block (detach from host) other devices than the nic in order to get it passed through.
Second to that, for network interfaces mapped to a particular VM, is there a way for the VM to be able to properly detect physical link state of that interface? Right now that's a 'configurable option' inside network interface settings on the VM in the manager (ie, plugged, not plugged, and link state up /down)
If I'm not mistaken, once you have direct access to the PCI device you'll be able to query for its actual state using e.g. ethtool.
Thanks, David
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

Great, thanks for the update. That'll certainly keep me moving forward in that direction. I think at this time I can wait a while for it to be official. Thanks, David On Mon, Feb 16, 2015 at 3:36 AM, Martin Polednik <mpolednik@redhat.com> wrote:
----- Original Message -----
From: "Lior Vernia" <lvernia@redhat.com> To: "David Smith" <dsmith@mypchelp.com> Cc: "users" <users@ovirt.org>, "Martin Polednik" <mpoledni@redhat.com> Sent: Monday, February 16, 2015 9:15:41 AM Subject: Re: [ovirt-users] Directly connect NIC or other cards to VM?
Hi David,
On 13/02/15 01:28, David Smith wrote:
Is there a way to directly connect a specific device (ie, NIC) to a particular VM?
I've figured out how to map a specific network interface to a VM, thats one step, but in the end I may need direct access to the PCI device itself.
I think this 3.6 feature might do exactly what you want: http://www.ovirt.org/Features/hostdev_passthrough
It's gonna be a while before 3.6 is out, but once the feature is merged it'll be available if you install the nightly snapshot. CCing Martin Polednik, the feature owner.
Hello,
just on the status of the feature (as it's exactly what you require - direct pci device attachment) - the host side is hopefully ~week away from being ready, the UI side will take longer though - if you wanted, you could probably run nightly and spawn the VM yourself and treat is as external VM. CCing Martin Betak, who is the one to blame for the UI :)
You also need RHEL 7 (ideal support will be in 7.1) and I suggest reading the chapter on IOMMU groups, as you might need to block (detach from host) other devices than the nic in order to get it passed through.
Second to that, for network interfaces mapped to a particular VM, is there a way for the VM to be able to properly detect physical link
state
of that interface? Right now that's a 'configurable option' inside network interface settings on the VM in the manager (ie, plugged, not plugged, and link state up /down)
If I'm not mistaken, once you have direct access to the PCI device you'll be able to query for its actual state using e.g. ethtool.
Thanks, David
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

----- Original Message -----
From: "David Smith" <dsmith@mypchelp.com> To: "Martin Polednik" <mpolednik@redhat.com> Cc: "Lior Vernia" <lvernia@redhat.com>, "users" <users@ovirt.org>, "Martin Betak" <mbetak@redhat.com> Sent: Wednesday, May 6, 2015 8:04:22 PM Subject: Re: [ovirt-users] Directly connect NIC or other cards to VM?
Great, thanks for the update. That'll certainly keep me moving forward in that direction.
I think at this time I can wait a while for it to be official.
Thanks, David
On Mon, Feb 16, 2015 at 3:36 AM, Martin Polednik <mpolednik@redhat.com> wrote:
----- Original Message -----
From: "Lior Vernia" <lvernia@redhat.com> To: "David Smith" <dsmith@mypchelp.com> Cc: "users" <users@ovirt.org>, "Martin Polednik" <mpoledni@redhat.com> Sent: Monday, February 16, 2015 9:15:41 AM Subject: Re: [ovirt-users] Directly connect NIC or other cards to VM?
Hi David,
On 13/02/15 01:28, David Smith wrote:
Is there a way to directly connect a specific device (ie, NIC) to a particular VM?
I've figured out how to map a specific network interface to a VM, thats one step, but in the end I may need direct access to the PCI device itself.
I think this 3.6 feature might do exactly what you want: http://www.ovirt.org/Features/hostdev_passthrough
It's gonna be a while before 3.6 is out, but once the feature is merged it'll be available if you install the nightly snapshot. CCing Martin Polednik, the feature owner.
Hello,
just on the status of the feature (as it's exactly what you require - direct pci device attachment) - the host side is hopefully ~week away from being ready, the UI side will take longer though - if you wanted, you could probably run nightly and spawn the VM yourself and treat is as external VM. CCing Martin Betak, who is the one to blame for the UI :)
Hi all, the frontend part has just landed in master [1]. The UI is not beatufil (yet) but it should provide you with the ability to directly attach specific devices to VM. It should be polished well enough in time for 3.6. Best regards, Martin B. [1] https://gerrit.ovirt.org/#/c/37620/
You also need RHEL 7 (ideal support will be in 7.1) and I suggest reading the chapter on IOMMU groups, as you might need to block (detach from host) other devices than the nic in order to get it passed through.
Second to that, for network interfaces mapped to a particular VM, is there a way for the VM to be able to properly detect physical link
state
of that interface? Right now that's a 'configurable option' inside network interface settings on the VM in the manager (ie, plugged, not plugged, and link state up /down)
If I'm not mistaken, once you have direct access to the PCI device you'll be able to query for its actual state using e.g. ethtool.
Thanks, David
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
participants (6)
-
Dan Yasny
-
David Smith
-
Lior Vernia
-
Martin Betak
-
Martin Pavlík
-
Martin Polednik