 < ? x m l   v e r s i o n = " 1 . 0 "   e n c o d i n g = " I S O - 8 8 5 9 - 1 "   s t a n d a l o n e = " y e s " ? > 
 < w o r k f l o w   r o o t - n a m e = " i t e m 0 "   o b j e c t - n a m e = " w o r k f l o w : n a m e = g e n e r i c "   i d = " 8 A 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 A 5 8 0 8 0 8 0 0 1 3 2 2 4 9 0 9 8 7 0 7 6 a e b f 2 a 6 a 5 a 5 "     v e r s i o n = " 0 . 0 . 1 "   a p i - v e r s i o n = " 3 . 1 . 0 "   r e s t a r t M o d e = " 1 "   > 
 < d i s p l a y - n a m e > < ! [ C D A T A [ S t o r a g e   v M o t i o n   a   v i r t u a l   m a c h i n e ] ] > < / d i s p l a y - n a m e > 
 < d e s c r i p t i o n > < ! [ C D A T A [ S t o r a g e   v M o t i o n   a   v C l o u d   V M   u s i n g   " r e l o c a t e "   o p e r a t i o n   i n   v C l o u d   D i r e c t o r 
 
 A u t h o r :   W i l l i a m   L a m 
 h t t p : / / w w w . v i r t u a l l y g h e t t o . c o m ] ] > < / d e s c r i p t i o n > 
 < p o s i t i o n   x = ' 1 8 0 . 0 '   y = ' 1 0 . 0 ' / > 
 < i n p u t > < p a r a m   n a m e = ' v d c '   t y p e = ' v C l o u d : V d c '   > 
 < / p a r a m > 
 < p a r a m   n a m e = ' v m '   t y p e = ' v C l o u d : V M '   > 
 < / p a r a m > 
 < / i n p u t > < o u t p u t > < p a r a m   n a m e = ' r e s u l t '   t y p e = ' s t r i n g '   > 
 < / p a r a m > 
 < / o u t p u t > < a t t r i b   n a m e = ' d a t a s t o r e '   t y p e = ' v C l o u d : V m w D a t a s t o r e '   r e a d - o n l y = ' f a l s e '   > < v a l u e   e n c o d e d = ' n ' > < ! [ C D A T A [ _ _ N U L L _ _ ] ] > < / v a l u e > 
 < / a t t r i b > 
 < a t t r i b   n a m e = ' v c l o u d T a s k '   t y p e = ' v C l o u d : T a s k '   r e a d - o n l y = ' f a l s e '   > < v a l u e   e n c o d e d = ' n ' > < ! [ C D A T A [ _ _ N U L L _ _ ] ] > < / v a l u e > 
 < / a t t r i b > 
 < w o r k f l o w - n o t e   x = ' 1 1 0 . 0 '   y = ' 7 0 . 0 '   w = ' 4 2 0 . 0 '   h = ' 1 0 0 . 0 '   > < d e s c r i p t i o n > < ! [ C D A T A [ 
 
 
 R e t r i e v e   v C l o u d   V M   f r o m   u s e r   a n d   q u e r y   v S p h e r e   D a t a s t o r e   V M   i s   r e s i d i n g   o n ] ] > < / d e s c r i p t i o n > 
 < / w o r k f l o w - n o t e > 
 < w o r k f l o w - n o t e   x = ' 1 1 0 . 0 '   y = ' 1 9 0 . 0 '   w = ' 4 2 0 . 0 '   h = ' 1 0 0 . 0 '   c o l o r = ' d f f f b f f f '   > < d e s c r i p t i o n > < ! [ C D A T A [ 
 
 
 P r o v i d e   c u r r e n t   D a t a s t o r e   i n f o r m a t i o n   a b o u t   v C l o u d   V M   a n d   h a v e   u s e r   s e l e c t   D a t a s t o r e   t o   m i g r a t e   V M   t o ] ] > < / d e s c r i p t i o n > 
 < / w o r k f l o w - n o t e > 
 < w o r k f l o w - n o t e   x = ' 1 1 0 . 0 '   y = ' 3 2 0 . 0 '   w = ' 4 2 0 . 0 '   h = ' 1 0 0 . 0 '   c o l o r = ' b f d f f f f f '   > < d e s c r i p t i o n > < ! [ C D A T A [ 
 
 
 P e r f o r m   S t o r a g e   v M o t i o n   o n   s e l e c t e d   v C l o u d   V M   u s i n g   " r e l o c a t e "   o p e r a t i o n ] ] > < / d e s c r i p t i o n > 
 < / w o r k f l o w - n o t e > 
 < w o r k f l o w - i t e m   n a m e = ' i t e m 0 '   o u t - n a m e = ' i t e m 2 '   c a t c h - n a m e = ' i t e m 5 '   t h r o w - b i n d - n a m e = ' N U L L '   t y p e = ' t a s k '   > 
 < d i s p l a y - n a m e > < ! [ C D A T A [ S c r i p t a b l e   t a s k ] ] > < / d i s p l a y - n a m e > 
 < s c r i p t   e n c o d e d = ' f a l s e ' > < ! [ C D A T A [ / /   u s e   q u e r y   s e r v i c e   t o   r e t u r n   V c l Q u e r y R e s u l t A d m i n V M R e c o r d 
 v a r   q u e r y S e r v i c e   =   v d c . g e t H o s t ( ) . g e t Q u e r y S e r v i c e ( ) ; 
 
 / /   m a t c h   o n   V M   n a m e   u s i n g   f i l t e r i n g   i n   q u e r y   s e r v i c e 
 v a r   e x p r e s s i o n   =   n e w   V c l E x p r e s s i o n ( V c l Q u e r y A d m i n V M F i e l d . N A M E ,   v m . n a m e ,   V c l E x p r e s s i o n T y p e . E Q U A L S ) ; 
 v a r   f i l t e r   =   n e w   V c l F i l t e r ( e x p r e s s i o n ) ; 
 v a r   p a r a m s   =   n e w   V c l Q u e r y P a r a m s ( ) ; 
 p a r a m s . s e t F i l t e r ( f i l t e r ) ; 
 
 / /   p e r f o r m   q u e r y   
 v a r   r e s u l t S e t   =   q u e r y S e r v i c e . q u e r y R e c o r d s ( V c l Q u e r y R e c o r d T y p e . A D M I N V M ,   p a r a m s ) ; 
 
 w h i l e   ( r e s u l t S e t   ! =   n u l l )     { 
 	 / /   r e t r i e v e   a d m i n V M   r e c o r d 
         v a r   r e c o r d s   =   r e s u l t S e t . g e t R e c o r d s ( n e w   V c l Q u e r y R e s u l t A d m i n V M R e c o r d ( ) ) ; 
 	 f o r   e a c h   ( v a r   r e c o r d   i n   r e c o r d s )   { 
 	 	 / /   i f   w e   f o u n d   o u r   V M   b y   m a t c h i n g   h r e f ,   e x t r a c t   t h e   d a t a s t o r e N a m e   V M   i s   h o s t e d   o n 
 	 	 i f   ( r e c o r d . h r e f   = =   v m . h r e f )   { 
 	 	 	 r e s u l t   =   " V M   N a m e :   "   +   v m . n a m e   +   "   i s   o n   D a t a s t o r e :   "   +   r e c o r d . d a t a s t o r e N a m e ; ; 
 	 	 	 b r e a k ; 
 	 	 } 
 	 } 
 	 r e s u l t S e t   =   r e s u l t S e t . g e t N e x t P a g e ( ) ; 
 } ] ] > < / s c r i p t > 
 < i n - b i n d i n g > < b i n d   n a m e = ' v d c '   t y p e = ' v C l o u d : V d c '   e x p o r t - n a m e = ' v d c '   > < / b i n d > 
 < b i n d   n a m e = ' v m '   t y p e = ' v C l o u d : V M '   e x p o r t - n a m e = ' v m '   > < / b i n d > 
 < / i n - b i n d i n g > < o u t - b i n d i n g > < b i n d   n a m e = ' r e s u l t '   t y p e = ' s t r i n g '   e x p o r t - n a m e = ' r e s u l t '   > < / b i n d > 
 < / o u t - b i n d i n g > < p o s i t i o n   x = ' 1 4 0 . 0 '   y = ' 8 0 . 0 ' / > 
 < / w o r k f l o w - i t e m > 
 < w o r k f l o w - i t e m   n a m e = ' i t e m 1 '   t y p e = ' e n d '   e n d - m o d e = ' 0 '   > 
 < p o s i t i o n   x = ' 1 8 0 . 0 '   y = ' 5 5 0 . 0 ' / > 
 < / w o r k f l o w - i t e m > 
 < w o r k f l o w - i t e m   n a m e = ' i t e m 2 '   o u t - n a m e = ' i t e m 3 '   c a t c h - n a m e = ' i t e m 5 '   t h r o w - b i n d - n a m e = ' N U L L '   t y p e = ' i n p u t '   > 
 < d i s p l a y - n a m e > < ! [ C D A T A [ U s e r   I n t e r a c t i o n ] ] > < / d i s p l a y - n a m e > 
 < i n - b i n d i n g > < b i n d   n a m e = ' s e c u r i t y . g r o u p '   t y p e = ' L d a p G r o u p '   e x p l i c i t l y - n o t - b o u n d = ' t r u e '   e x p o r t - n a m e = ' N U L L '   > < d e s c r i p t i o n > < ! [ C D A T A [ A n y   u s e r   m e m b e r   o f   t h i s   s e c u r i t y   g r o u p   w i l l   b e   a u t h o r i z e d   t o   a n s w e r   t h i s   ' I n p u t ' ] ] > < / d e s c r i p t i o n > 
 < / b i n d > 
 < b i n d   n a m e = ' t i m e o u t . d a t e '   t y p e = ' D a t e '   e x p l i c i t l y - n o t - b o u n d = ' t r u e '   e x p o r t - n a m e = ' N U L L '   > < d e s c r i p t i o n > < ! [ C D A T A [ I f   n o t   n u l l ,   t h i s   i n p u t   i t e m   w i l l   w a i t   u n t i l   d a t e   a n d   w i l l   c o n t i n u e   w o r k f l o w   e x e c u t i o n . ] ] > < / d e s c r i p t i o n > 
 < / b i n d > 
 < / i n - b i n d i n g > < o u t - b i n d i n g > < b i n d   n a m e = ' r e s u l t '   t y p e = ' s t r i n g '   e x p o r t - n a m e = ' r e s u l t '   > < / b i n d > 
 < b i n d   n a m e = ' d a t a s t o r e '   t y p e = ' v C l o u d : V m w D a t a s t o r e '   e x p o r t - n a m e = ' d a t a s t o r e '   > < / b i n d > 
 < / o u t - b i n d i n g > < p r e s e n t a t i o n > 
 < p - p a r a m   n a m e = " r e s u l t " > < d e s c > < ! [ C D A T A [ r e s u l t ] ] > < / d e s c > 
 < / p - p a r a m > 
 < p - p a r a m   n a m e = " d a t a s t o r e " > < d e s c > < ! [ C D A T A [ d a t a s t o r e ] ] > < / d e s c > 
 < / p - p a r a m > 
 < / p r e s e n t a t i o n > < d e s c r i p t i o n > < ! [ C D A T A [ P l e a s e   s e l e c t   t h e   d a t a s t o r e   t o   m i g r a t e   V M   t o ] ] > < / d e s c r i p t i o n > 
 < p o s i t i o n   x = ' 1 4 0 . 0 '   y = ' 2 0 0 . 0 ' / > 
 < / w o r k f l o w - i t e m > 
 < w o r k f l o w - i t e m   n a m e = ' i t e m 3 '   o u t - n a m e = ' i t e m 4 '   c a t c h - n a m e = ' i t e m 5 '   t h r o w - b i n d - n a m e = ' N U L L '   t y p e = ' t a s k '   > 
 < d i s p l a y - n a m e > < ! [ C D A T A [ S c r i p t a b l e   t a s k ] ] > < / d i s p l a y - n a m e > 
 < s c r i p t   e n c o d e d = ' f a l s e ' > < ! [ C D A T A [ / /   l o g g i n g   i n f o 
 S y s t e m . l o g ( " S t o r a g e   v M o t i o n i n g   "   +   v m . n a m e   +   "   t o   "   +   d a t a s t o r e . n a m e   +   "   d a t a s t o r e " ) ; 
 
 / /   c r e a t e   r e f   f r o m   d a t a s t o r e 
 v a r   d a t a s t o r e R e f   =   n e w   V c l R e f e r e n c e ( ) ; 
 d a t a s t o r e R e f . h r e f   =   d a t a s t o r e . h r e f ; 
 d a t a s t o r e R e f . n a m e   =   d a t a s t o r e . n a m e ; 
 d a t a s t o r e R e f . t y p e   =   d a t a s t o r e . t y p e ; 
 
 / / p e r f o r m   r e l o c a t e   o p e r a t i o n 
 t a s k   =   v m . r e l o c a t e ( d a t a s t o r e R e f ) ; ] ] > < / s c r i p t > 
 < i n - b i n d i n g > < b i n d   n a m e = ' d a t a s t o r e '   t y p e = ' v C l o u d : V m w D a t a s t o r e '   e x p o r t - n a m e = ' d a t a s t o r e '   > < / b i n d > 
 < b i n d   n a m e = ' v m '   t y p e = ' v C l o u d : V M '   e x p o r t - n a m e = ' v m '   > < / b i n d > 
 < b i n d   n a m e = ' v d c '   t y p e = ' v C l o u d : V d c '   e x p o r t - n a m e = ' v d c '   > < / b i n d > 
 < / i n - b i n d i n g > < o u t - b i n d i n g > < b i n d   n a m e = ' t a s k '   t y p e = ' v C l o u d : T a s k '   e x p o r t - n a m e = ' v c l o u d T a s k '   > < / b i n d > 
 < / o u t - b i n d i n g > < p o s i t i o n   x = ' 1 4 0 . 0 '   y = ' 3 4 0 . 0 ' / > 
 < / w o r k f l o w - i t e m > 
 < w o r k f l o w - i t e m   n a m e = ' i t e m 4 '   o u t - n a m e = ' i t e m 1 '   c a t c h - n a m e = ' i t e m 5 '   t h r o w - b i n d - n a m e = ' N U L L '   t y p e = ' l i n k '   l i n k e d - w o r k f l o w - i d = ' 5 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 9 9 8 0 8 0 8 0 0 1 2 6 6 3 1 2 6 8 5 7 7 8 e 6 7 7 5 7 8 5 8 8 f '   > 
 < d i s p l a y - n a m e > < ! [ C D A T A [ W a i t   f o r   a   t a s k ] ] > < / d i s p l a y - n a m e > 
 < i n - b i n d i n g > < b i n d   n a m e = ' t a s k '   t y p e = ' v C l o u d : T a s k '   e x p o r t - n a m e = ' v c l o u d T a s k '   > < / b i n d > 
 < / i n - b i n d i n g > < o u t - b i n d i n g > < / o u t - b i n d i n g > < d e s c r i p t i o n > < ! [ C D A T A [ W a i t s   f o r   a   t a s k   t o   b e   c o m p l e t e d . ] ] > < / d e s c r i p t i o n > 
 < p o s i t i o n   x = ' 1 4 0 . 0 '   y = ' 4 8 0 . 0 ' / > 
 < / w o r k f l o w - i t e m > 
 < w o r k f l o w - i t e m   n a m e = ' i t e m 5 '   t h r o w - b i n d - n a m e = ' N U L L '   t y p e = ' e n d '   e n d - m o d e = ' 1 '   > 
 < p o s i t i o n   x = ' 7 8 0 . 0 '   y = ' 2 5 0 . 0 ' / > 
 < / w o r k f l o w - i t e m > 
 < p r e s e n t a t i o n > 
 < p - p a r a m   n a m e = " v m " > < d e s c > < ! [ C D A T A [ v m ] ] > < / d e s c > 
 < / p - p a r a m > 
 < p - p a r a m   n a m e = " v d c " > < d e s c > < ! [ C D A T A [ v d c ] ] > < / d e s c > 
 < / p - p a r a m > 
 < / p r e s e n t a t i o n > < / w o r k f l o w >