Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw
private static final long SECONDS_PER_MINUTE = 60;
private static final int STARTUP_DELAY = 60000; // 60 seconds
private static final long DEFAULT_HOST_SCAN_INTERVAL = 600000; // every 10 minutes

private static final int DEFAULT_PORTS_PER_DV_PORT_GROUP_VSPHERE4_x = 256;
private static final int DEFAULT_PORTS_PER_DV_PORT_GROUP = 8;

private long _hostScanInterval = DEFAULT_HOST_SCAN_INTERVAL;
private int _timeout;

Expand Down Expand Up @@ -180,7 +184,7 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw
private StorageLayer _storage;
private final String _privateNetworkVSwitchName = "vSwitch0";

private int _portsPerDvPortGroup = 256;
private int _portsPerDvPortGroup = DEFAULT_PORTS_PER_DV_PORT_GROUP;
private boolean _fullCloneFlag;
private boolean _instanceNameFlag;
private String _serviceConsoleName;
Expand Down Expand Up @@ -267,8 +271,6 @@ public boolean configure(String name, Map<String, Object> params) throws Configu
_instanceNameFlag = Boolean.parseBoolean(value);
}

_portsPerDvPortGroup = NumbersUtil.parseInt(_configDao.getValue(Config.VmwarePortsPerDVPortGroup.key()), _portsPerDvPortGroup);

_serviceConsoleName = _configDao.getValue(Config.VmwareServiceConsole.key());
if (_serviceConsoleName == null) {
_serviceConsoleName = "Service Console";
Expand Down Expand Up @@ -387,8 +389,17 @@ private void prepareHost(HostMO hostMo, String privateTrafficLabel) throws Excep
HypervisorHostHelper.prepareNetwork(vSwitchName, "cloud.private", hostMo, vlanId, null, null, 180000, false, BroadcastDomainType.Vlan, null);
}
else {
int portsPerDvPortGroup = _portsPerDvPortGroup;
AboutInfo about = hostMo.getHostAboutInfo();
if (about != null) {
String version = about.getApiVersion();
if (version != null && (version.equals("4.0") || version.equals("4.1")) && _portsPerDvPortGroup < DEFAULT_PORTS_PER_DV_PORT_GROUP_VSPHERE4_x) {
portsPerDvPortGroup = DEFAULT_PORTS_PER_DV_PORT_GROUP_VSPHERE4_x;
}
}

HypervisorHostHelper.prepareNetwork(vSwitchName, "cloud.private", hostMo, vlanId, null, null, null, 180000,
vsType, _portsPerDvPortGroup, null, false, BroadcastDomainType.Vlan, null);
vsType, portsPerDvPortGroup, null, false, BroadcastDomainType.Vlan, null);
}
}

Expand Down
8 changes: 0 additions & 8 deletions server/src/com/cloud/configuration/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -1135,14 +1135,6 @@ public enum Config {
"false",
"Enable/Disable Nexus/Vmware dvSwitch in VMware environment",
null),
VmwarePortsPerDVPortGroup(
"Network",
ManagementServer.class,
Integer.class,
"vmware.ports.per.dvportgroup",
"256",
"Default number of ports per Vmware dvPortGroup in VMware environment",
null),
VmwareCreateFullClone(
"Advanced",
ManagementServer.class,
Expand Down
2 changes: 2 additions & 0 deletions setup/db/db/schema-4930to41000-cleanup.sql
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@

DELETE FROM `cloud`.`configuration` WHERE name='consoleproxy.loadscan.interval';

DELETE FROM `cloud`.`configuration` WHERE `name`='vmware.ports.per.dvportgroup';

DELETE FROM `cloud`.`host_details` where name = 'vmName' and value in (select name from `cloud`.`vm_instance` where state = 'Expunging' and hypervisor_type ='BareMetal');