mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
add correct check sum to default vmware template records
Let StoragePoolMonitor be aware of vmware hypervisor
This commit is contained in:
parent
e3af2edc1d
commit
0682d70ce6
@ -1062,6 +1062,8 @@ public class StorageManagerImpl implements StorageManager {
|
||||
String hypervisoType = configDao.getValue("hypervisor.type");
|
||||
if (hypervisoType.equalsIgnoreCase("KVM")) {
|
||||
_hypervisorType = Hypervisor.Type.KVM;
|
||||
} else if(hypervisoType.equalsIgnoreCase("vmware")) {
|
||||
_hypervisorType = Hypervisor.Type.VmWare;
|
||||
}
|
||||
_agentMgr.registerForHostEvents(new StoragePoolMonitor(this, _hostDao, _storagePoolDao), true, false, true);
|
||||
|
||||
@ -1256,6 +1258,8 @@ public class StorageManagerImpl implements StorageManager {
|
||||
if (hypervisorType == null) {
|
||||
if (_hypervisorType == Hypervisor.Type.KVM) {
|
||||
hypervisorType = Hypervisor.Type.KVM;
|
||||
} else if(_hypervisorType == Hypervisor.Type.VmWare) {
|
||||
hypervisorType = Hypervisor.Type.VmWare;
|
||||
} else {
|
||||
s_logger.debug("Couldn't find a host to serve in the server pool");
|
||||
return null;
|
||||
|
||||
@ -70,7 +70,8 @@ public class StoragePoolMonitor implements Listener {
|
||||
public boolean processConnect(HostVO host, StartupCommand cmd) {
|
||||
if (cmd instanceof StartupRoutingCommand) {
|
||||
StartupRoutingCommand scCmd = (StartupRoutingCommand)cmd;
|
||||
if (scCmd.getHypervisorType() == Hypervisor.Type.XenServer || scCmd.getHypervisorType() == Hypervisor.Type.KVM) {
|
||||
if (scCmd.getHypervisorType() == Hypervisor.Type.XenServer || scCmd.getHypervisorType() == Hypervisor.Type.KVM ||
|
||||
scCmd.getHypervisorType() == Hypervisor.Type.VmWare) {
|
||||
List<StoragePoolVO> pools = _poolDao.listBy(host.getDataCenterId(), host.getPodId(), host.getClusterId());
|
||||
for (StoragePoolVO pool : pools) {
|
||||
Long hostId = host.getId();
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
INSERT INTO `cloud`.`vm_template` (id, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones)
|
||||
VALUES (1, 'routing', 'SystemVM Template', 0, now(), 'ext3', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/vmware/fedora11-x86.tar.bz2', '31cd7ce94fe68c973d5dc37c3349d02e', 0, 'SystemVM Template', 'VMDK', 47, 0, 1);
|
||||
VALUES (1, 'routing', 'SystemVM Template', 0, now(), 'ext3', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/vmware/fedora11-x86.tar.bz2', '7957ff05cae838689eb53c7600b2fbe4', 0, 'SystemVM Template', 'VMDK', 47, 0, 1);
|
||||
INSERT INTO `cloud`.`vm_template` (id, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones)
|
||||
VALUES (2, 'fedora11-x86', 'Fedora 11 x86', 1, now(), 'ext3', 0, 32, 1, 'http://nfs1.lab.vmops.com/templates/vmware/fedora11-x86.tar.bz2', 'b63d854a9560c013142567bbae8d98cf', 0, 'Fedora 11 x86', 'VMDK', 47, 1, 1);
|
||||
VALUES (2, 'fedora11-x86', 'Fedora 11 x86', 1, now(), 'ext3', 0, 32, 1, 'http://nfs1.lab.vmops.com/templates/vmware/fedora11-x86.tar.bz2', '7957ff05cae838689eb53c7600b2fbe4', 0, 'Fedora 11 x86', 'VMDK', 47, 1, 1);
|
||||
|
||||
INSERT INTO `cloud`.`guest_os_category` (id, name) VALUES (1, 'Windows');
|
||||
INSERT INTO `cloud`.`guest_os_category` (id, name) VALUES (2, 'Linux');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user