Someone at - it a simple example of creating virtual machine-> the affinities of virtual machine using the PERL API?

The question just about everything said. Is there a perl extracts to create an affinity between the virtual machines.

Thanks, Vikas, for example and guidance. Since I am abel to make it work, I thought I'd share the code example:

My $vm_name_list;    # A list of names of virtual machine.

My @vm_morefs;      # Filled in the managed object refes to the virtual machines, this detail not included.

My $cluster_name;    # Name of the cluster to create the rule in

# Find the Cluster Compute resource object.

My $cluster_views = Vim::find_entity_views (view_type-online 'ClusterComputeResource',
filter-online {name-online $cluster_name});
If (! @$cluster_views) {}
Die "no cluster don't compute resource named $cluster_name detecte\n";
}

My $cluster_view = $cluster_views-> [0];

My $rule_name = 'affinity for $vm_name_list. "

# Create the nest of objects required for ReconfigureCluster_Task:
#
# ClusterConfigSpec
rulesSpec #-> [ClusterRuleSpec]
operation #-> ArrayUpdateInformation
# enum (add, modify, delete)
Info #-> ClusterAffinityRuleSpec

My $aff_rule_spec = new ClusterAffinityRuleSpec (name => $rule_name,)
enabled-online "TRUE."
mandatory-online "TRUE."
VM-online \@vm_morefs);

My $array_update_operation = new ArrayUpdateOperation ("add");

My $clus_rule_spec = new ClusterRuleSpec (operation => $array_update_operation, info-online $aff_rule_spec).

My @clus_rule_specs;
Push (@clus_rule_specs, $clus_rule_spec);

My $cluster_config_spec = new ClusterConfigSpec (rulesSpec-online \@clus_rule_specs);
$cluster_view-> ReconfigureCluster_Task (spec => $cluster_config_spec,)

change-online 'TRUE'));

Tags: VMware

Similar Questions

  • Simple example of child to access the Parent data

    Hi all

    Im trying to explore and make sense of OOP.  Ive been learning as much as I can, but why cant seemt to extract data from a class parent child.  Ive put the child to inherit from the parent and creates an accessor parent to read and write.  I write the data in the parent class and then try to read data from the child's class. Is there something im missing? Anyone have or know a link to a simple example of this?

    Thank you

    Matt

    Ok.  I think you have a misunderstanding of the works the POO here.  The idea with OOP is that you can pass the child object in the parent methods and is in any case on this object.  Your drawing should look like this:

  • Is there a simple example, I can see how to connect to a database using actionscript and Flash 8? (not with components)

    I've looked everywhere for a simple example "hello world", on how to connect to a database, pass a parameter and returns a dataset object. I'd like one that uses no components. (Actionscript only). Who uses ColdFusion 7.x and Flash 8. Can someone point me to one?

    Thanks Craig, I noticed the example, but it was meant for Flash MX, and Flash 8 documentation, the NetServices is now obsolete. Anyway, I posted my question on another site and some provided me with a simple example. Here is the url if anyone is interested... sample

  • Simple example to configure read-only (materialized view) replication

    Hello world

    Can someone provide me with simple example to configure read-only (materialized view) replication?

    Also we have to manually re-create all indexes of the replicated database?

    Thank you
    Ken

    See

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14226/repmview.htm#i34980

    A MV is separated from the source table. You don't have to 'recreate' index. You can create separate (or the same) index on the MV - don't forget a MV can be a join of tables 2 or more! (Do not create a Unique Index on the MV)

    Hemant K Collette

  • Simple example of a combobox control displays data in a CF data source

    Can someone tell me a simple example of a Flex 3 combobox that displays data from a ColdFusion data source?  I can't find a simple example.  As always, thank you!

    I'm sure that's what you're looking for

    http://blog.tygate.com/?p=463

  • Simple example of narrow Panel? in the Structure of the event does not work - please advise

    I'm trying to implement a close interception single panel.   In the LabVIEW 2010 VI joint, I expect to see a dialog box indicating now 'close [filename]' which will then stop the VI but NOT closing the Panel.

    Instead, I see the program to run in to highlight up to the loop, execution mode then when I press the button window close Windows (X) in the upper right window of the façade, two program windows close immediately.

    Can someone tell me why this discrepancy? does not work?

    OK, this version works as expected.  I was able to find the reference 'this VI' to the title of the programming VIs and functions - functions and Application control screw - VI reference server.  (Not easy to find the help of LabVIEW.  I actually copied it from another VI.)

    It displays the message 'Now close [filename]' then put a Boolean True to stop the loop of the file.

    Thanks to those who pointed out I was making reference to an array of screws rather than a single VI.

    I think it is a very simple example that should be able to find by searching for ways to replace the narrow Windows file service.

  • Can someone explain to me why XP sometimes creates a double XP profile.

    Can someone explain to me why XP sometimes creates a double XP profile. For example Neo (domain)?

    Hello

    1. is the computer connected to the domain?
    2. don't you make changes to the computer before the show?

    This behavior can occur if the user profile was deleted manually using the command prompt or by using Windows Explorer. A profile that is manually deleted does not remove the security identifier (SID) of the list of profiles in the registry.

    To resolve this issue, follow these steps:

    1 delete the profile by using the computer properties dialog box. To do this, follow these steps:

    a. click Start, right click my computerand then click Properties.

    b. click on change settings.

    c. in the System Properties dialog box, click the Advanced tab.

    d. under user profiles, click settings.

    e. in the user profiles dialog box, select the profile that you want to remove, click Remove, and then click OK.

    2. click on Start, type regedit in the box Start Search and press ENTER.

    3. Locate, and then expand the following registry subkey:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

    4 right-click the SID that you want to remove and then click Remove.

    5 log on to the computer and create a new profile.


    Important
    this section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base: 322756 (http://support.microsoft.com/kb/322756/) how to back up and restore the registry in Windows.

    You can also download the UPHClean from the following location:
    http://www.Microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=1b286e6d-8912-4e18-B570-42470e2f3582

  • A simple example of filling the data from Json to a ListView.

    I want a simple example to inflate a listview with Json data.

    Examples of the sample do not work

    as we have a code example

    App.cpp

    App::App()
    {
        Page *root = new Page;
        ListView *listView = new ListView;
    
        // Create the data model, specifying sorting keys of "firstName" and "lastName"
        GroupDataModel *model = new GroupDataModel(QStringList() << "firstName"
                                                   << "lastName");
    
        // Create a JsonDataAccess object and load the .json file. The QDir::currentPath()
        // function returns the current working directory for the app.
        JsonDataAccess jda;
        QVariant list = jda.load(QDir::currentPath() +
                                 "/app/native/assets/employees.json");
    
        // Insert the data into the data model. Because the root of the .json file is an
        // array, a QVariant(QVariantList) is returned from load(). You can provide a
        // QVariantList to a data model directly by using insertList().
        model->insertList(list.value());
    
        qDebug()<<"the size of model is "<size()<<"\n";
    
        // Set the data model for the list view
        listView->setDataModel(model);
    
        // Set the content of the page and display it
        root->setContent(listView);    Application::setScene(root);
    }
    

    with the file employees.json of assets

    [
        {
            "firstName" : "Mike",
            "lastName" : "Chepesky"
            "employeeNumber" : 01840192
        },
        {
            "firstName" : "Westlee",
            "lastName" : "Barichak"
            "employeeNumber" : 47901927
        },
        {
            "firstName" : "Jamie",
            "lastName" : "Lambier"
            "employeeNumber" : 51239657
        },
        {
            "firstName" : "Denise",
            "lastName" : "Marshall"
            "employeeNumber" : 41239520
        },
        {
            "firstName" : "Matthew",
            "lastName" : "Taylor"
            "employeeNumber" : 01963597
        },
        {
            "firstName" : "Mark",
            "lastName" : "Tiegs"
            "employeeNumber" : 65321951
        },
        {
            "firstName" : "Karla",
            "lastName" : "Tetzel"
            "employeeNumber" : 03266987
        },
        {
            "firstName" : "Ian",
            "lastName" : "Dundas"
            "employeeNumber" : 29472012
        },
        {
            "firstName" : "Marco",
            "lastName" : "Cacciacarro"
            "employeeNumber" : 56446691
        }
    ]
    

    On the run, it shows a white screen with no list control.

    Thank you all for your answers, actually problem was not in the code. The problem is in the employees.json file I downloaded from developer site.

     

    [
        {
            "firstName" : "Mike",
            "lastName" : "Chepesky"      // after this ',' is missing
            "employeeNumber" : 01840192
        },
        {
            "firstName" : "Westlee",
            "lastName" : "Barichak"      // after this ',' is missing
            "employeeNumber" : 47901927
        },
        {
            "firstName" : "Jamie",
            "lastName" : "Lambier"    // after this ',' is missing
            "employeeNumber" : 51239657
        },
    
    ....................so on]
    

    means the error occurred when parsing json. Error very stupid . I have checked it sooner.

    So who uses this example json file in their applications. Please correct first, and then use.

     

  • A simple example of RESTful webservice in atg

    Hello

    I'm looking for a simple example create a RESTFul Web service in atg. I went through the documentation of the atg, but there little confusing and complicated to start with.

    Please help me.

    In the ATG, we deal with some core components that has references to java classes.

    Jersy unknown components of atg abt nuclues and there by cannot take advantage of core component.

    And we must write annotation in each class/method in Jersy.

    But with ATG rest MVC, just using configurations (actors) you can do just about any rest service component without touching the java class.

    Peace

    Shaik

  • Simple function to create ToolTip in Actionscript 3

    Hello

    I'm new to Actionscript 3 and I'm creating an application in which I need to use tooltips.  I thought it would be simple because in VBA and other object-oriented languages, you have a tooltip for a button and all property you need to enter the text (or even schedule it, which is very simple).  However, I can't seem to create tooltips in Flash using AS3, I tried 6 different methods (fairly complex) from code I found online but could get any of them to work.  Can someone please give me a simple function that takes as parameters the ToolTip text and the original button, then the right function creates the ToolTip automatically once it's called? Any help would be greatly appreciated. Thank you.

    If the two functions add and remove are on the same timeline you will not see this error message.  but I see typo:

    create a buttonObj for all your buttons

    var buttonObj:Object = {};

    //////////////////////////////////////change nothing above ////////////////////////////////////

    the next 3 lines must be made for all your buttons

    buttonObj [yourbutton] = ['Hello', 2, 2];

    yourbutton.addEventListener (MouseEvent.MOUSE_OVER, addToolTipF);

    yourbutton.addEventListener (MouseEvent.MOUSE_OUT, removeToolTipF);

    change nothing below.

    function addToolTipF(e:MouseEvent):void {}

    var a: Array = buttonObj [e.currentTarget];

    var tf:TextField = new TextField();

    buttonObj [e.currentTarget] .push (tf);

    TF. Text = a [0];

    TF. Multiline = false;

    tf.autoSize = "left";

    TF. Border = true;

    addChild (tf);

    TF.x = a [1] + e.currentTarget.x;

    TF.y = a [2] + e.currentTarget.y;

    }

    function removeToolTipF(e:MouseEvent):void {}

    removeChild(buttonObj[e.currentTarget][3]);

    buttonObj [e.currentTarget]. splice (3,1);

    }

  • I downloaded 4 FF and now 5 and nor with my screen looks nothing like it says on the page of FF. For example, I don't have the orange FF tab in the upper left corner, I have no "PIN as app" option, nor do I view. Can someone help me please?

    I downloaded 4 FF and now 5 and nor with my screen looks nothing like it says on the page of FF. For example, I don't have the orange FF tab in the upper left corner, I have no "PIN as app" option, nor do I view. Can someone help me please?

    To get the orange FF tab, go to view > toolbars > menu bar. This should uncheck the menu bar giving you the orange button.

    Panorama is a box made of 4 gray rectangles which should be on the far right, if not once you activate the orange FF tab, right click anywhere on a toolbar that doesn't has nothing to this topic, and you should get a menu with a list of your toolbars that you can check and uncheck the box. Come on down to personalize everything down and it will open a window with all your buttons. Find groups of panorama/tab button and drag it to the toolbar of your choice.

    to pin a tab as an app, right-click on it; It is an option in the context menu.

  • Simple examples of analog output USB-6343

    I've tried passing by 'find' examples and does not know how to find what I want.

    I'm doing a simple analog output on a USB-6343.  Examples of waveforms say they work with the USB-6343, but I really don't want a waveform, just analog of output does not exceed 10 Hz speed of renewal.  Some of the more simple examples show that they work with the pcie-6343 but do not list USB-6343.

    I worked with USB-6009 in the past, but when I try to use an analog output task that uses 1 sample on request, I get the error "not buffered operations clocked by the hardware are not supported for device and channel type.»  Set the size of greater than 0 buffer, do not set up the timing of the sample clock or the value Type of sample On Demand time"

    I tried samples N, 100 samples to write to 10 Hz - the same error.  Samples of continuous - same error.  1-sample - timed HW - same error.

    There is a series of examples of I/O for the X series?  Is it possible to search the device examples rather than go through all the examples and by checking the list of devices individually?

    Is 'size of the buffer' the 'writing samples"in MAX?

    After contacting the support I was provided with the names of the more simple examples for analog i/o:

    Analog output-Gen power Update.vi

    Analog Input-Acq & chart voltage-Int Clk.vi

    They are found in the getting started screen of

    Click 'Find examples' near the lower right corner

    Filter the results to material by clicking on the menu drop down for the material in the lower left corner and selecting USB-6343 (only connected equipment will be displayed)

    Don't forget to check the box "limit results to material" below.

    In the center pane, double-click 'Material Input and Output'

    Double-click DAQmx

    Path for the analog input - double-click Acq & chart analog measures - double click on tension - tension-Int Clk.vi

    Double click on analog generation - double click on Power - Gen Update.vi of analog channel output voltage

    The examples are for the single data point.  Samples and exit multiples are produced by putting the writing or reading VI inside a loop.  The beginning and the clear functions should be out of the loop.

    Additional information, I need technical support was how material-filter results and identification of more simple examples which were not obvious from the examples of names.

  • Can someone give an example of how to configure the subnet mask associated with the network and host of an IP address part?

    Can someone give an example of how to configure the subnet mask associated with the network and host of an IP address part?

    Hi stuckfree,

    The question you posted would be more appropriate on the TechNet Forums. I would recommend posting your request here.

    http://social.technet.Microsoft.com/forums/en/itproxpsp/threads

  • Is there a simple solution to create a gallery that welcomes them disturbing pictures portrait and landscape in the Muse Gallery Widgets?

    Is there a simple solution to create a gallery that welcomes them disturbing pictures portrait and landscape in the Muse Gallery Widgets?

    Found a discussion that might help http://answers.squarespace.com/questions/28951/how-can-i-get-the-gallery-to-display-square - portrait - and - landscape-images

    You can also use jQuery Plugins for this purpose.

    See also the images of landscape and portrait in the lightbox

  • Simple examples out there using external resources JMS?

    We designed the project with EJB3 and need a way to communicate back with AquaLogic 6.0. We'll do this via JMS, I was wondering if anyone had any simple examples of using JMS like that?

    Here is a link to a zip file which may help you: http://www.4shared.com/file/138563568/ed8cdb75/MQ_Series_with_ALBPM.html

    Inside of this zip, there is a PDF that documents how to hit MQ of ALBPM. It is not official Oracle documentation, but is what we wrote a few years when we were working with MQ JMS integration.

    He wrote for ALBPM 5.7, but three external resources, you will need are documented:

    you will need an external resource Java that introspects the POJO Java 6

    a JNDI provider / J2EE Application Server and

    a JMS queue / JMS Messaging Service

    Be sure to use the generic JMS client application I've included with this zip. This allows to quickly test connectivity for WebSphere MQ (or any other JMS broker). You sometimes find you spend hour trying to integrate with back-end services (be it a JMS broker or another type of integration) to find out hours later that the parameters provided were incorrect. Once it has been tested and work ouside Oracle BPM, it is usually easy to get things working inside the Oracle BPM.

    Hope this helps,
    Dan

Maybe you are looking for