KVM test: setup tap fd and pass it to qemu-kvm v3
commit08561d8add2611675ffd7fe978186052197ce0b4
authorlmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4>
Mon, 6 Jun 2011 17:25:05 +0000 (6 17:25 +0000)
committerlmr <lmr@592f7852-d20e-0410-864c-8624ca9c26a4>
Mon, 6 Jun 2011 17:25:05 +0000 (6 17:25 +0000)
tree67e8adee77c396162796c24660b01c839d8bd069
parent2f4eb28c3f95fefc15bdcceda389d3b5bf114bd3
KVM test: setup tap fd and pass it to qemu-kvm v3

We used to use qemu-ifup to manage the tap which have several
limitations:

1) If we want to specify a bridge, we must create a customized
qemu-ifup file as the default script always match the first bridge.
2) It's hard to add support for macvtap device.

So this patch let kvm subtest control the tap creation and setup then
pass it to qemu-kvm. User could specify the bridge he want to used in
configuration file.

The original autoconfiguration was changed by private bridge setup.

Changes from v1:
* Combine the private bridge config and TAP fd in one patchset,
dropped the "auto" mode

Changes from v2:
* Close TAP fds on VM.destroy() (thanks to Amos Kong for finding
the problem, and for Cleber and Jason for actually fixing it).

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
git-svn-id: svn://test.kernel.org/autotest/trunk@5402 592f7852-d20e-0410-864c-8624ca9c26a4
client/tests/kvm/scripts/qemu-ifup [deleted file]
client/tests/kvm/scripts/qemu-ifup-ipv6 [deleted file]
client/virt/kvm_vm.py
client/virt/virt_utils.py