mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 11384: deprecate vmware.guest.nic.device.type global configuration variable
This commit is contained in:
parent
9736c1e3b1
commit
aa7f06d7eb
@ -45,7 +45,6 @@ public interface VmwareManager {
|
|||||||
void gcLeftOverVMs(VmwareContext context);
|
void gcLeftOverVMs(VmwareContext context);
|
||||||
|
|
||||||
Pair<Integer, Integer> getAddiionalVncPortRange();
|
Pair<Integer, Integer> getAddiionalVncPortRange();
|
||||||
VirtualEthernetCardType getGuestNicDeviceType();
|
|
||||||
|
|
||||||
int getMaxHostsPerCluster();
|
int getMaxHostsPerCluster();
|
||||||
|
|
||||||
|
|||||||
@ -226,7 +226,7 @@ public enum Config {
|
|||||||
VmwareManagementPortGroup("Advanced", ManagementServer.class, String.class, "vmware.management.portgroup", "Management Network", "Specify the management network name(for ESXi hosts)", null),
|
VmwareManagementPortGroup("Advanced", ManagementServer.class, String.class, "vmware.management.portgroup", "Management Network", "Specify the management network name(for ESXi hosts)", null),
|
||||||
VmwareAdditionalVncPortRangeStart("Advanced", ManagementServer.class, Integer.class, "vmware.additional.vnc.portrange.start", "59000", "Start port number of additional VNC port range", null),
|
VmwareAdditionalVncPortRangeStart("Advanced", ManagementServer.class, Integer.class, "vmware.additional.vnc.portrange.start", "59000", "Start port number of additional VNC port range", null),
|
||||||
VmwareAdditionalVncPortRangeSize("Advanced", ManagementServer.class, Integer.class, "vmware.additional.vnc.portrange.size", "1000", "Start port number of additional VNC port range", null),
|
VmwareAdditionalVncPortRangeSize("Advanced", ManagementServer.class, Integer.class, "vmware.additional.vnc.portrange.size", "1000", "Start port number of additional VNC port range", null),
|
||||||
VmwareGuestNicDeviceType("Advanced", ManagementServer.class, String.class, "vmware.guest.nic.device.type", "E1000", "Ethernet card type used in guest VM, valid values are E1000, PCNet32, Vmxnet2, Vmxnet3", null),
|
//VmwareGuestNicDeviceType("Advanced", ManagementServer.class, String.class, "vmware.guest.nic.device.type", "E1000", "Ethernet card type used in guest VM, valid values are E1000, PCNet32, Vmxnet2, Vmxnet3", null),
|
||||||
VmwarePerClusterHostMax("Advanced", ManagementServer.class, Integer.class, "vmware.percluster.host.max", "8", "maxmium hosts per vCenter cluster(do not let it grow over 8)", "1-8"),
|
VmwarePerClusterHostMax("Advanced", ManagementServer.class, Integer.class, "vmware.percluster.host.max", "8", "maxmium hosts per vCenter cluster(do not let it grow over 8)", "1-8"),
|
||||||
VmwareReserveCpu("Advanced", ManagementServer.class, Boolean.class, "vmware.reserve.cpu", "false", "Specify whether or not to reserve CPU based on CPU overprovisioning factor", null),
|
VmwareReserveCpu("Advanced", ManagementServer.class, Boolean.class, "vmware.reserve.cpu", "false", "Specify whether or not to reserve CPU based on CPU overprovisioning factor", null),
|
||||||
VmwareReserveMem("Advanced", ManagementServer.class, Boolean.class, "vmware.reserve.mem", "false", "Specify whether or not to reserve memory based on memory overprovisioning factor", null),
|
VmwareReserveMem("Advanced", ManagementServer.class, Boolean.class, "vmware.reserve.mem", "false", "Specify whether or not to reserve memory based on memory overprovisioning factor", null),
|
||||||
|
|||||||
@ -112,7 +112,6 @@ public class VmwareManagerImpl implements VmwareManager, VmwareStorageMount, Lis
|
|||||||
String _managemetPortGroupName;
|
String _managemetPortGroupName;
|
||||||
int _additionalPortRangeStart;
|
int _additionalPortRangeStart;
|
||||||
int _additionalPortRangeSize;
|
int _additionalPortRangeSize;
|
||||||
VirtualEthernetCardType _guestNicDeviceType;
|
|
||||||
int _maxHostsPerCluster;
|
int _maxHostsPerCluster;
|
||||||
|
|
||||||
String _cpuOverprovisioningFactor = "1";
|
String _cpuOverprovisioningFactor = "1";
|
||||||
@ -245,18 +244,6 @@ public class VmwareManagerImpl implements VmwareManager, VmwareStorageMount, Lis
|
|||||||
|
|
||||||
s_logger.info("Additional VNC port allocation range is settled at " + _additionalPortRangeStart + " to " + (_additionalPortRangeStart + _additionalPortRangeSize));
|
s_logger.info("Additional VNC port allocation range is settled at " + _additionalPortRangeStart + " to " + (_additionalPortRangeStart + _additionalPortRangeSize));
|
||||||
|
|
||||||
value = configDao.getValue(Config.VmwareGuestNicDeviceType.key());
|
|
||||||
if(value == null || "E1000".equalsIgnoreCase(value))
|
|
||||||
this._guestNicDeviceType = VirtualEthernetCardType.E1000;
|
|
||||||
else if("PCNet32".equalsIgnoreCase(value))
|
|
||||||
this._guestNicDeviceType = VirtualEthernetCardType.PCNet32;
|
|
||||||
else if("Vmxnet2".equalsIgnoreCase(value))
|
|
||||||
this._guestNicDeviceType = VirtualEthernetCardType.Vmxnet2;
|
|
||||||
else if("Vmxnet3".equalsIgnoreCase(value))
|
|
||||||
this._guestNicDeviceType = VirtualEthernetCardType.Vmxnet3;
|
|
||||||
else
|
|
||||||
this._guestNicDeviceType = VirtualEthernetCardType.E1000;
|
|
||||||
|
|
||||||
value = configDao.getValue("vmware.host.scan.interval");
|
value = configDao.getValue("vmware.host.scan.interval");
|
||||||
_hostScanInterval = NumbersUtil.parseLong(value, DEFAULT_HOST_SCAN_INTERVAL);
|
_hostScanInterval = NumbersUtil.parseLong(value, DEFAULT_HOST_SCAN_INTERVAL);
|
||||||
s_logger.info("VmwareManagerImpl config - vmware.host.scan.interval: " + _hostScanInterval);
|
s_logger.info("VmwareManagerImpl config - vmware.host.scan.interval: " + _hostScanInterval);
|
||||||
@ -832,11 +819,6 @@ public class VmwareManagerImpl implements VmwareManager, VmwareStorageMount, Lis
|
|||||||
return new Pair<Integer, Integer>(_additionalPortRangeStart, _additionalPortRangeSize);
|
return new Pair<Integer, Integer>(_additionalPortRangeStart, _additionalPortRangeSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public VirtualEthernetCardType getGuestNicDeviceType() {
|
|
||||||
return this._guestNicDeviceType;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMaxHostsPerCluster() {
|
public int getMaxHostsPerCluster() {
|
||||||
return this._maxHostsPerCluster;
|
return this._maxHostsPerCluster;
|
||||||
|
|||||||
@ -10,3 +10,5 @@ INSERT IGNORE INTO configuration VALUES ('Advanced', 'DEFAULT', 'management-serv
|
|||||||
|
|
||||||
ALTER IGNORE TABLE `cloud`.`user_vm_details` DROP FOREIGN KEY `fk_user_vm_details__vm_id`;
|
ALTER IGNORE TABLE `cloud`.`user_vm_details` DROP FOREIGN KEY `fk_user_vm_details__vm_id`;
|
||||||
ALTER TABLE `cloud`.`user_vm_details` ADD CONSTRAINT `fk_user_vm_details__vm_id` FOREIGN KEY `fk_user_vm_details__vm_id`(`vm_id`) REFERENCES `vm_instance`(`id`) ON DELETE CASCADE;
|
ALTER TABLE `cloud`.`user_vm_details` ADD CONSTRAINT `fk_user_vm_details__vm_id` FOREIGN KEY `fk_user_vm_details__vm_id`(`vm_id`) REFERENCES `vm_instance`(`id`) ON DELETE CASCADE;
|
||||||
|
|
||||||
|
DELETE FROM `cloud`.`configuration` where name='vmware.guest.nic.device.type';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user