VDE Network Backend Error

Asked by Robert Simmons

When I try to use the VDE network backend with a QEMU VM, an error is returned:
"Parameter 'type' expects a netdev backend type"

In an identical environment, but with QEMU built from source according to their documentation, this error does not happen, and the VM works as expected.

I am using a fresh install of Ubuntu 22.04 LTS for testing the following. I am also using Vagrant to make sure that there is no variability when testing across atomic configuration and build changes. Here is the output from lsb_release -a

Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy

Here are all the commands in Vagrant's install script:

#!/bin/bash
## Set environment
export DEBIAN_FRONTEND=noninteractive

## Update Ubuntu
sleep 20
echo 'APT::Get::Always-Include-Phased-Updates "1";' | tee /etc/apt/apt.conf.d/80PhasedUpdates
apt-get update
apt-get --with-new-pkgs upgrade -y
apt-get autoremove -y
apt-get autoclean -y

Here is the section of the script that installs QEMU and VDE2:

apt-get install -y qemu-system-x86 vde2

Here are the commands that I am using to start the VDE switch and the QEMU VM (I am running these two in separate tmux sessions because neither command is backgrounded:

vde_switch -sock /tmp/myswitch
qemu-system-x86_64 -m 8G -cpu host -enable-kvm -nic vde,sock=/tmp/myswitch

Here is the resulting error:
qemu-system-x86_64: -nic vde,sock=/tmp/myswitch: Parameter 'type' expects a netdev backend type

Is this a bug that I should report here with regards to the qemu package in jammy?

Question information

Language:
English Edit question
Status:
Open
For:
Ubuntu qemu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Robert Simmons (rsimmons0) said :
#1

One more thing: the commands that I am using are directly from QEMU's documentation in the following location:

https://www.qemu.org/docs/master/system/invocation.html#hxtool-5:~:text=%23%20launch%20vde%20switch%0Avde_switch%20%2DF%20%2Dsock%20/tmp/myswitch%0A%23%20launch%20QEMU%20instance%0Aqemu%2Dsystem%2Dx86_64%20linux.img%20%2Dnic%20vde%2Csock%3D/tmp/myswitch

The only difference is Ubuntu's version of VDE2 does not have a "-F" switch, so I have omitted that. And I want to repeat that when building from source and then using these same exact commands, everything works as expected.

Revision history for this message
Bernard Stafford (bernard010) said (last edit ):
#2

https://packages.ubuntu.com/jammy/qemu A fast processor emulator, dummy package.
Ubuntu 22.04 was released for distribution on 2022-04-21
https://packages.ubuntu.com/search?keywords=vde&searchon=names&suite=jammy&section=all
Which version of vde are you referring to?? This is the list .?
https://www.qemu.org/docs/master/system/quickstart.html
You are not following an Ubuntu Tutorial.. ?

Revision history for this message
Robert Simmons (rsimmons0) said :
#3

> Which version of vde are you referring to?? This is the list .?

Repeating from my first post:

Here is the section of the script that installs QEMU and VDE2:

apt-get install -y qemu-system-x86 vde2

Here is a link to the description of the package from the list that you have linked to:
https://packages.ubuntu.com/jammy/vde2

> You are not following an Ubuntu Tutorial.. ?

No, I am showing a difference in behavior between the package provided by Ubuntu and manually compiled from source. I am seeking insight into whether or not this is a software defect in the package which would require a fix by the package maintainers. I am starting here with this as a launchpad question rather than directly opening a bug report first.

Are you able to reproduce this error, and is this a software defect that would warrant a bug report?

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

I guess that this is caused by different version of the software.

Ubuntu is no rolling release, that means that software is not upgraded to higher versions after initial release.
Thus qemu in Jammy is version 6.2

The page https://www.qemu.org/docs/master/system/invocation.html#hxtool-5 shows at its very end "This documentation is for QEMU version 7.1.50."

You could try doing the same with a Ubuntu kinetic system, there qemu is version 7.0

Revision history for this message
Robert Simmons (rsimmons0) said :
#5

Manfred Hampl,

Thanks so much for you help. I really appreciate it. I like that Ubuntu is not a rolling release. Those people who ask for upgrades are so annoying. I totally understand that you would want that type of person to go away.

I am encountering an error when I start a VDE switch and then try to connect a QEMU VM to the new switch.

vde_switch -sock /tmp/myswitch
qemu-system-x86_64 -m 8G -cpu host -enable-kvm -nic vde,sock=/tmp/myswitch
qemu-system-x86_64: -nic vde,sock=/tmp/myswitch: Parameter 'type' expects a netdev backend type

What would you advise as the next step? Do you have a suggested workaround? Is there something that I am missing that I need to do to get this working?

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

My suggestion is that you try the same process in another QEMU VM that is based on Ubuntu kinetic, not on Ubuntu jammy.

Revision history for this message
Robert Simmons (rsimmons0) said :
#7

I would like to use the LTS version to build the system that I am building. Is there a way forward and past this error on Ubuntu 22.04 LTS?

Another question: what is the goal you have in mind with regards to checking on kinetic?

Revision history for this message
Robert Simmons (rsimmons0) said :
#8

Also, just an FYI: it's not possible to test on kinetic. The hosting provider that I am using only has released versions of Ubuntu available to run. The version 22.04 LTS is the latest one available to use.

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

"what is the goal you have in mind with regards to checking on kinetic?"
My intention was trying to find out whether this might be related to the somewhat older version in jammy (6 vs. 7 in kinetic), but you can forget that idea.

Due to the fact that you cannot test kinetic, I looked further into details and found the following:

The manpages https://manpages.ubuntu.com/manpages/jammy/en/man1/qemu-system-x86_64.1.html tell:
...
       -netdev vde,id=id[,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]
...
              This option is only available if QEMU has been compiled with vde support enabled.
...

Looking into the build log https://launchpadlibrarian.net/610700304/buildlog_ubuntu-jammy-amd64.qemu_1%3A6.2+dfsg-2ubuntu6.3_BUILDING.txt.gz I see:
...
  Dependencies
    SDL support : YES
...
    vde support : NO
...

My conclusion is, that the vde features are not enabled in the qemu packages on Ubuntu jammy (nor in the package for kinetic).

Revision history for this message
Robert Simmons (rsimmons0) said :
#10

Great, now we're making real progress.

My next question: if vde features are not enabled in the qemu packages on Ubuntu jammy, why does the qemu package list vde2 in the suggested related packages:

https://packages.ubuntu.com/jammy-updates/qemu-system-x86#:~:text=vde2,Virtual%20Distributed%20Ethernet

And why does the vde2 package have the same, reciprocal suggested package:

https://packages.ubuntu.com/jammy/vde2#:~:text=qemu%2Dsystem,system%20emulation%20binaries

My hypothesis is that there is an error or omission in the build process where a dependency that is expected according to the package mainrtainer is, in reality not being found, built, included, or whatever is needed.

Therefore, I return to something like my original question:

Is this a package bug, and should I open a bug report for it to get it looked at by the package maintainers?

Revision history for this message
Robert Simmons (rsimmons0) said :
#11

Also, so that I can be better informed and not need to ask as many questions in the future:

Where did you navigate to to view the build logs for the qemu package? I see the link you posted, but if I were to want to look at build logs for X package, how would I get there?

Revision history for this message
Robert Simmons (rsimmons0) said :
#12

I have some insight that I have learned during the process of building from source.

I initially installed the package "libvde-dev" before running ./configure, and it resulted in "vde support : NO". So, I started with a clean environment and installed "libvdeplug-dev". Then I got "vde support : YES".

Perhaps the build process included this same mistake / misunderstanding as I initially had?

Is there a way to list the installed packages in the build environment to see if libvdeplug-dev is present or absent? Its absence would explain why VDE support is not being built.

Revision history for this message
Robert Simmons (rsimmons0) said :
#13

Also, alternatively, the package maintainers may mean for VDE support not to be included. In that case, the dependency suggestions for the package should be changed so that vde2 is not listed as a suggested dependency. I am fine with this as an alternative outcome as well. I can build all the parts on my own and not use the provided packages. In that case, the misleading package suggestions should be edited.

Revision history for this message
Manfred Hampl (m-hampl) said (last edit ):
#14

"How to find the build log":

Visit the Ubuntu qemu page on launchpad https://launchpad.net/ubuntu/+source/qemu e.g. by clicking on "overview" in the top left corner of this question page

Then click on the triangle besides 1:6.2+dfsg-2ubuntu6.3 below the heading "The Jammy Jellyfish ..."

This opens the details for that version including the list of the builds as well as the original source (qemu_6.2+dfsg.orig.tar.xz) and the Debian/Ubuntu modifications (qemu_6.2+dfsg-2ubuntu6.3.debian.tar.xz)

Click on "amd64" to see the details of the build, including the buildlog.

"Is there a way to list the installed packages in the build environment":
This is shown in the build log. below the heading "Build environment".

I assume that the reason why vde support is not activated in the Ubuntu qemu package is the fact that qemu is in the "main" category, but vde2 is in the "universe" repository bucket. I am quite sure that this is on purpose.

The question why vde2 ist listed as suggested dependency cannot be answered by me. I just want to add that it is only a "suggests", not a "depends" or "recommends".

Revision history for this message
Robert Simmons (rsimmons0) said :
#15

> The question why vde2 ist listed as suggested dependency cannot be answered by me.

In this case, would you mind not setting this question to answered and leave it for someone with specific knowledge about the qemu package.

Why would both vde2 and qemu list each other as suggested dependencies if the support is not compiled in?

Should these two suggested packages be removed from the listing?

Revision history for this message
Robert Simmons (rsimmons0) said :
#16

Can you help with this problem?

Provide an answer of your own, or ask Robert Simmons for more information if necessary.

To post a message you must log in.