Package com.vmware.aurora.vc.DiskSpec

Examples of com.vmware.aurora.vc.DiskSpec.AllocationType


      systemDisk.setSize(systemDisk.getSize() + (memCapa + 1023) / 1024);

      systemDisk.setDiskType(DiskType.SYSTEM_DISK);
      systemDisk.setSeparable(false);
      disks.add(systemDisk);
      AllocationType diskAllocType = null;
      if (nodeGroup.getStorage().getAllocType() != null) {
         diskAllocType =
               AllocationType.valueOf(nodeGroup.getStorage().getAllocType());
      } else {
         // THICK as by default
         diskAllocType = AllocationType.THICK;
      }
      // swap disk
      int swapDisk =
            (((int) Math.ceil(nodeGroup.getMemCapacityMB()
                  * nodeGroup.getSwapRatio()) + 1023) / 1024);
      disks.add(new DiskSpec(DiskType.SWAP_DISK.getDiskName(), swapDisk, node
            .getVmName(), false, DiskType.SWAP_DISK,
            DiskScsiControllerType.LSI_CONTROLLER, null, diskAllocType
                  .toString(), null, null, null));

      // data disks
      if (!DatastoreType.TEMPFS.name().equalsIgnoreCase(
            nodeGroup.getStorage().getType())) {
         // no need to add data disk for storage type tempfs
         disks.add(new DiskSpec(DiskType.DATA_DISK.getDiskName(), nodeGroup
               .getStorage().getSizeGB(), node.getVmName(), true,
               DiskType.DATA_DISK, nodeGroup.getStorage().getControllerType(),
               nodeGroup.getStorage().getSplitPolicy(), diskAllocType
                     .toString(), null, null, null));
      }
      node.setDisks(disks);

      // target vm folder
View Full Code Here


                        + swapDisk.getDatastoreName());
                  logger.info("target ds to place swap disk: "
                        + targetDs.getName());
                  vcVm.detachVirtualDisk(
                        new DeviceId(swapDisk.getExternalAddress()), true);
                  AllocationType allocType =
                        swapDisk.getAllocType() == null ? null : AllocationType
                              .valueOf(swapDisk.getAllocType());
                  DiskCreateSpec[] addDisks =
                        { new DiskCreateSpec(new DeviceId(swapDisk
                              .getExternalAddress()), targetDs, swapDisk
View Full Code Here

TOP

Related Classes of com.vmware.aurora.vc.DiskSpec.AllocationType

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.