Correct portgroup self-selection for deployment

I do a workflow deployment where the workflow itself decides many of the InputParameters (InputParameters) for deploying effective, based on selections from presentation-entries like 'Security Zone', 'Type of environment', etc. of redundant storage required.

Based on all of these contributions, the scripts 'knows' what cluster to deploy on (hardcoded). He selects then automatically a host (randomly), checks its status, and if it is under maintenance, it selects another. Finding it is a store of data appropriate to correct type, selects the one with the most free space, but also takes into concideration that data warehouses will not be filled above 80%. Provisions of the model, and then adds more ram (If selected), cpu (If selected), add additional hard disks, partitions and then inside the machine virtual etc etc.

The script works very well and ut saved tons of time on deployment. But there is an information boring litte, that I still have to provide, and it is the portgroup. I would like the script to select the portgroup based on only a VLAN ID given when starting the workflow (presentation), because it would make the script more "self-service" friendly and accessible to other people in the Organization and not only vmware admins because they are knowing what exchanges going with wich hosts/clusters etc. Other parts of organizations concentrate more on placement in areas of security and VLAN, type of environment etc., placement no cluster physical and virtual networks.

I have several clusters/hosts, some of which are connected to vSwitches and are connected to dvSwitches and some connected to both and I also have different dvSwitches. VLAN 600 could be part of several dvSwitches, but under different name - PG for each dvswitch. It could be called 'P_600' on a dvSwitch and PRD_MGMT on another dvSwitch for other cluster host. And it is very easy to make selections at presentation showing the deployment of CLUSTER D1, then by mistake or confusion (at least for nonadmins) select PRD_MGMT instead of P_600, causing the deployment connect the network to a host no visible switch, causing the deployment fails on the operations of jondomain etc. This is the reason I want the script to do this part itself.

What I need is a piece of code using a cluster or host as an input, find all the switches to which this host is connected (both standard and distributed). Then loop through all the exchanges on these switches and find a portgroup with the VLAN ID and return this portgroup like VC:Network or VC:DistributedVirtualPortGroup based on what move he was found in specified.  But I could find no way to do what I wanted to use the default API availlable.

I also tried to change my wishes and some automatism be "hardcoded" that would work also, as part of the cluster (but not like fancy) and do a pice of code taking a dvSwitch specified in hard or vSwitch, hollow loop all exchanges and find the portgroup with VLAN ID good, returning ito a VC variable : Network or VC:DistributedVirtualPortGroup, but I couldn't get that to work either. At least not for dvSwitches, which is used to 90% of all deployments... I can't find a way to work to do this.

Anyone know how this could be done? In short, how can I loop through all of the exchanges on a dvswitch and return one with a specified ID of VLAN? Any help is appreciated!

From the code above, I changed it to this:

var dvPGS = VcPlugin.getAllDistributedVirtualPortgroups();
for each (pg in dvPGS)
                {
                               if (pg.config.distributedVirtualSwitch.name == dvSwitch)
                                               {
                                                               if (pg.config.defaultPortConfig.vlan.vlanId == vLAN)
                                                                              {
                                                                                              var SelectedPort=pg
                                                                              }
                                               }

                }

System.log ("The port "+SelectedPort.name+" belongs to "+dvSwitch+" and has vlan id: "+SelectedPort.config.defaultPortConfig.vlan.vlanId)

This code takes an input string (dvSwitch) parameter number (vLAN) and locates a portgroup successfully with the vLAN gave on the dvswitch with his name defined as string dvswitch, this script makes exactly what I look for when it comes to dvSwitches, because I have to hardcode what dvSwitch belongs to each cluster. It is possible to rework it still more to look at actually connected host/parent etc instead of hard-coding the dvswitch name, but with this code I can actually do the work, so that will probably have to wait for the next version of the workflow :-)

Now, I just have a working for vSwitches solution too :-)

Tags: VMware

Similar Questions

  • SE temp cert of Cisco ASA: device selects point trust ASA-self-signature for client

    Hi all

    After that I imported a GlobalSign Certificate from a another ASA anyconnect users receive this error message:

    AnyConnect cannot verify the server: domain.com

    Certificate does not match the name of the server

    Certificate comes from an untrusted source

    The current setting of the SAA are:

    Trust GlobalSign SSL outside

    In the newspaper:

    6 7 December 2015 10:29:14 725016 unit selects trust-point ASA-self-signed for the customer on the outside:

    This means that the ASA do not get the correct certificate? Why?

    Hi demichel2,

    Can indicate you what esityksen ASA are you running?

    If you run 9.4 and above, you may need to disable the ECDSA algorithm with the following command:

    custom SSL encryption TLSv1.2
    'AES256-SHA:AES128-SHA:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:DES-CBC3-SHA:DES-CBC-SHA:RC4-SHA:RC4-MD5 '.

    -Randy-

  • Windows is not able to load the selected for the following reason of backup set

    Hello;
     
    I did run a daily backup to a computer in a network with windows backup and Restore Center. the hard drive crashed on this computer and we had to install another. When I try and use advanced restore / backup made on a different computer, I can navigate to the backup on the network computer folder but when I select the folder and click Next it gives me an error:
     
    I get: Windows is not able to load the backup game selected for the following reason:

    There is a problem with the backup catalog... 0x810000E5... restore from a different place...

    Just to add additional information; The computer with the replaced hard drive running Vista family premium, the path to the backup file is \\HPDESKTOP\Public\Backup\Bobruncer-pc\.

    There is another folder under Bobruncer-pc called Bobruncer-pc and all the backup files. I restore from the correct location? Also, the backup folder is 226 concerts but the backups were made from a hard drive of 80 GB... should I worry about this too?

    Thank you

    Dave

    Hi Colt4t5,

    Just to clarify, perform you a complete PC Backup or backup and restore?

    When you do return, and restore, it can be saved as a .zip file in the backup folder. You can decompress the file and retrieve the required files.

    Restore files from a backup
    http://Windows.Microsoft.com/en-us/Windows-Vista/restore-files-from-a-backup

    Back up and restore: frequently asked questions
    http://Windows.Microsoft.com/en-us/Windows-Vista/back-up-and-restore-frequently-asked-questions

    I hope this helps.

    Bindu S - Microsoft Support

    [If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message.] [Marking a post as answer, or relatively useful, you help others find the answer more quickly.]

  • Lightroom applying not automatic correction of the lens for M43 objectives

    Forums, there are many discussions about the automatic application of integrated objectives M43 profiles.  My problem is that Lightroom does not apply the profiles of builtin for a camera of the MDGs - em5 olympus (lens panasonic lumix 14-140 3.5 to 5.6, kit olympus 12-50), panasonic gh3 (objective 14-42).  I use of course raw format images, and I've tried Lightroom 4.4 and downloaded the latest Lightroom 5.7.1.  I started fresh with new catalogs and in each case, I have the same result.  When I go to develop and lens Corrections is NOT showing me the info button saying that a built-in profile has been applied.  ACTIVATE the PROFILE CORRECTIONS is NOT selected.  My study of the forums of the Info button should be there, but it's not.  Any ideas?

    I'm not absolutely sure, but I think that the info was introduced with LR6.

  • Are all Thinapp were compatible applications for deployment using IDM/workspace?

    Hello

    First of all, excuse my knowledge using IDM. I thinapp had a number of successful applications and work a treat at the launch, they have problems with some when rebuilt to use IDM for deployment. These thinapp'd deliver applications on the local desktop (folder C:\ProgramData\VMware\Identity Manager Desktop\thinapp) but fail to run correctly. MobaXterm 9 is an example of an application. My understanding is that, if a thinapp had starts and works correctly, it should be no different when sent via IDM, right?

    Environment:

    Windows 8.1 desktop x 64

    ThinApp 5.1

    IDM customer 2.4.1 - 3411811

    Thanks in advance.

    Jason

    OK, vIDM should not affect packaged with ThinApp application launch. But if you've found a case where it does please file a support ticket with the VMware Support. We need to take a look, thus interfering...

  • Is there a no work around to self-selecting shipping options by entering the zip/postal code?

    Is there a no work around to self-selecting shipping options by entering the zip/postal code? Because currently, yet the user must select the delivery option (radio button type).

    Yes, but its coding custom in conjunction with a 3rd party to search for postal code. You also manage the boring dom manipulation that BC with its code on things like the fields of code reduction, changes etc. making your shipping option code. You really need to have a good understanding of encoding AND British Colombia in this case unfortunately.

    Possible, but if you do not want to pay so that it can be done or not be able to do it yourself - Best to avoid it, if you can on the project.

  • Select for a partitioned table, it will work with > sign?

    Hello
    I partitioned table and select for that:
    ...
    PARTITION BY RANGE  ( "INDATE"  )
      (   PARTITION "PRT_20091201" VALUES LESS THAN (TO_DATE(' 2009-12-02 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')...
    ....
       SELECT COLUMN_LIST FROM TABLE1   WHERE
               ( indate >= to_date(t_indate || t_timefrom, 'mm/dd/yyyy HH24:MI:SS'))                       AND
               ( indate <= to_date(t_indate || t_timeto,   'mm/dd/yyyy HH24:MI:SS'))                        AND... 
    so by selecting all of the Info for the given date specified inside time, and I use > = condition on the column partitioned, do you think that it will work correctly learn directly to the single partition or Oralce requires me to put strictly = sign for this column and then additioanly I can probably choose time, something like:
    SELECT COLUMN_LIST FROM TABLE1   WHERE
              ( indate = to_date(t_indate , 'mm/dd/yyyy'))                        AND
                   ( trim_to_time(indate) >= to_char(t_timefrom, ' HH24:MI:SS'))              AND
                   ( trim_to_time(indate) <= to_char( t_timeto,   ' HH24:MI:SS'))              AND... 
    All TX
    TR

    Trento wrote:
    Thanks to all the guys,
    Always learn to follow the plan. I can't use SELECT FROM TABLE of PARTITION (P - NAME) because of dynamic political anti on our site.

    Not a bad policy as dynamic sql is a blade against double edge that can cut you, and the problem with its employees.

    But do not use the option of PARTITION in a dynamic query - use manually in a one-time ad hoc when query data. Decide what partition to get the data is done automatically and is what is the process for

  • How to disable him drag the text selected for searching the Web?

    How to disable him drag the text selected for searching the Web?

    Hmm, I did not forward. This is a new tab page with nothing to do with what you were dragging?

    I wonder if this might be a feature of one of your extensions. You can see their and disable/remove those that are not essential or unrecognized, here:

    Firefox orange (or the Tools menu) button > addons > Extensions category

    If you disable the extensions, usually a link will appear above at least one of them to restart Firefox. You can complete your work on the tab and click one of the links in the last step.

    If there is no difference, you could test mode without failure of Firefox - which is a standard diagnostic tool in order to avoid interference by extensions (and some custom settings). More info: questions to troubleshoot Firefox in Safe Mode.

    You can restart Firefox in Mode safe help

    Help > restart with disabled modules

    In the dialog box, click on 'Start mode safe' (not Reset)

    Any difference?

  • I use Photos to make a schedule, and when I add national holidays and have a personal calendar already selected for the import, national holidays replace a personal date when the two entries in conflict.  Any suggestions?

    I use Photos to make a schedule, and when I import two calendars of Mac, I can't play well together.  By example, if I add the national holiday calendar to a personal calendar already selected for the import, national holidays replacement a date personal when the two entries in conflict.  Users are allowed to several elements to show on a given date (I can add an article manually; and if I have two elements in a personal calendar, they both matter very well).  Does not seem serious if I import successively or simultaneously, the holidays always seem to prevail on personal items.  I am proud of my country, but want to avoid adding those who back in manually (and avoid having to check everything so closely).

    Any suggestions?  Thank you

    John

    (running Yosemite on a mini 2015)

    There is no way to have both separate schedules added and share a date.  Tell Apple what missing features you want restored or new features added in Photos via https://www.apple.com/feedback/photos.html.

    You could create a new calendar with personal anniversaries and holidays.  I think that would be the case with the exception of those holidays that might change the date to when if fell, which is Memorial Day for one.

  • LV TEN F5 SP1 does not appear in the components for deployment...

    Hello

    Just migrated my x 32 to x 64 TS2014 TS2013 LV2013 & apron & LV 2013 x 64. I'm now trying to build a new installer for deployment for my test stations, but LV RTE SP1 F5 does not appear in the components for deployment, even if it is properly used as adapter labview Teststand sequence editor... why?

    I can see RTE SP1 F3, but not F5...

    If please see attached picture to see my setup teststand (showing the labview adapter) and the list of parts available in the deployment utility.

    Thank you very much for the help.

    C.

    Hello

    Thank you for the information.

    As a temporary solution (as of 2014-12-04), I manually installed the SP1 LV F5 RTE 2013 on the test station.

    Here you can find the downloadable version:

    http://www.NI.com/download/LabVIEW-run-time-engine-2013-SP1/4539/en/

    Thank you and have a great day,

    C.

  • Startup Repair:-using Skype, can I use the method of selection for me starts better what should I suggest? Thank you pp

    Startup Repair:-using Skype, can I use the method of selection for me starts better what should I suggest? Thank you pp

    Hello

    Welcome to Microsoft Vista Forum community!

    Please answer the following questions to help you better about it
    ·         What is the edition of Vista installed on the computer?
    ·         You try to make the Windows Vista startup repair?
    ·         How long have you used Skype for?
    ·         Are you facing problems starting with windows after downloading Skype?

    If you encounter problems with Windows startup after downloading Skype, then you can try to disable the startup of Skype at Windows startup. (For example, in MSN, go to tools > Options > General > do not start when Windows starts.)

    For more information, you can consult the help of Skype: https://support.skype.com/

    Hope this information is useful.
    Let me know if it worked.
    All the best!

    Concerning

    Jeremy K
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Need to create a task sequence for deploying Win - XP in MDT 2010

    Hello

    I'm having the lab for MDT 2010 configuration, now I need to create a task sequence for deploying operating system Win - XP with MDT 2010. Is it possible to create in MDT 2010 if yes please let me know the steps.

    It helped me http://www.edutechnow.com/?p=122

  • "Random selection" for "Transitions" in Windows Movie Maker?

    For all that I can tell, Windows Movie Maker doesn't have a 'Random' selection for transitions.  It is this true or am I missing where the selection within the program?

    Hello ugotano,

    Welcome to the Microsoft Answers Forum!

    If you are looking for the option on how to change or add the transition in Movie Maker, here are the steps:

    1. on the table of the storyboard / timeline, click the second of the two video clips, titles or images that you want to add a transition between.
    2. click on tools, then on Transitions.
    3. in the content pane, click the transition that you want to add. You can click Play under the monitor to see a preview of what looks like the transition.
    4. click on the Clip and then click Add to timeline or add to the storyboard table.

    Here is an article you can do references who will give you information on the transitions:

    http://Windows.Microsoft.com/en-us/Windows-Vista/add-transitions-and-effects-to-pictures-and-video-in-Windows-Movie-Maker

    By default, Windows Movie Maker does not include transitions random, pans and zooms.  Adding Pan/zooms and transitions must be picture.
    You can apply the same transition to all the clamps at the same time:
    1. click on the 1st box of transition on the storyboard table (small box between the clips)
    2. do one of the following:
    3 Ctrl + A to select
    4 shift-click on the last transition box to select everything in between
    5 Ctrl-click the transitional areas to add them to the selection one by one.
    6. right click on the desired Transition and select "apply to the Storyboard object.

    I hope this information helps.

    Thank you
    H Irfan, Microsoft Answers Support Engineer.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • The poor Internet behavior Device Manager error "' there is no selected for the item or a set of device driver information."

    Original title: poor Internet behavior.

    I bought a laptop Lenovo X100e used with Windows 7 Professional. It was a great computer, but when I go on the internet, it behaves as if the connection is slow or wobbly, even if the connection is fast. This is especially true of the streaming video, who stutters so much, it is virtually impossible to watch Netflix or YouTube or any other video streaming service. It is also a great computer so I really want to solve this problem, rather than buying another computer.

    I used this laptop on my network domestic WiFi so much and a direct connection with the same behavior. I diagnosed my network speed and its good, usually around 20Mps, again I tried this laptop in public places like Whole Foods, and it has the same: wobbly connection. I have an old Dell Latitude that works and it works great on the same network internet and I used my phone on my wifi at home and it works fine, so it's clearly the Lenovo.

    The network cards are 11 b/g/n Wireless LAN Mini-PCI Express Adapter II and Realtek GBE Family Controller christophepaille. I checked the drivers for the two (using Device Manager), and they are both currently. I used the function "diagnose problems" and found nothing. I googled for problems with them and have not found much.

    There is also a Qualcom Gobi 2000 listed (it's a WAN wireless driver for Windows 7) under other devices and he says "there is no driver selected for the item or a set of device information. I tried updating the driver, but got an error message saying "Cannot find Windows driver." software for your device I have no idea if this is relevant.

    In addition, the laptop plays the video without any problem if it is a file on the local drive, such as mp4, so I don't think that the video problem is in itself. It is the general communication with a network. Again, I don't think it's a problem of wifi because I get the same behavior, even if I plug a cable network directly to my router.

    Also, I tried several browsers updated, including Chrome, Firefox and IE. In addition, I ran several antivirus scans, and nothing is found.

    Any help would be greatly appreciated.

    (1) run chkdsk as follows:

    A prompt by right clicking and select "Run as Administrator"
    and then at the command prompt, type: chkdsk /f r, then press the Enter key.

    If you are asked to plan the volume to check the next time that the system/PC reboots,
    Enter: y

    Now, restart the PC.

    If you know the manufacturing of your hard drive you can also download their diagnostic software.

    Another use: SpeedFan has an online health analysis function
    (SMART tab) for hard drives. It will show how your disks
    compared with other discs of the same brand and model.
    http://www.almico.com/SpeedFan.php
    Note: Unfortunately now includes a lot of bloat-ware, be very careful when installing remove bloat-ware.

    =====================================================================

    2) run the SFC/scannow command. This will check and repair if necessary all of the critical Windows system files.

    Click on start / all programs/accessories then
    Right-click on the command prompt option and select "Run as Administrator".
    (or "Safe Mode" open a command prompt)
    At the command prompt, enter: SFC/scannow

    Windows 7 - order SCANNOW SFC - System File Checker
    http://www.SevenForums.com/tutorials/1538-SFC-SCANNOW-Command-System-File-Checker.html

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7
    http://support.Microsoft.com/kb/929833

    How to analyze the entries in log file generating the program Checker (SFC.exe) resources of Microsoft Windows in Windows Vista:
    http://support.Microsoft.com/kb/928228

    =================================================================

    If SFC Scannow could not repair any or all the corrupt system files
    follow these steps:

    (a) open a command prompt (start / all programs / accessories)
    Right click on the command line option, then select: run as administrator

    (b) at the command prompt, enter: DISM.exe/online/Cleanup-Image /ScanHealth

    Press the ENTER"" key.

    (c) then enter: DISM.exe/online/Cleanup-Image /RestoreHealth

    Press the ENTER"" key.

    (d) now rerun the command SFC/SCANNOW...

    At the command prompt, enter: SFC/scannow

    J W Stuart: http://www.pagestart.com

  • Reinstall Windows 7 error: «there is no disk selected for installation (4294967295)»

    Hello

    I have a laptop of Dell XPS 15z with a new motherboard, after the old one fried. I'm trying to reinstall Windows 7 using the method of system recovery and resettlement of Dell DVD. I would like to get the "copy Windows files...". "step when an error that says:

    "There is no disk selected for installation (4294967295). "Check the parameter unattended Setup answer file references a valid drive on this computer, and then restart the installation.

    What it means? I actually wanted to start from the DVD and remove the previous partitions to do a clean install, but now I'm afraid of. Is any way to fix this error?

    Thank you!!

    Hello Jeannette,

    1. do you have the computer CAME pre-installed with the Windows operating system?

    2. using a system recovery disk or an installation disc?

    This problem may occur if the files in the installation disk is corrupted. However, I'd suggest the link and try to manually reinstall Windows 7 on the computer:

    http://www.Dell.com/support/troubleshooting/us/en/04/KCS/KcsArticles/ArticleView?docid=DSN_362048

    If you are always faced with the question, I suggest you to contact Dell technical support for disk installation or additional assistance:

    http://www.Dell.com/support/contents/us/en/04/category/contact-information/technical-support

Maybe you are looking for

  • When I open firefox I get inca homepage is that correct?

    When I open firefox the usual home page, I was used to seeing is now gone and it's called inca. I deleted Firefox and re-downloaded but I always get the homepage for inca is that good or my son downloaded a bug? How can I fix or is it a new look?

  • Where are the subject: the configuration settings for a stored profile?

    I am setting up a custom profile firefox and would like to set some options that are accessible through everything: config. I would like to know where this information is stored and if I am able to change these options outside of the browser.

  • How can I get my + tab to the right of my page Web open to work again?

    Without warning, my + icon tab on my browser, stop working and I tried all sorts of troubleshooting to regain it back. It is very distraughtful without this tab and I find the new way to be tedious, especially when you have to move the cursor more fa

  • Error 0x0000007e blue screen

    blue screen error at startup Only, my computer will boot in safe mode. I get the blue screen with WCC error 0x0000007e (0xc0000005, 0xa48dd184, 0xba502d3c, 0xba502a38) problems began after KB2555917 & KB2507938 updates have been installed.

  • My unit does not have authentic Windows 8

    I bought this laptop from a friend last year because it was a windows 8. but earlier this year he told me that the windows are going to be is about to expire. So I asked others if there is really an expiration date for windows 8 - because I was used