Package com.vmware.vim.binding.vim.vm

Examples of com.vmware.vim.binding.vim.vm.FaultToleranceConfigInfo


   }

   public static void destroyVm(final String vmId) throws Exception {
      VcVirtualMachine vm = VcCache.getIgnoreMissing(vmId);

      FaultToleranceConfigInfo info = vm.getConfig().getFtInfo();
      if (info != null && info.getRole() == 1) {
         logger.info("VM " + vm.getName()
               + " is FT primary VM, disable FT before delete it.");
         vm.turnOffFT();
      }
      // try guest shut down first, wait for 3 minutes, power it off after time out
View Full Code Here


   }

   private VcTask toggleFT(final boolean enable, final IVcTaskCallback callback) throws Exception {
      ManagedObjectReference secondaryVMRef = null;
      VirtualMachine vm = getManagedObject();
      FaultToleranceConfigInfo ftConfigInfo = vm.getConfig().getFtInfo();
      if (ftConfigInfo instanceof FaultTolerancePrimaryConfigInfo) {
         FaultTolerancePrimaryConfigInfo primaryFtConfigInfo = (FaultTolerancePrimaryConfigInfo)ftConfigInfo;
         AuAssert.check(primaryFtConfigInfo.getSecondaries().length == 1);
         secondaryVMRef = primaryFtConfigInfo.getSecondaries()[0];
      } else {
View Full Code Here

      VcContext.inVcSessionDo(new VcSession<Void>() {
         @Override
         protected Void body() throws Exception {
            try {
               FaultToleranceConfigInfo info = vcVm.getConfig().getFtInfo();
               if (info != null && info.getRole() == 1) {
                  logger.info("VM " + vcVm.getName()
                        + " is FT primary VM, disable FT before delete it.");
                  vcVm.turnOffFT();
               }
               if (vcVm.isPoweredOn()) {
View Full Code Here

TOP

Related Classes of com.vmware.vim.binding.vim.vm.FaultToleranceConfigInfo

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.