Examples of VirtualDiskManager


Examples of com.cybozu.vmbkp.soap.VirtualDiskManager

            assert type != AdapterType.UNKNOWN;
            int ckey = profGen.getControllerDeviceKey(diskId);
            int busNumber = profGen.getBusNumber(ckey);

            /* Create virtual disk manager and virtual controller manager. */
            VirtualDiskManager vdm = new VirtualDiskManager
                (key, unitNumber, capacityInKb, datastoreName);
            VirtualControllerManager vcm =
                new VirtualControllerManager(type, ckey, busNumber);

            /* Get the corresponding virtual controller manager
View Full Code Here

Examples of com.vmware.vim.binding.vim.VirtualDiskManager

         final VcDatacenter dstDc, final VirtualDiskSpec diskSpec,
         final IVcTaskCallback callback) throws Exception {
      VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
         @Override
         public VcTask body() throws Exception {
            final VirtualDiskManager mgr = VcContext.getService().getVirtualDiskManager();
            return new VcTask(TaskType.CopyVmdk,
               mgr.copyVirtualDisk(srcDsPath, srcDc.getMoRef(),
                                   dstDsPath, dstDc.getMoRef(), diskSpec, true),
               callback);
         }
      });
      return task;
View Full Code Here

Examples of com.vmware.vim.binding.vim.VirtualDiskManager

         final VcDatacenter dstDc,
         final IVcTaskCallback callback) throws Exception {
      VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
         @Override
         public VcTask body() throws Exception {
            final VirtualDiskManager mgr = VcContext.getService().getVirtualDiskManager();
            return new VcTask(TaskType.CopyVmdk,
               mgr.moveVirtualDisk(srcDsPath, srcDc.getMoRef(),
                                   dstDsPath, dstDc.getMoRef(), true),
               callback);
         }
      });
      return task;
View Full Code Here

Examples of com.vmware.vim.binding.vim.VirtualDiskManager

         final VcDatacenter dc, final IVcTaskCallback callback)
         throws Exception {
      VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
         @Override
         public VcTask body() throws Exception {
            VirtualDiskManager mgr = VcContext.getService().getVirtualDiskManager();
            return new VcTask(TaskType.DeleteVmdk, mgr.deleteVirtualDisk(
                  dsPath, dc.getMoRef()), callback);
         }
      });
      return task;
   }
View Full Code Here

Examples of com.vmware.vim.binding.vim.VirtualDiskManager

    * @return UUID of the disk
    * @throws Exception
    */
   public static String queryVirtualDiskUuid(final String dsPath,
         final VcDatacenter dc) throws Exception {
      final VirtualDiskManager mgr =
            VcContext.getService().getVirtualDiskManager();
      return mgr.queryVirtualDiskUuid(dsPath, dc.getMoRef());
   }
View Full Code Here

Examples of com.vmware.vim25.mo.VirtualDiskManager

    }

    ServiceInstance si = new ServiceInstance(
      new URL(args[0]), args[1], args[2], true);
   
    VirtualDiskManager vdMgr = si.getVirtualDiskManager();
    if(vdMgr==null)
    {
      System.out.println("VirtualDiskManager not available.");
      si.getServerConnection().logout();
      return;
    }
   
    String vmdkPath =
      "[storage1 (2)] sdk188_sec/sdk188_sec.vmdk";

    int fragPerfent = vdMgr.queryVirtualDiskFragmentation(
        vmdkPath, null);
    System.out.println("Defragmentation:" + fragPerfent + "%");
   
    String uuid = vdMgr.queryVirtualDiskUuid(vmdkPath, null);
    System.out.println("Disk UUID:" + uuid);
   
    HostDiskDimensionsChs hddc = vdMgr.queryVirtualDiskGeometry(
        vmdkPath, null);
    System.out.println("Cylinder:" + hddc.getCylinder());
    System.out.println("Head:" + hddc.getHead());
    System.out.println("Sector:" + hddc.getSector());
   
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.