Package com.vmware.vim25

Examples of com.vmware.vim25.VMwareDVSConfigInfo


     */
    public boolean isChangedDisk(VmdkInfo vmdkInfo, String baseChangeId)
    {
        logger_.info("isChangedDisk start.");
       
        final VirtualMachine vm = vmm_.getVirtualMachine();
        final VirtualMachineSnapshot vmSnap = snapshot_;

        if (baseChangeId == null) {
            return false;
        }

        /* debug */
        vmdkInfo.print();
        logger_.info(baseChangeId);

        long offset = 0;
        DiskChangeInfo dci;
        try {
            dci = vm.queryChangedDiskAreas
                (vmSnap, vmdkInfo.key_, offset, baseChangeId);
        } catch (Exception e) {
            /*
              Candidates:
              com.vmware.vim25.FileFault,
View Full Code Here


    public VirtualMachineManager searchVmWithMoref(String vmMorefStr)
        throws Exception
    {
        if (conn_.isConnected() == false) { conn_.connect(); }
        /* generate VirtualMachine object from moref string */
        VirtualMachine vm = conn_.generateVirtualMachineWithMoref(vmMorefStr);
        if (vm == null) { throw new Exception("virtual machine is not found."); }
       
        return new VirtualMachineManager(conn_, vm);
    }
View Full Code Here

     * @return true in success, false in failure.
     */
    public boolean destroyVm(VirtualMachineManager vmm)
    {
        if (vmm == null ) { return false; }
        VirtualMachine vm = vmm.getVirtualMachine();
        if (vm == null) { return false; }
       
        try {
            Task task = vm.destroy_Task();
            String ret = task.waitForTask();
            if (ret.equals("success")) {
                logger_.info
                    (String.format
                     ("%s: virtual machine was destroyed successfully.\n", ret));
View Full Code Here

     * Get manager of current snapshot if exists.
     */
    public SnapshotManager getCurrentSnapshot()
    {
        try {
            VirtualMachineSnapshot vmSnap = vm_.getCurrentSnapShot();
            if (vmSnap != null) {
                return new SnapshotManager(conn_, vm_, vmSnap);
            } else {
                return null;
            }
View Full Code Here

    /**
     * Search virtual machine snapshot with a specified name.
     */
    public SnapshotManager searchSnapshotWithName(String snapName)
    {
        VirtualMachineSnapshot vmSnap = getSnapshotInTree(snapName);
        if (vmSnap != null) {
            return new SnapshotManager(conn_, vm_, vmSnap);
        } else {
            return null;
        }
View Full Code Here

    /**
     * Search snapshot with a moref. !!!Not implemented yet.!!!
     */
    public SnapshotManager searchSnapshotWithMoref(String snapMorefStr)
    {
        VirtualMachineSnapshot vmSnap =
            conn_.generateSnapshotWithMoref(snapMorefStr);
        if (vmSnap != null) {
            return new SnapshotManager(conn_, vm_, vmSnap);
        } else {
            return null;
View Full Code Here

            vm_.getSnapshot().getRootSnapshotList();
       
        if (snapTree != null) {
            ManagedObjectReference mor = findSnapshotInTree(snapTree, snapName);
            if (mor != null) {
                return new
                    VirtualMachineSnapshot(vm_.getServerConnection(), mor);
            }
        }
        return null;
    }
View Full Code Here

     */
    private boolean snapshotTaskDetail(TaskType type, String snapName,
                                       String messageInSuccess, String messageInFailure)
    {

        VirtualMachineSnapshot vmsnap = null;

        if (type != TaskType.CREATE) {
            vmsnap = getSnapshotInTree(snapName);
            if (vmsnap == null) { return false; }
        }

        try {
            Task task = null;
            switch (type) {
            case CREATE:
                task = vm_.createSnapshot_Task(snapName, null, false, false);
                break;
            case DELETE:
                task = vmsnap.removeSnapshot_Task(true);
                break;
            case REVERT:
                task = vmsnap.revertToSnapshot_Task(null, true);
                break;
            default:
                throw new Exception("Snapshot TaskType is wrong.");
            }
            assert task != null;
View Full Code Here

     */
    public VmdkBitmap getChangedBlocksOfDisk
        (VmdkInfo vmdkInfo, String baseChangeId)
    {
        final VirtualMachine vm = vmm_.getVirtualMachine();
        final VirtualMachineSnapshot vmSnap = snapshot_;

        if (baseChangeId == null) {
            baseChangeId = "*";
        }

View Full Code Here

    public boolean isChangedDisk(VmdkInfo vmdkInfo, String baseChangeId)
    {
        logger_.info("isChangedDisk start.");
       
        final VirtualMachine vm = vmm_.getVirtualMachine();
        final VirtualMachineSnapshot vmSnap = snapshot_;

        if (baseChangeId == null) {
            return false;
        }
View Full Code Here

TOP

Related Classes of com.vmware.vim25.VMwareDVSConfigInfo

Copyright © 2018 www.massapicom. 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.