-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simplest way to setup a "virtual" link (or a switch) between two QEMU VMs #1103
Comments
Howdy! For the second question - make Snabb run as a bridge between VMs sharing an ixgbe port - check out the snabbnfv getting started. For the first question - make a Snabb script that writes two VM virtio-net ports together directly - you can write a script that creates to |
Thanks a lot for the quick reply!
I was not able to make it work because QEMU segfaults when using vhost-user, after the vhost-user session has been established with a snabb vhostuser App (I see Snabb logging the vhost-user connection setup). This is the QEMU command that I use (I have setup the hugepages):
And I run Snabb with
where "vm2vm" is my script above. Do you think I'm getting something wrong? Thanks! |
Have you seen the HOWTO linked above? That goes into a lot of detail about running all the bits including QEMU. For me it is always crafting the QEMU command line that is the hardest part... |
Ah ok, I will check, thanks! |
Upstream should be fine, except that if you restart Snabb you may also need to restart the VM. |
Ok! In any case I'll try to follow the instructions. Thanks!
2017-02-22 11:47 GMT+01:00 Luke Gorrie <notifications@github.com>:
… Upstream should be fine, except that if you restart Snabb you may also
need to restart the VM.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1103 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEsSwTlwN6XaF-PaUPsw_7yWT4PTmHVGks5rfBIngaJpZM4MGSET>
.
--
Vincenzo Maffione
|
Hi,
However, I don't see any traffic. That is because something is failing, and indeed qemu reports:
which means that is not really using vhost. I'll also try with Snabb QEMU fork. |
@vmaffione which QEMU version are you using? Currently our CI is testing interoperability with several upstream QEMU versions (2.1.3, 2.2.1, 2.3.1, 2.4.1, 2.5.1, 2.6.0, and our patched version) and seeing exactly the same behavior/performance with all of them. However, this list needs to be updated to include the latest QEMU releases and it is possible that they have made some changes that are not backwards compatible (Virtio-net is a moving target and version 1.0 was finalized after we wrote our code.) |
Hi, |
Thanks for the report. I will add the latest QEMU versions to our CI coverage as the first step towards fixing support and ensuring that it works going forwards. |
@vmaffione I updated the list of QEMU versions to test and the CI is running that now. This triggered around 2500 new test runs that take around one minute each (booting VMs and sending traffic through snabbnfv with iperf or DPDK) and are spread cross 10 servers. We can check the result once it completes and maybe identify a compatibility problem between Snabb and newer QEMU. |
(The reason it takes so many tests is that it is checking many permutations of configurations and also software setup inside the guests e.g. many versions of DPDK for the tests that need it.) |
Ok sure. It should fail at feature negotiation time, so your VMs should not able to receive/send any traffic through the virtio-net interfaces. |
One CI extension that we have talked about but never done is to also test the master branches of projects like QEMU and DPDK so that we are aware of any interop issues before they are released and have the chance to make a fix ahead of time and/or engage with them to understand what is going on. But - CI ambitions are infinite... :) |
Odd. The tests all passed including with QEMU 2.7.1 and 2.8.0. This is testing with the unmodified sources from the upstream QEMU release tarballs. Here is one randomly chosen set of logs (stdout) from two QEMU VMs connected by a Snabb process and running iperf in between: logs. Can you spot what might be a difference compared with your setup? (Are you using the upstream QEMU or a vendor branch?) If the difference is not clear could you please gist more complete information including the full QEMU command-line and output? |
I'm not using a QEMU release (tarball), I just use the current master branch on the official QEMU git repository (git://git.qemu-project.org/qemu.git). It may be that the difference is due to developments after 2.8.0, that are already in the master branch (note that the QEMU master branch is stable code). |
QEMU just tells me
as explained above, and the cause is the feature bit. This is the full QEMU command line I use:
|
Interesting. I don't see anything relevant in the QEMU 2.9.0-rc release notes. I also don't immediately see a reason when browsing the commits to master:
The error message strikes me as a little suspicious. Are you sure this is coming from the If you have the patience it would be interesting to |
I understand your doubts, but I'm sure :) This function (and the associated check) is not present on your QEMU fork, that's why. |
The missing bit |
The curious thing is that our CI is testing 9 different versions of QEMU i.e. our old fork + the last 8 major upstream releases without any patches. None of these is failing in the CI tests. So I need to double-check that the CI is really testing what it is supposed to. |
@vmaffione It would help if you can verify that the problem happens with a released version of QEMU like 2.8.0. Just to rule out the possibility of interference from a recent change in master that is not included in the tests that I am doing. |
I can do that if you point me at the release tarball. |
Here is 2.7.1: http://download.qemu-project.org/qemu-2.7.1.tar.xz |
Hm... I see something suspicious in the CI that it may be building the right QEMU but actually running the test with the standard packaged version. In that case the CI is not really testing what it thinks it is. @domenkozar do you agree with that assessment based on the runtime dependencies graph showing |
With 2.7.1 I don't even see the virtio-net interface for yet another problems (unrelated)
You could try to run snabb and qemu manually to check for the error I'm getting. |
Thanks @vmaffione for the extra details. Could be that we are lagging badly on QEMU support due to a CI error. Looking into it. |
@vmaffione I have manually tested 2.7.1 and 2.8.0 now. 2.7.1 is working for me but 2.8.0 is showing the |
ok! |
@lukego it is possible to specify qemu and dpdk from git: https://github.com/snabblab/snabblab-nixos/blob/master/jobsets/snabb-matrix.nix#L41 I've just pushed a fix for qemu testing in snabblab/snabblab-nixos@8621ed4 |
Add ability to "snabb top" to skim back through time
Hi,
I'd like to test snabb as a fast "virtual" link between two QEMU VM (using vhost-user as a backend for the virtio-net-pci VM network device).
Is there a minimal Snabb AppEngine program implementing this (i.e. two vhost-user ports with snabb unconditionally forwarding from one port to the other)?
Is there a minimal Snabb AppEngine program implementing a "virtual switch" like the standard linux in-kernel bridge (i.e. the one you create with brctl), where you can attach multiple vhost-user ports and a single ixgbe port?
Are there some updated instructions on what QEMU command-line should be used?
Thanks!
The text was updated successfully, but these errors were encountered: