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