Package com.vmware.aurora.vc

Examples of com.vmware.aurora.vc.VcVirtualMachine.destroy()


      try {
         /*
          * Always clean up VMs from previous runs.
          */
         if ((vm = dc.getVirtualMachine(vmName)) != null) {
            vm.destroy();
         }
         if ((vm1 = dc.getVirtualMachine(vm1Name)) != null) {
            vm1.destroy();
         }
         /*
 
View Full Code Here


         vm1.powerOff();

         /*
          * Clean up.
          */
         vm.destroy();
         vm1.destroy();
      } catch (Exception e) {
         System.out.println(e);
         if (vm != null) {
            vm.destroy();
View Full Code Here

         vm.destroy();
         vm1.destroy();
      } catch (Exception e) {
         System.out.println(e);
         if (vm != null) {
            vm.destroy();
         }
         if (vm1 != null) {
            vm1.destroy();
         }
         throw e;
View Full Code Here

            }

            @Override
            protected Void body() throws Exception {
               VcVirtualMachine vm = VcCache.get(vmId);
               vm.destroy();
               return null;
            }
         });
         return null;
      }
View Full Code Here

      /*
       * TRICK: destroy vm with unaccessible disks will throw exceptions, ignore
       * it and destroy it again.
       */
      try {
         vm.destroy(false);
      } catch (Exception e) {
         logger.warn("failed to delete vm " + vm.getName() + " as "
               + e.getMessage());
         logger.info("try to unregister it again");
         vm.unregister();
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.