Examples of findVmOnHyperHost()


Examples of com.cloud.hypervisor.vmware.mo.VmwareHypervisorHost.findVmOnHyperHost()

                    s_logger.debug("There is already a VM snapshot task running, wait for it");
                    context.getVimClient().waitForTask(taskMor);
                }
            }

            vmMo = hyperHost.findVmOnHyperHost(vmName);
            if(vmMo == null) {
                vmMo = hyperHost.findVmOnPeerHyperHost(vmName);
            }
            if (vmMo == null) {
                String msg = "Unable to find VM for CreateVMSnapshotCommand";
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VmwareHypervisorHost.findVmOnHyperHost()

        Map<String, String> mapNewDisk = new HashMap<String, String>();
        String vmName = cmd.getVmName();
        String vmSnapshotName = cmd.getTarget().getSnapshotName();
        try {
            VmwareHypervisorHost hyperHost = hostService.getHyperHost(context, cmd);
            vmMo = hyperHost.findVmOnHyperHost(vmName);
            if(vmMo == null) {
                vmMo = hyperHost.findVmOnPeerHyperHost(vmName);
            }
            if (vmMo == null) {
                String msg = "Unable to find VM for DeleteVMSnapshotCommand";
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VmwareHypervisorHost.findVmOnHyperHost()

                    context.getVimClient().waitForTask(taskMor);
                }
            }

            HostMO hostMo = (HostMO) hyperHost;
            vmMo = hyperHost.findVmOnHyperHost(vmName);
            if(vmMo == null) {
                vmMo = hyperHost.findVmOnPeerHyperHost(vmName);
            }
            if (vmMo == null) {
                String msg = "Unable to find VM for RevertToVMSnapshotCommand";
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VmwareHypervisorHost.findVmOnHyperHost()

            s_logger.info("Executing resource AttachIsoCommand: " + _gson.toJson(cmd));
        }

        try {
            VmwareHypervisorHost hyperHost = getHyperHost(getServiceContext());
            VirtualMachineMO vmMo = hyperHost.findVmOnHyperHost(cmd.getVmName());
            if (vmMo == null) {
                String msg = "Unable to find VM in vSphere to execute AttachIsoCommand, vmName: " + cmd.getVmName();
                s_logger.error(msg);
                throw new Exception(msg);
            }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VmwareHypervisorHost.findVmOnHyperHost()

            VmwareContext context = getServiceContext();
            VmwareHypervisorHost hyperHost = getHyperHost(context);
            assert(hyperHost instanceof HostMO);
            VmwareManager mgr = context.getStockObject(VmwareManager.CONTEXT_STOCK_NAME);

            VirtualMachineMO vmMo = hyperHost.findVmOnHyperHost(cmd.getName());
            if (vmMo == null) {
                if (s_logger.isDebugEnabled()) {
                    s_logger.debug("Unable to find the owner VM for GetVncPortCommand on host " + hyperHost.getHyperHostName() + ", try within datacenter");
                }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VmwareHypervisorHost.findVmOnHyperHost()

        }

        VmwareContext context = getServiceContext();
        VmwareHypervisorHost hyperHost = getHyperHost(context);
        try {
            VirtualMachineMO vmMo = hyperHost.findVmOnHyperHost(cmd.getVmName());
            if (vmMo != null) {
                try {
                    context.getService().unregisterVM(vmMo.getMor());
                    return new Answer(cmd, true, "unregister succeeded");
                } catch(Exception e) {
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VmwareHypervisorHost.findVmOnHyperHost()

                    if (!vmNames.contains(name)) {
                        continue;
                    }

                    ManagedObjectReference vmMor = hyperHost.findVmOnHyperHost(name).getMor();
                    assert(vmMor!=null);

                    ArrayList vmNetworkMetrics = new ArrayList();
                    // get all the metrics from the available sample period
                    List<PerfMetricId> perfMetrics = service.queryAvailablePerfMetric(perfMgr, vmMor, null, null, null);
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VmwareHypervisorHost.findVmOnHyperHost()

        VmwareContext context = hostService.getServiceContext(cmd);
        try {
            VmwareHypervisorHost hyperHost = hostService.getHyperHost(context, cmd);

            VirtualMachineMO vmMo = hyperHost.findVmOnHyperHost(volume.getVmName());
            if (vmMo == null) {
                if(s_logger.isDebugEnabled()) {
                    s_logger.debug("Unable to find the owner VM for CreatePrivateTemplateFromVolumeCommand on host " + hyperHost.getHyperHostName() + ", try within datacenter");
                }
                vmMo = hyperHost.findVmOnPeerHyperHost(volume.getVmName());
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VmwareHypervisorHost.findVmOnHyperHost()

            CopyCmdAnswer answer = null;
           
            try {
                if (vmName != null) {
                    vmMo = hyperHost.findVmOnHyperHost(vmName);
                }
                if (vmMo == null) {
                    if(s_logger.isDebugEnabled()) {
                        s_logger.debug("Unable to find owner VM for BackupSnapshotCommand on host " + hyperHost.getHyperHostName() + ", will try within datacenter");
                    }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VmwareHypervisorHost.findVmOnHyperHost()

        VolumeObjectTO volumeTO = (VolumeObjectTO)disk.getData();
        PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO)volumeTO.getDataStore();
        try {
            VmwareHypervisorHost hyperHost = hostService.getHyperHost(hostService.getServiceContext(null), null);
            VirtualMachineMO vmMo = hyperHost.findVmOnHyperHost(vmName);
            if (vmMo == null) {
                String msg = "Unable to find the VM to execute AttachVolumeCommand, vmName: " + vmName;
                s_logger.error(msg);
                throw new Exception(msg);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.