diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java index 99c13301707..d3f2156f79d 100644 --- a/server/src/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/com/cloud/storage/StorageManagerImpl.java @@ -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; diff --git a/server/src/com/cloud/storage/listener/StoragePoolMonitor.java b/server/src/com/cloud/storage/listener/StoragePoolMonitor.java index b66ffe2a374..7017ed83c2a 100755 --- a/server/src/com/cloud/storage/listener/StoragePoolMonitor.java +++ b/server/src/com/cloud/storage/listener/StoragePoolMonitor.java @@ -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 pools = _poolDao.listBy(host.getDataCenterId(), host.getPodId(), host.getClusterId()); for (StoragePoolVO pool : pools) { Long hostId = host.getId(); diff --git a/setup/db/templates.vmware.sql b/setup/db/templates.vmware.sql index cc9ac751b5b..572e42107a9 100644 --- a/setup/db/templates.vmware.sql +++ b/setup/db/templates.vmware.sql @@ -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');