Examples of detachAllDisks()


Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.detachAllDisks()

            if (clonedVm == null) {
                throw new Exception("Unable to create container VM for volume creation");
            }

            clonedVm.moveAllVmDiskFiles(primaryDsMo, "", false);
            clonedVm.detachAllDisks();
        } finally {
            if (clonedVm != null) {
                clonedVm.detachAllDisks();
                clonedVm.destroy();
            }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.detachAllDisks()

            clonedVm.moveAllVmDiskFiles(primaryDsMo, "", false);
            clonedVm.detachAllDisks();
        } finally {
            if (clonedVm != null) {
                clonedVm.detachAllDisks();
                clonedVm.destroy();
            }
        }
    }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.detachAllDisks()

            }

            clonedVm.exportVm(exportPath, exportName, false, false)//Note: volss: not to create ova.
        } finally {
            if (clonedVm != null) {
                clonedVm.detachAllDisks();
                clonedVm.destroy();
            }
        }
    }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.detachAllDisks()

            postCreatePrivateTemplate(installFullPath, templateId, templateUniqueName, physicalSize, virtualSize);
            return new Ternary<String, Long, Long>(installPath + "/" + templateUniqueName + ".ova", physicalSize, virtualSize);

        } finally {
            if(clonedVm != null) {
                clonedVm.detachAllDisks();
                clonedVm.destroy();
            }

            vmMo.removeSnapshot(templateUniqueName, false);
        }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.detachAllDisks()

            clonedVm.exportVm(exportPath, exportName, false, false);
            return new Pair<String, String[]>(volumeDeviceInfo.second(), disks);
        } finally {
            if(clonedVm != null) {
                clonedVm.detachAllDisks();
                clonedVm.destroy();
            }
        }
    }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.detachAllDisks()

                newVol.setSize(volume.getSize());
                return new CreateObjectAnswer(newVol);
            } finally {
                s_logger.info("Destroy dummy VM after volume creation");
                if(vmMo != null) {
                    vmMo.detachAllDisks();
                    vmMo.destroy();
                }
            }
        } catch (Throwable e) {
            if (e instanceof RemoteException) {
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.detachAllDisks()

            if(clonedVm == null) {
                throw new Exception("Unable to create container VM for volume creation");
            }

            clonedVm.moveAllVmDiskFiles(primaryDsMo, "", false);
            clonedVm.detachAllDisks();
            return _storage.getSize(srcOVFFileName);
        } finally {
            if(clonedVm != null) {
                clonedVm.detachAllDisks();
                clonedVm.destroy();
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.detachAllDisks()

            clonedVm.moveAllVmDiskFiles(primaryDsMo, "", false);
            clonedVm.detachAllDisks();
            return _storage.getSize(srcOVFFileName);
        } finally {
            if(clonedVm != null) {
                clonedVm.detachAllDisks();
                clonedVm.destroy();
            }
        }
    }
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.detachAllDisks()

                        VmwareStorageLayoutHelper.deleteVolumeVmdkFiles(dsMo, vmdkName, dcMo);
                        vmMo.createDisk(volumeDatastorePath, (int) (volume.getSize() / (1024L * 1024L)), morDatastore, -1);
                        vmMo.detachDisk(volumeDatastorePath, false);
                    }
                } finally {
                    vmMo.detachAllDisks();

                    s_logger.info("Destroy dummy VM after volume creation");
                    vmMo.destroy();
                }
            } else {
View Full Code Here

Examples of com.cloud.hypervisor.vmware.mo.VirtualMachineMO.detachAllDisks()

                        vmMo.detachDisk(volumeDatastorePath, false);

                        VolumeTO vol = new VolumeTO(cmd.getVolumeId(), dskch.getType(), pool.getType(), pool.getUuid(), dskch.getName(), pool.getPath(), vmdkName, dskch.getSize(), null);
                        return new CreateAnswer(cmd, vol);
                    } finally {
                        vmMo.detachAllDisks();

                        s_logger.info("Destroy dummy VM after volume creation");
                        vmMo.destroy();
                    }
                } else {
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.