This is not so much a feature request as an fix I have implemented in the code that we are running.
from line 2860
Code: Select all
case 'vmxvfp':
$bridgeid = 0;
$this -> flags_eth .= ' -device i82801b11-bridge,id=dmi-pci-bridge ';
for ($i = 0; $i < $this -> ethernet; $i++) {
if (isset($old_ethernets[$i])) {
// Previous interface found, copy from old one
$this -> ethernets[$i] = $old_ethernets[$i];
} else {
if ($i == 0) {
$n = 'em0 / fxp0'; // Interface name
} else if ($i == 1) {
$n = 'em1 / int'; // Interface name
} else {
$n = 'em'.$i.' / ge-0/0/'.($i - 2);
}
try {
$this -> ethernets[$i] = new Interfc(Array('name' => $n, 'type' => 'ethernet'), $i);
} catch (Exception $e) {
error_log(date('M d H:i:s ').'ERROR: '.$GLOBALS['messages'][40020]);
error_log(date('M d H:i:s ').(string) $e);
return 40020;
}
}
if ($i % 10 == 0) {
$bridgeid++;
$addr = 1;
$this -> flags_eth .= ' -device pci-bridge,id=bridge-'.$bridgeid.',chassis_nr='.$bridgeid.',bus=dmi-pci-bridge ';
} else {
$addr++;
}
// Setting CMD flags (virtual device and map to TAP device)
$this -> flags_eth .= ' -device %NICDRIVER%,netdev=net'.$i.',bus=bridge-'.$bridgeid.',addr=0x'.$addr.'.0,mac=50:'.sprintf('%02x', $this -> tenant).':'.sprintf('%02x', $this -> id / 512).':'.sprintf('%02x', $this -> id % 512).':00:'.sprintf('%02x', $i);
$this -> flags_eth .= ' -netdev tap,id=net'.$i.',ifname=vunl'.$this -> tenant.'_'.$this -> id.'_'.$i.',script=no';
}
break;