mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
net: Add a new convenience option "--nic" to configure default/on-board NICs
The legacy "-net" option can be quite confusing for the users since most people do not expect to get a "vlan" hub between their emulated guest hardware and the host backend. But so far, we are also not able to get rid of "-net" completely, since it is the only way to configure on-board NICs that can not be instantiated via "-device" yet. It's also a little bit shorter to type "-net nic -net tap" instead of "-device xyz,netdev=n1 -netdev tap,id=n1". So what we need is a new convenience option that is shorter to type than the full -device + -netdev stuff, and which can be used to configure the on-board NICs that can not be handled via -device yet. Thus this patch now provides such a new option "--nic": It adds an entry in the nd_table to configure a on-board / default NIC, creates a host backend and connects the two directly, without a confusing "vlan" hub inbetween. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
7cc28cb061
commit
78cd6f7bf6
4 changed files with 120 additions and 6 deletions
|
@ -197,6 +197,7 @@ extern QemuOptsList bdrv_runtime_opts;
|
|||
extern QemuOptsList qemu_chardev_opts;
|
||||
extern QemuOptsList qemu_device_opts;
|
||||
extern QemuOptsList qemu_netdev_opts;
|
||||
extern QemuOptsList qemu_nic_opts;
|
||||
extern QemuOptsList qemu_net_opts;
|
||||
extern QemuOptsList qemu_global_opts;
|
||||
extern QemuOptsList qemu_mon_opts;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue