Solved: Howto disable Rule DRS

Hello

I searched and searched, but couldn't find a solution.

How can I disable a Rule existing DRS with perl?

Here's where I start but do not get further :-(

my $cluster = "mycluster."

# The connection to the Web of VMware Infrastructure service

Vim::login (service_url = > $service_url, user_name = > $username, password = > $password);

My $cluster_view = Vim::find_entity_view (view_type = > 'ClusterComputeResource', filter = > {name = > $cluster});

my $rules = $cluster_view - > configurationEx-> rule;

foreach (type {$a-> name cmp $b-> name} @$rules) {}

My $rule = $_;

#rule active = 1, disabled = 0

$rule-> active = > 0;

My $rule_status = $rule - > enabled;

My $rule_name = $rule-> name;

Print "$rule_name status: $rule_status \n";

}

Kind regards

Rainer

My part - in ClusterConfigSpecExtype, the property is named rulesSpec, not ruleSpec.

#! / usr/bin/perl

use strict;

use warnings;

use VMware::VIRuntime;

My % opts =)

cluster-online {}

=> Type ": s"

necessary,-online 1

},

);

OPTS::add_options (%OPTS);

OPTS::parse();

OPTS::Validate();

Util::Connect();

My $cluster_view = Vim::find_entity_view)

view_type-online "ClusterComputeResource."

filter => {name-online Opts: get_option ('cluster')}

);

my $rules is $cluster_view-> {'configurationEx'} {'rule'};.

My @rule_specs = ();

foreach my {$rule (type {$a-> name cmp $b-> name} @$rules)}

My $is_enabled is $rule-> active;.

My $rule_name = $rule-> name;

Print "$rule_name $is_enabled \n";

My $rule_change = new ClusterRuleSpec)

operation => ArrayUpdateOperation-> new ('edit'),

Info-Online $rule,

);

# Enable or disable the rule

$rule_change-> {'info'} {'enabled'} = 0;

push @rule_specs, $rule_change;

}

My $cluster_spec = new ClusterConfigSpecEx)

rulesSpec-online \@rule_specs,

);

# Must obtain and check the status of the task, we're going to be lazy and use the version no-Task

$cluster_view-> ReconfigureComputeResource)

Spec => $cluster_spec.

change-online 'true '.

);

Tags: VMware

Similar Questions

  • Thunderbird freezes when Windows 10 fate of mode 'sleep'. SOLVED by disabling lightning, provider for Google Calendar and calendar Tweak

    Since the update of Windows 7 Windows 10, Thunderbird has acted erratically. At random times, he keeps checking for new messages. If I then try to manually check for mail, it freezes. He meets some menu commands, but by clicking anywhere in the components (list the mailboxes), the list of messages, etc. does nothing. Sometimes, it opens a white notification window, which I can only get rid of kill it with Task Manager. More often, if I just close Thunderbird and start it again, it starts working normally again... For a period of time. The problem seems to happen most often when I turn Windows off mode 'sleep', but

    I'm currently under Thunderbird 38.2.0.

    I tried to disable some add-ons that I wasn't really using. I'll see if that helps. I saw that he suggested that users with similar problems running Thunderbird with all disabled add-ons, but I also saw that it said that it is really only a temporary fix rather than a real solution and I agree. List of enabled extensions:

    Add-on Compatibility Reporter 1.1.1
    The Update Checker 2.13 module
    Check compatibility 1.3.1
    Compact header 2.1.0
    Mark all as read button 0.7.1
    Reduce to a minimum at Lac revived 1.1.2.1

    Any other suggestions? Anyone else having the same problem? I saw a few others with Windows 10 problems, but nothing quite matched mine.

    Thanks for the help. Until now, deactivation of lightning, provider for Google Calendar and calendar Tweaks seems to have solved the problem. If it begins to freeze again, I'll do Mode without fail a test.

  • How to solve "System disabled Code 00291"

    HP Pavillion Zd8060USA Llaptop Pentiun 4 HT processor 3.2GHz

    P/N PR315UA #ABA

    S/N CNF5020QT1

    I had entered the password password BIOS enter in the box, then again in the confirmation box.  I stopped and restarted the system and entered the password.  The system would not take the password I just entered.

    I received the error code: "system disabled Code 00291".   I was not able to enter the system.  I released the 100 GB hard drive and replaced by another HD 160 GB that had the original MS Media Center Edition 2005 top and restarted the system.  I got the same error code.

    Please provide instructions on how to start the system.  The system doesn't have a floppy drive.  How can I get the system to set the boot order sequence to leave the cd rom drive and be the first boot device and then Player 8 GB flash as the second boot device, the hard disk as the third boot device?

    No other changes was to the prior agreement of the system to set up the BIOS or security password.

    I tried to password protect the system to prevent my young daughter to access.  She broke down 4 systems in which I had reload and configure each of them. Now, I fell it.

    Please help me! Send replies to [email protected]

    Hi John,.

    You must open a session an official request to support lines HP (phone/email), provide them with a proof of ownership of the product, authority letter and hash code global disable. the post, HP can give you another password that unlocks the BIOS and you can set the password again.

    It will be useful.

    Kind regards

    Waseem,

    I work for HP.

    * Click on the star of CONGRATULATIONS on the left say "thank you."
    Make it easier for others to find solutions by checking a response "Accept as Solution" if it solves your problem.

  • HOWTO: Disable persistent DPD on SAA

    Hello...

    I have remote access IPSec VPN configuration (ASA 7.1 on 1 side - customer VPN v 5.0 on the other end) and I have a question where the connection is down regardless if it is traffic sent through the tunnel or not!

    The tunnel remains during different periods of time, but in the end it dropps!

    I gather the following ASA error message:

    ASA-EVOTO #.

    PIX % | ASA-3-713123: IKE has lost contact with the remote peer, removal of connection (type keepalive: DPD)

    This message indicates that the remote peer IKE did not meet the persistent in the window of time, so the connection to the peer IKE was stopped.

    The message contains the mechanism used.

    So, is there a way to disable persistent between the VPN Client and the plateau of the ASA?

    What else could solve this problem

    Thank you very much

    Hello

    'disable isakmp keepalive' in a Tunnel Group Configuration.

    http://www.Cisco.com/en/us/docs/security/ASA/asa72/command/reference/i3_72.html#wp1732140

    Kind regards

    Arul

    * Rate pls if it helps *.

  • When I open thunderbird my graphics card time raise when I close the drop of time. SOLVED by disabling HWA

    When I open thunderbird my graphics card time raise when I close the drop of time
    I tried to re install thunderbird but the problem persists

    Does make a difference if you disable hardware acceleration?

    https://support.Mozilla.org/en-us/questions/1012145

    http://www.askvg.com/how-to-disable-hardware-acceleration-GPU-rendering-in-Mozilla-Firefox-4-0-to-fix-font-problem/

  • Pop - up to remove after pressing rejects three times (howto disable)

    Whenever I reject 3 pictures in a row (by pressing X), I get a boring pop asking me to "remove selected photo form the disc or only from Lightroom". The options are remove the disc / cancel / remove

    Schermafbeelding 2016-08-28 om 09.10.17.png

    I have no idea why this pop-up shows after only three rejected images every time? It's annoying because I have to press on enter it each time.
    Someone has any idea how to disable this question?

    This topic can be closed. The problem had nothing to do with Lightroom. The problem occurred because I had a shortcut in TextExpander that triggered when you press xxx. It is strange that the x - are are treated as if they were text in lightroom and so activatie TextExpander. After you delete the shortcut in TextExpander, the problem is resolved.

  • HOWTO disable a button within the APEX?

    This may seem like APEX for Dummies, but I currently have a problem with presenting a plain old HTML in the APEX in mode button disabled (not clickable). In HTML, this is no problem when you use 'disabled', but in the APEX, it does not work because the apex"disabled =" off "disabled".

    1. How can I display the button in a status of "disabled" in the APEX?

    2. How can I dynamically determine whether the button should be displayed as disabled or not?

    Any help is appreciated.

    Hello

    I did something very similar recently (and to be honest, the methodology is very close to what Riedelme suggested already):

    (1) create an item hidden in the area containing the keys to be turned off (make sure it's AFTER the buttons you want to disable)
    (2) in the message text of the element element field, enter Javascript to disable the button (s) - for example:

    (3) set the conditional display of this point on the result of a PL/SQL function returns BOOLEAN - in this case, it would be your authorization feature, or whatever. Or you can use regardless of the conditional formula meets your configuration.

    In this way, every time this hidden item is loaded i.e. authorization fails for example, the javascript code snippet will be loaded and executed, and your buttons will be disabled!

    Hope that makes sense!

    Chris

  • Thunderbird is stuck does not. even in safe mode. (win7) SOLVED by disabling Windows prefetch and superfetch services

    Thunderbird is stuck in the mode "not responding". I tried various fixes suggested on the web, such as restarting in safe mode, using Thunderfix and except on records of Thunderbird to antivirus scans, but nothing works. FYI, my antivirus is Norton Internet Security. I hope someone can help. Thank you.

    You could take a little further...

    Please start * Windows * safe mode with active network
    -win8 http://windows.microsoft.com/en-us/windows-8/windows-startup-settings-safe-mode
    -win7 http://windows.microsoft.com/en-us/windows/start-computer-safe-mode#start-computer-safe-mode=windows-7

    Always in Windows safe mode, start thunderbird in safe mode
    - http://support.mozillamessaging.com/en-US/kb/safe-mode

    Problem disappear?
    Just reply to inform us of the results.

  • HOWTO disable writeback = flashcacheMode

    Hello

    I am trying to turn off the flash new write cache feature that came with the last patch Exadata on our neighborhood CARS X 2 - 2
    The procedure that I follow is described below:

    1 CellCLI > change the cell flashcache all RAS

    2 CellCLI > drop flashcache

    3 CellCLI > change the cell stop services cellsrv

    4 CellCLI > change the flashCacheMode = Writethrough cell

    5 CellCLI > change the startup services cellsrv cell

    My problem is that when I'm running 1. I get a syntax error.
    The doc only I could find that describes how to get back the writeback mode is

    http://www.unitask.com/oracledaily/2012/10/01/Exadata-X3-11-2-3-2-and-Oracle-Platinum-Services-2/

    968901 wrote:
    Hello

    I am trying to turn off the flash new write cache feature that came with the last patch Exadata on our neighborhood CARS X 2 - 2
    The procedure that I follow is described below:

    1 CellCLI > change cell flashcache all RAS

    2 CellCLI > drop flashcache

    3 CellCLI > change cell stop services cellsrv

    4 CellCLI > change the flashCacheMode = Writethrough cell

    5 CellCLI > change cell starting services cellsrv

    My problem is that when I'm running 1. I get a syntax error.
    The doc only I could find that describes how to get back the writeback mode is

    http://www.unitask.com/oracledaily/2012/10/01/Exadata-X3-11-2-3-2-and-Oracle-Platinum-Services-2/

    ALTER FLASHCACHE ALL RAS

  • [Solved] Research of firewall rule allowing Windows Update

    The problem has been resolved here: https://social.technet.microsoft.com/Forums/en-US/62b9fd5c-10b2-4266-bc15-fcf3e79d20d4/solved-windows-firewall-rule-that-allows-windows-update?forum=w7itpronetworking

    Everything down here is obsolete. (But you can read the true story about the virus of Bagel).

    Someone at - it an outbound Windows Firewall rule allowing Windows Update?

    Details.

    Yesterday, I tried to run Windows Update. The rule of outbound firewall to allow Windows Update to get through, I added was:

    Name: Allow Windows Update
    Group:
    Profile: Public
    Activated: Yes
    Action: allow
    Program: %SystemRoot%\System32\wuapp.exe
    Local address: no
    Remote address: all
    Protocol: all
    The local railway: no
    Remote port: any
    Computers permit: all

    I got 10 updates to install and all 10 failed. The only way that they have all been able to fail is: '% SystemRoot%\System32\wuapp.exe' is the wrong program, OR "wuapp.exe" passes control to another program, I don't know.

    Can anyone help me with this? I'll be forever grateful if you can.

    Note that I had to fall back to the default settings (see 'Background', below) in order to succeed and who has not made me happy.

    Background.

    Despite what you think it means, "outbound connections (green check mark) that do not match a rule are allowed" (which is the default) means only, unless you went to the extreme penalty to create the blocking rules, the firewall is wide open for outbound - connections, essentially, you have no firewall for outbound connections. " That means, 1, if you have a Trojan horse on your computer that is looking to download his main-payload of viruses in your computer (see "A history of real virus", below), or 2, if you have a virus keylogger in your computer who wants to 'phone home' him make his Masters criminal of your online banking user name & password There is absolutely nothing to stop.

    That's why I put my firewall: "(entry not red) outbound connections that do not match a rule are blocked".

    A story real virus.

    A couple of years ago, I visited a well known web site that had been hijacked - was - it cnet? I think so. The site seemed basically OK, but something made me shy away. I've left without clicking anything whatsoever. But the visitor of this site (with active javascript) transferred a Trojan horse in my computer (i.e. "Trojan", below).

    Once it was in my computer, the Trojan horse, then went through my firewall, out - was my firewall zonealarm at this time? I think so - and downloaded Bagel, a key logger to rootkit.

    I had no warning of the firewall as the Trojan horse used a well-known port that was wide open, and I had no antivirus warning because Bagel does not change any existing program. It uses the unallocated file space, patched itself in the initialization string, charged before the mode protected of windows at the next startup and reprogrammed the hardware memory to hide its presence in memory. It took me 2 months to discover Bagel and another 4 months to get rid of him. It was hell. My keyboard and mouse acted constantly upward. I didn't a bank online at this time. If I had, I'm sure that my account would have been cleaned up because that's what Bagel. It's a keylogger monitoring keyboard and browser waits to catch a connection to the Bank.

    Details of Trojan.

    The Trojan horse was a javascript function which ran automatically when the page is loaded. He created a table (similar to a mathematical object matrix) made up of identical over 1 million members of the group. Each Member of the Group was a short string of numbers. As it looped to add table-members, the Trojan horse later (in fractions of a second) overflowed the heap memory management hardware had allocated to my browser. That overflow has partially replaced the next higher segment in memory - which is called a "violation of the limits", and Yes, it is possible, if you position the base register just below the upper part of your segment and then use a large lag. There was a flaw in Windows that could not detect this type of violation of the limits and Bagel is designed to exploit this vulnerability. But the story does not stop there. To take control, the short string of numbers in a table-member of the "wrong"side of this segment limit had to be performed. Now, it of the roll of the dice that viruses are facing, but if the program that was partly crushed is always loaded in memory and running and if it executes the code at the bottom of its segment, then - Voila! -the virus takes control of the timeslice allocated to the program that was partly crushed. In other words, the program that was partly crushed no longer control, the virus is in control. So, what did the do Trojan horse? Completely in the background and without any idea for me, he went to a web site in Ukraine and downloaded the main payload of Bagel. How do I know all this? I looked at the javascript trojan and I disassembled - disassembly is as kind of decoding - the payload of Bagel (the rootkit) that I saved after I found some 6 months later. I still have the payload of Bagel sequestered in a zip in quarantine - in fact, I have a menagerie of dozens of viruses that I use to test antivirus programs.

    Hi Mark,

    Please keep us updated on the issue.

    I ask that you continue to try the suggestions in this article because the information in the article is good for Windows 7 as well.

    Please let us know the result.

  • Add VMS to DRS rule

    I'm working on a script and a cmdlet PowerCLI already seems to be written for her. The script adds an existing virtual machine to an existing Rule DRS.

    Here's the code for the cmdlet that I want to reproduce:

    $spec = New-Object VMware.Vim.ClusterConfigSpecEx
    $spec .groupSpec = New-Object VMware.Vim.ClusterGroupSpec[] (1)
    $spec .groupSpec [0] = New-Object VMware.Vim.ClusterGroupSpec
    $spec .operation .groupSpec [0] = "edit"
    $spec .groupSpec [0] .info = $DrsGroup
    $spec . info.vm .groupSpec [0] += $VM. ExtensionData.MoRef

    $Cluster . ExtensionData.ReconfigureComputeResource_Task ($spec $true( )


    To my knowledge, something along the following lines can be done to translate this in Perl:

    1. create a ClusterGroupSpec object with the correct information. I don't here and am not sure how to add "info.vm" in ClusterGroupSpec in Perl.

    My $cluster_group_spec = ClusterGroupSpec-> new (operation = > 'Edit', info = > $drs_rule_name)


    2. pass this as an object of ClusterConfigSpecEx in rulesSpec

    My $cluster_config_spec = ClusterConfigSpecEx-> new (rulesSpec = > [$cluster_group_spec]);


    3 reconfigure with spec as $cluster_config_spec.


    What I'm confused about is how to pass to info. VM of the PowerCLI. There is no member of the info or ClusterConfigInfo called "vm". How I would say the group specification which VM use?



    Updated the title to be more informative (it is no longer just a 'translation', the thread now contains the answer to the title).

    Adding/changing operations are for groups, but the contents of the group will be just changes to the low level table.

    Take a look at the example attached script, I tested it and its work.  Basically, the logic is the same, the difference is you change the group, but just add the moref vm virtual machine that you want to add to the group by simply sending an updated table of the vm morefs.

    Perl addVm2DrsGroup.pl - server = pass 172.16.254.50--username=administrator@vlab--mot = * - cluster = CLU01 - drsgroup = group1 - vm = recovery-03

  • Automate adding to DRS affinity rule

    Is it possible to add automatically as a new virtual machine created in a specific to his Rule DRs Cluster?

    Here we have 2 rules of affinity in the same cluster and all VMV that would be created it needs to adhere to a rule.

    To change the rule:

    game-drsrule-rule (get-drsrule-cluster (cluster-get "Mycluster") - name "MyRule")-VM $MyVM - Enabled $true

    Everything is possible with PowerCLI

    Seriously, you want to detect the virtual machines in a cluster that are not in a rule of DRS, correct?

    When you detect VMs DRS article they should be added?

  • Migration of affinity groupings through DRS rules?

    Hello

    We do a few migrations and I would copy the rules drs affinity from one cluster to another - is it possible? or more precisely is it possible easily?

    TIA

    It is not a standard feature in vCenter, but you can achieve with the VI toolkit. The excellent LucD wrote a script to export and import rules, take a look at the bottom of the following topic:

    http://communities.VMware.com/message/1200272

    Duncan

    VMware communities user moderator

    -

  • MSCS on an active DRS Cluster HA?

    Hi all

    We are setting up a 6 host DRS activated cluster HA with a host as the host of the previous day. Two of our virtual machines will run MSCS cluster (with active and passive node). What we want is that:

    1 - Normal VM must be restarted on a host sleep by using cluster HA when an ESX fails.

    2 VM Normal should be vMotioned DRS decides.

    3 clusterises MSCS VM should restart on a host sleep by using cluster HA when an ESX fails.

    4 MSCS group of VM should not be vMotioned automatically. Must reside on the specific host.

    Are higher than 4 point if possible please confirm how we do. I'm a little confused that as per below document MSCS is not supported on active DRS cluster.

    http://KB.VMware.com/selfservice/microsites/search.do?language=en_US & cmd = displayKC & externalId = 1037959

    Kind regards

    Khurram Shahzad

    According to the doc of vmware, the installation program for the Clustering failover and Microsoft Cluster Service to Vsphere5 no problem when you use the DRS and HA together. but it takes only

    1 - two nodes must never operate in a single host for HA and DRS
    2. to do this you must create the rules below

    -HA, create a host of DRS group, and then create a group of Virtual Machine DRS, then A VM host affinity rule must be created, with a group of virtual machine DRS and a host of the DRS group.
    -DRS, create anti - affinity machine VM-virtual rules specify which virtual machines should be stored on different physical hosts and turn on strict application of the law of affinity rules virtual machine configuration

    Or you can also disable the DRS for these 2 nodes and enable only HA, but even once you must ensure for HA 2 nodes never operate in an ESXi host

    See books of installation for Failover Clustering and the Microsoft Cluster Service to Vsphere5 and vsphere-esxi-vcenter-server-501-resource-management-guide

  • HA/DRS and a Cluster of 10 ESX host

    Hello

    I would appreciate comments on best practices for HA and DRS configuration on the following configuration:

    • We have a cluster of 10 ESX host

    • 2 guests are related ONLY to datastore1

    • 8 guests are related ONLY to datastore2

    • All hosts are available and active in Lab Manager 3.02

    • We use no fences of network

    The questions are:

    1. If one of the hosts in the 'group' of 8 guests above fails, HA will restart the virtual machines on the 7 remaining or it will try to start on one of the 2 hosts in the different 'group' (which have no connectivity to datastore2). Please note that I use the term "group" to highlight the hosts connected to separate data warehouses.

    2. can we or must activate us DRS about this group in a perspective of Lab Manager? Even if we have a maximum of 8 hosts connected on the same VMFS volume, are we exceeding any rule DRS here?

    Thank you

    gogogo5

    My best guess is that most should all magically work.

    DRS won't even try to break you, he will always recommend you only migrants who are indeed possible.

    Yes, normally I too would advocate this split into two different groups, but with the problem, they do not need to be joined (you have configurations for which a VM MUST go on 2 and the rest MUST go to the 8, and indeed, LM will refuse to cross pools of resources to achieve).

    If disable you completely the DRS, LabManager uses a variant of the old (pre - 3.0) algorithms to try to find the compatible host less loaded (at deploy time) and put it there.

    I'm too uncertain and curious about the HA situation. I have a feeling would be deeply confused on a default installation, it could be implemented, but it would be difficult to make the right constraints.

Maybe you are looking for