com.vmware.vim25.mo.samples.vm.CloneVM.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vijava Show documentation
Show all versions of vijava Show documentation
Java API for accessing VMWare web services API
The newest version!
???? 2 ? &com/vmware/vim25/mo/samples/vm/CloneVM java/lang/Object ()V Code
LineNumberTable LocalVariableTable this (Lcom/vmware/vim25/mo/samples/vm/CloneVM; main ([Ljava/lang/String;)V
Exceptions java/lang/Exception java/lang/System out Ljava/io/PrintStream; DUsage: java CloneVM
java/io/PrintStream println (Ljava/lang/String;)V
" # $ exit (I)V & #com/vmware/vim25/mo/ServiceInstance ( java/net/URL
' *
% , - 6(Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;Z)V
% / 0 1
getRootFolder ()Lcom/vmware/vim25/mo/Folder; 3 &com/vmware/vim25/mo/InventoryNavigator
2 5 6 &(Lcom/vmware/vim25/mo/ManagedEntity;)V 8 VirtualMachine
2 : ; < searchManagedEntity I(Ljava/lang/String;Ljava/lang/String;)Lcom/vmware/vim25/mo/ManagedEntity; > "com/vmware/vim25/mo/VirtualMachine @ java/lang/StringBuilder B No VM
? *
? E F G append -(Ljava/lang/String;)Ljava/lang/StringBuilder; I found
? K L M toString ()Ljava/lang/String;
% O P Q getServerConnection (()Lcom/vmware/vim25/mo/ServerConnection;
S U T $com/vmware/vim25/mo/ServerConnection V logout X (com/vmware/vim25/VirtualMachineCloneSpec
W [ +com/vmware/vim25/VirtualMachineRelocateSpec
Z
W ^ _ ` setLocation 0(Lcom/vmware/vim25/VirtualMachineRelocateSpec;)V
W b c d
setPowerOn (Z)V
W f g d setTemplate
= i j k getParent %()Lcom/vmware/vim25/mo/ManagedEntity; m com/vmware/vim25/mo/Folder
= o p q cloneVM_Task t(Lcom/vmware/vim25/mo/Folder;Ljava/lang/String;Lcom/vmware/vim25/VirtualMachineCloneSpec;)Lcom/vmware/vim25/mo/Task; s ,Launching the VM clone task. Please wait ...
u w v com/vmware/vim25/mo/Task x M waitForMe z success | VM got cloned successfully. ~ Failure -: VM cannot be cloned args [Ljava/lang/String; vmname Ljava/lang/String; cloneName si %Lcom/vmware/vim25/mo/ServiceInstance;
rootFolder Lcom/vmware/vim25/mo/Folder; vm $Lcom/vmware/vim25/mo/VirtualMachine; cloneSpec *Lcom/vmware/vim25/VirtualMachineCloneSpec; task Lcom/vmware/vim25/mo/Task; status
StackMapTable ? ? java/lang/String
SourceFile CloneVM.java ! / *? ?
/
? ?*?? ? ? ? !*2L*2M? %Y? 'Y*2? )*2*2? +N-? .:? 2Y? 47+? 9? =:? &? ? ?YA? C+? DH? D? J? -? N? R?? WY? Y:? ZY? \? ]? a? e? h? l,? n:? r? ? t:y? ? {? ? ? }? ?
? ! 3 5 7 : ; = > / = 3 @ 9 A = B ? A B C E B H A M E R G m H t I u M | L ~ N ? O ? P ? R ? S ? R ? T ? W ? X ? Z ? ^ ? ` \ ? ? ? ? ? ? ? ? 3 ? ? ? 9 ? ? ? M ? ? ? ~ T ? ? ? * ? ? ? ? ? ? ) ? b ? ? ? % l = ? S W u ? ? ?