Skip to content
Snippets Groups Projects
Commit 4b784cf8 authored by Miguel Di Ciurcio Filho's avatar Miguel Di Ciurcio Filho Committed by Guido Trotter
Browse files

kvm: Improve network syntax and tests


The current syntax when defining a NIC uses a pair of arguments, like this:

-net tap,vlan=0 -net nic,vlan=0,model=virtio

When using this pair, internally KVM will create a VLANState structure to send
ethernet frames between the guest NIC and the host tap device. This is
suboptimal and is going to be removed in the future. Plus, this combination
breaks vhost-net support.

The new syntax does not need the vlan craziness anymore, creating a direct 1:1
relationship between the backend device and the frontend device.

-netdev tap,id=netdev0 -device virtio-net-pci,mac=52:54:00:56:6c:55,netdev=netdev0

The current code does not verify if vhost_net is available before starting an
instance. All this tests are done verifying the KVM version installed on the
node.

Signed-off-by: default avatarMiguel Di Ciurcio Filho <miguel.filho@gmail.com>
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 3f2eba25
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment