mirror of https://github.com/apache/cloudstack.git
bug 7080: fix usage for kvm;Reviewed-by: kishan
This commit is contained in:
parent
c76349ffe1
commit
0b4c0e3e46
|
|
@ -1185,10 +1185,13 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
|
|||
if (!vlanAllocatedToVM.containsKey(ip.getVlanId())) {
|
||||
/*plug a vif into router*/
|
||||
VifHotPlug(conn, routerName, ip.getVlanId(), ip.getVifMacAddress());
|
||||
vlanAllocatedToVM.put(ip.getVlanId(), nicPos++);
|
||||
vlanAllocatedToVM.put(ip.getVlanId(), nicPos);
|
||||
|
||||
networkUsage(routerIp, "addVif", "eth" + nicPos);
|
||||
nicPos++;
|
||||
}
|
||||
nicNum = vlanAllocatedToVM.get(ip.getVlanId());
|
||||
networkUsage(routerIp, "addVif", "eth" + nicNum);
|
||||
|
||||
result = _virtRouterResource.assignPublicIpAddress(routerName, routerIp, ip.getPublicIp(), ip.isAdd(),
|
||||
ip.isFirstIP(), ip.isSourceNat(),
|
||||
ip.getVlanId(), ip.getVlanGateway(), ip.getVlanNetmask(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue