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 <>
Reviewed-by: default avatarGuido Trotter <>
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarIustin Pop <>
parent b4478d34
......@@ -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)])
if incoming:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment