Skip to content

Commit 0b34971

Browse files
authored
Once again allow a VM to be on multiple networks from VPCs (#3754)
to once again allow a VM to be on multiple networks from VPCs
1 parent 5afff61 commit 0b34971

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

server/src/main/java/com/cloud/vm/UserVmManagerImpl.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3613,7 +3613,6 @@ private UserVm createVirtualMachine(DataCenter zone, ServiceOffering serviceOffe
36133613

36143614
short defaultNetworkNumber = 0;
36153615
boolean securityGroupEnabled = false;
3616-
boolean vpcNetwork = false;
36173616
for (NetworkVO network : networkList) {
36183617
if ((network.getDataCenterId() != zone.getId())) {
36193618
if (!network.isStrechedL2Network()) {
@@ -3684,14 +3683,6 @@ private UserVm createVirtualMachine(DataCenter zone, ServiceOffering serviceOffe
36843683
securityGroupEnabled = true;
36853684
}
36863685

3687-
// vm can't be a part of more than 1 VPC network
3688-
if (network.getVpcId() != null) {
3689-
if (vpcNetwork) {
3690-
throw new InvalidParameterValueException("Vm can't be a part of more than 1 VPC network");
3691-
}
3692-
vpcNetwork = true;
3693-
}
3694-
36953686
networkNicMap.put(network.getUuid(), profile);
36963687
}
36973688

0 commit comments

Comments
 (0)