summaryrefslogtreecommitdiff
path: root/kvm
diff options
context:
space:
mode:
authorDor Laor <dor.laor@qumranet.com>2007-12-31 00:18:25 +0200
committerAvi Kivity <avi@qumranet.com>2008-01-02 17:49:30 +0200
commitdfb1c5f33c6fbfd24b123dea762d5b0c67c450cb (patch)
tree6856cf6113bd00d2daca1753af718cddb6c27a26 /kvm
parent7520563c313e11b4c5cc7ab66e0cfe2a3a7982e8 (diff)
kvm: run script: add NIC type option
It allows picking other NICs than rtl8139. Use --nictype=xxx, the default is rtl8139. Signed-off-by: Dor Laor <dor.laor@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'kvm')
-rwxr-xr-xkvm8
1 files changed, 7 insertions, 1 deletions
diff --git a/kvm b/kvm
index 0374fbc1..2a7dc854 100755
--- a/kvm
+++ b/kvm
@@ -55,6 +55,12 @@ optparser.add_option('--no-tap',
default = not privileged,
)
+optparser.add_option('--nictype',
+ help = 'use this specific nic type (vendor)',
+ dest = 'nictype',
+ default = 'rtl8139',
+ )
+
optparser.add_option('--mac',
help = 'use this specific mac addr',
dest = 'mac',
@@ -239,7 +245,7 @@ if not options.notap:
mac_components[0] = 'a0'
mac = ':'.join(mac_components)
- qemu_args += ('-net', 'nic,macaddr=%s,model=rtl8139' % (mac,),
+ qemu_args += ('-net', 'nic,macaddr=%s,model=%s' % (mac,options.nictype,),
'-net', 'tap,script=/etc/kvm/qemu-ifup',)
if options.vnc: