Feature #4988

Add option to specify NIC MODEL when (hot-)adding a NIC through CLI / API

Added by Stefan Kooman over 3 years ago. Updated about 3 years ago.

Status:PendingStart date:01/20/2017
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution: Pull request:

Description

onevm
...

nic-attach <vmid>
Attaches a NIC to a running VM. When using --file add only one
NIC instance.

States: RUNNING, POWEROFF
valid options: file, network, ip

There's currently no possibility to specify the NIC MODEL when adding a NIC through CLI / API. You can however specify this with Sunstone. Although you can configure a default NIC in vmm_exec_kvm.conf: NIC = [ model="virtio" ] (KVM) this setting is not used during (hot-) added NICs. Because the default MODEL on the hypervisor will be used (most often realtek) it's currently not possible to hot-add specific NIC. A partial workaround we have in place to set a default NIC MODEL is a small change in the driver (../one/remotes/vmm/kvm/attach_nic):

if [ "$THE_MODEL" = "-" ]; then
MODEL="<model type='virtio'/>" <- these lines were added
else <-|
MODEL="<model type='$THE_MODEL'/>"
fi

History

#1 Updated by Stefan Kooman about 3 years ago

This issue relates to #4821 and has been fixed in #4821. Fixed in commit 75dcfd601f1fcf5253d0a47be7cdfe0845d804db.

Also available in: Atom PDF