Revision 760570a8 lib/hypervisor/hv_kvm.py
b/lib/hypervisor/hv_kvm.py | ||
---|---|---|
507 | 507 |
nic_model = "model=%s" % nic_type |
508 | 508 |
|
509 | 509 |
for nic_seq, nic in enumerate(kvm_nics): |
510 |
nic_val = "nic,macaddr=%s,%s" % (nic.mac, nic_model)
|
|
510 |
nic_val = "nic,vlan=%s,macaddr=%s,%s" % (nic_seq, nic.mac, nic_model)
|
|
511 | 511 |
script = self._WriteNetScript(instance, nic_seq, nic) |
512 | 512 |
kvm_cmd.extend(['-net', nic_val]) |
513 |
kvm_cmd.extend(['-net', 'tap,script=%s' % script])
|
|
513 |
kvm_cmd.extend(['-net', 'tap,vlan=%s,script=%s' % (nic_seq, script)])
|
|
514 | 514 |
temp_files.append(script) |
515 | 515 |
|
516 | 516 |
if incoming: |
Also available in: Unified diff