kvmtool: allow the TAP interface to be specified on the command line

In order to overcome the fact that a TAP interface can only be created
by root, allow the use of an interface that has already been created,
configured, made persistent and owned by a specific user/group (such
as done with tunctl).

In this case, any kind of configuration can be skipped (IP, up and
running mode), and the TAP is assumed to be ready for use.

This is done by introducing the "tapif" option, as used here:
	--network trans=mmio,mode=tap,tapif=blah

where "blah" is a TAP interface.

This allow the creation/configuration of the interface to be controlled
by root, and lkvm to be run as a normal user.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
Marc Zyngier
2014-04-24 18:10:06 +01:00
committed by Will Deacon
parent 3ad9fad44c
commit 1dfc7c243d
2 changed files with 15 additions and 7 deletions
+1
View File
@@ -10,6 +10,7 @@ struct virtio_net_params {
const char *host_ip;
const char *script;
const char *trans;
const char *tapif;
char guest_mac[6];
char host_mac[6];
struct kvm *kvm;