Skip to content
Snippets Groups Projects
Commit 760570a8 authored by Timothy Kuhlman's avatar Timothy Kuhlman Committed by Guido Trotter
Browse files

KVM: Fix unintended qemu-level bridging of nics


Each nic should be connected to its own qemu vlan, to avoid them all
bridging together.

Signed-off-by: default avatarTimothy Kuhlman <timkuhlman@gmail.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent b4478d34
No related branches found
No related tags found
No related merge requests found
......@@ -507,10 +507,10 @@ class KVMHypervisor(hv_base.BaseHypervisor):
nic_model = "model=%s" % nic_type
for nic_seq, nic in enumerate(kvm_nics):
nic_val = "nic,macaddr=%s,%s" % (nic.mac, nic_model)
nic_val = "nic,vlan=%s,macaddr=%s,%s" % (nic_seq, nic.mac, nic_model)
script = self._WriteNetScript(instance, nic_seq, nic)
kvm_cmd.extend(['-net', nic_val])
kvm_cmd.extend(['-net', 'tap,script=%s' % script])
kvm_cmd.extend(['-net', 'tap,vlan=%s,script=%s' % (nic_seq, script)])
temp_files.append(script)
if incoming:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment