tag:blogger.com,1999:blog-4479559294098558595.post7844428692218303611..comments2024-03-16T11:45:05.859+01:00Comments on mighty virtualization: vCO - get all Distributed Virtual SwitchesChristian Johannsenhttp://www.blogger.com/profile/05436107822493548471noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-4479559294098558595.post-29358606855354154982016-04-25T20:00:58.002+02:002016-04-25T20:00:58.002+02:00I know it's an old post but I ran into the sam...I know it's an old post but I ran into the same challenge today. Here is my solution. <br />var allDvs = Server.findAllForType("VC:VmwareDistributedVirtualSwitch");<br /><br />you can filter down from there. like this:<br />var targetDvs = allDvs.filter(function(dvs) {<br /> return dvs.sdkConnection.name == targetVc.name<br />});<br /><br />targetVc is an VcSdkConnection but you could filter on other stuff as well.ChrisRhttps://www.blogger.com/profile/00671249432783972008noreply@blogger.comtag:blogger.com,1999:blog-4479559294098558595.post-55676572332452744872012-03-10T14:15:31.873+01:002012-03-10T14:15:31.873+01:00For some reason I cannot post code as a reply. I ...For some reason I cannot post code as a reply. I am trying now with a link to wordpress on how I think is another approach of getting all the Distributed Virtual Switches without running through all port groups.<br /><br />http://wp.me/p2hhPD-5 <br /><br />Hope you like it.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4479559294098558595.post-32944636528981918152011-02-11T19:11:24.435+01:002011-02-11T19:11:24.435+01:00Million thanks..impressed with the stuff here.
VI...Million thanks..impressed with the stuff here.<br /><br /><a href="http://vmkernal.blogspot.com/p/virtualization.html" rel="nofollow">VIRTUALIZATION</a>virtual guruhttps://www.blogger.com/profile/08837506752174558891noreply@blogger.comtag:blogger.com,1999:blog-4479559294098558595.post-10902790409736058722011-01-27T23:26:23.170+01:002011-01-27T23:26:23.170+01:00If there is no portgroup, array dvPG is initialize...If there is no portgroup, array dvPG is initialized with length 0 and so the for-loop is passed by. DVS array is initialized with lenght 0.<br />So this task will also run (correct) if there is no dvPortGroup, assuming the DVS is set as output parameter.Anonymousnoreply@blogger.com