Examples of attachDisk()


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

            disk.setPath(datastoreVolumePath);

            AttachAnswer answer = new AttachAnswer(disk);

            if (isAttach) {
                vmMo.attachDisk(new String[] { datastoreVolumePath }, morDs);
            }
            else {
                vmMo.removeAllSnapshots();
                vmMo.detachDisk(datastoreVolumePath, false);
View Full Code Here

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

                        throw new Exception("Failed to find the newly create or relocated VM. vmName: " + workerVMName);
                    }
                    workerVm = vmMo;
                    // attach volume to worker VM
                    String datastoreVolumePath = dsMo.getDatastorePath(volumePath + ".vmdk");
                    vmMo.attachDisk(new String[] { datastoreVolumePath }, morDs);
                } else {
                    s_logger.info("Using owner VM " + vmName + " for snapshot operation");
                    hasOwnerVm = true;
                }
View Full Code Here

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

                        }
                        workerVm = vmMo;

                        // attach volume to worker VM
                        String datastoreVolumePath = getVolumePathInDatastore(dsMo, volumePath + ".vmdk");
                        vmMo.attachDisk(new String[] { datastoreVolumePath }, morDs);
                    }
                }

                if (!vmMo.createSnapshot(snapshotUuid, "Snapshot taken for " + cmd.getSnapshotName(), false, false)) {
                    throw new Exception("Failed to take snapshot " + cmd.getSnapshotName() + " on vm: " + cmd.getVmName());
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.