Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 219257

Re: for loop on vcenters - list skipping on fail

$
0
0

Thanks. I added 'Disconnect-VIServer * -Force -Confirm:$False' but there is an issue when one of them fail:

 

Time :: host :: Runtime (seconds)
12:06:49 :: bavc1 :: 1286.3862268
13:17:41 :: bvc1:: 4252.2041729
13:30:23 :: lvc1:: 761.6258825
13:30:30 :: lxdvc :: EXCEPTION!
13:34:00 :: lxvc1:: EXCEPTION!
13:37:28 :: nvc2:: EXCEPTION!
13:40:55 :: svc1:: EXCEPTION!
13:46:52 :: stavc1:: EXCEPTION!
13:53:28 :: zvc1:: EXCEPTION!

 

I restricted the get-vm to get-vm *abc* to speed up the troubleshooting and found the culprit - there was a global attribute missing one of the vc.

 

Time :: host :: Runtime (seconds)
21:01:56 :: bavc1 :: 54.4264154
21:02:23 :: bvc1 :: 27.2972137
21:02:29 :: lvc1 :: 5.9372769
21:02:36 :: lxdvc :: EXCEPTION!
21:02:51 :: lxvc1 :: EXCEPTION!
21:03:04 :: nvc2 :: EXCEPTION!
21:03:16 :: svc1 :: EXCEPTION!
21:03:32 :: stavc1 :: EXCEPTION!
21:03:50 :: zvc1 :: EXCEPTION!

 

By the question is 1) why it skip and HALT! the rest when it fail? 2) Is this new in powercli 6.0? it never happen in 5.5 or older.

 

21:06:38 :: bavc1 :: 30.5933593
21:06:52 :: bvc1 :: 13.7796256
21:06:57 :: lvc1 :: 5.4512553
21:07:09 :: lxvc1 :: 12.2495468
21:07:22 :: nvc2 :: 12.1385508
21:07:27 :: svc1 :: 5.1842234
21:07:31 :: stavc1 :: 4.1381707
21:07:37 :: zvc1 :: 5.6402636

Viewing all articles
Browse latest Browse all 219257


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>