<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic change drs settings for a specific vm in VMware Aria Automation Orchestrator Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389049#M1232</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I’m having an intermittent problem when deploying vms from orchestrator and it appears it may be related to vmotion happening at a bad time in the process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From a few posts on the forums and with the help of Onyx, I think I have some working code but I'm afraid to try it in case I mess up my cluster settings. Can someone take a look and let me know what they think?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Onyx generated code has a lot more (shown at the end for referece) options. If I don't include those options, will all my cluster settings be reset when trying to adjust one vm?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set drs settings on vm to manual:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var myKey = System.getModule("com.mycompany.actions").getVmIdByName("VM123") //this returns the .id property, as a string, of a VcVirtualMachine when passed the name&lt;BR /&gt;var spec = new VcClusterConfigSpecEx();&lt;BR /&gt;spec.drsVmConfigSpec = new Array(VcClusterDrsVmConfigSpec, 1);&lt;BR /&gt;spec.drsVmConfigSpec[0] = new VcClusterDrsVmConfigSpec();&lt;BR /&gt;spec.drsVmConfigSpec[0].operation = VcArrayUpdateOperation.add;&lt;BR /&gt;spec.drsVmConfigSpec[0].info = new VcClusterDrsVmConfigInfo();&lt;BR /&gt;spec.drsVmConfigSpec[0].info.key = Server.findForType("VC:VirtualMachine", managedObject.vimHost.id + "/"+myKey+"\"");;&lt;BR /&gt;spec.drsVmConfigSpec[0].info.behavior = VcDrsBehavior.manual;&lt;/P&gt;&lt;P&gt;managedObject.reconfigureComputeResource_Task(spec, true);&amp;nbsp; // ClusterComputeResource&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;to remove the custom setting:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var myKey = System.getModule("com.mycompany.actions").getVmIdByName("VM123") //this returns the .id property, as a string, of a VcVirtualMachine when passed the name&lt;BR /&gt;var spec = new VcClusterConfigSpecEx();&lt;BR /&gt;spec.drsVmConfigSpec = new Array(VcClusterDrsVmConfigSpec, 1);&lt;BR /&gt;spec.drsVmConfigSpec[0] = new VcClusterDrsVmConfigSpec();&lt;BR /&gt;spec.drsVmConfigSpec[0].operation = VcArrayUpdateOperation.remove;&lt;BR /&gt;spec.drsVmConfigSpec[0].removeKey = myKey;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code generated by onyx &lt;BR /&gt;var spec = new VcClusterConfigSpecEx();&lt;BR /&gt;spec.vmSwapPlacement = "vmDirectory";&lt;BR /&gt;spec.dasConfig = new VcClusterDasConfigInfo();&lt;BR /&gt;spec.dasConfig.vmMonitoring = "vmMonitoringDisabled";&lt;BR /&gt;spec.dasConfig.defaultVmSettings = new VcClusterDasVmSettings();&lt;BR /&gt;spec.dasConfig.defaultVmSettings.restartPriority = "medium";&lt;BR /&gt;spec.dasConfig.defaultVmSettings.isolationResponse = "none";&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings = new VcClusterVmToolsMonitoringSettings();&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.enabled = true;&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.vmMonitoring = "vmMonitoringDisabled";&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.failureInterval = 30;&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.minUpTime = 120;&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.maxFailures = 3;&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.maxFailureWindow = 3600;&lt;BR /&gt;spec.dasConfig.option = System.getModule("com.vmware.onyx").array(VcOptionValue, 1);&lt;BR /&gt;spec.dasConfig.option[0] = new VcOptionValue();&lt;BR /&gt;spec.dasConfig.option[0].key = "das.ignoreRedundantNetWarning";&lt;BR /&gt;spec.dasConfig.option[0].value = true;&lt;BR /&gt;spec.drsConfig = new VcClusterDrsConfigInfo();&lt;BR /&gt;spec.drsConfig.enabled = true;&lt;BR /&gt;spec.drsConfig.defaultVmBehavior = VcDrsBehavior.fullyAutomated;&lt;BR /&gt;spec.drsConfig.vmotionRate = 2;&lt;BR /&gt;spec.drsVmConfigSpec = System.getModule("com.vmware.onyx").array(VcClusterDrsVmConfigSpec, 1);&lt;BR /&gt;spec.drsVmConfigSpec[0] = new VcClusterDrsVmConfigSpec();&lt;BR /&gt;spec.drsVmConfigSpec[0].operation = VcArrayUpdateOperation.add;&lt;BR /&gt;spec.drsVmConfigSpec[0].info = new VcClusterDrsVmConfigInfo();&lt;BR /&gt;spec.drsVmConfigSpec[0].info.key = Server.findForType("VC:VirtualMachine", managedObject.vimHost.id + "/vm-1598");;&lt;BR /&gt;spec.drsVmConfigSpec[0].info.enabled = true;&lt;BR /&gt;spec.drsVmConfigSpec[0].info.behavior = VcDrsBehavior.manual;&lt;BR /&gt;spec.dpmConfig = new VcClusterDpmConfigInfo();&lt;BR /&gt;spec.dpmConfig.enabled = false;&lt;BR /&gt;spec.dpmConfig.hostPowerActionRate = 3;&lt;/P&gt;&lt;P&gt;managedObject.reconfigureComputeResource_Task(spec, true);&amp;nbsp; // ClusterComputeResource&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Oct 2013 16:43:02 GMT</pubDate>
    <dc:creator>FreddyFredFred</dc:creator>
    <dc:date>2013-10-04T16:43:02Z</dc:date>
    <item>
      <title>change drs settings for a specific vm</title>
      <link>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389049#M1232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I’m having an intermittent problem when deploying vms from orchestrator and it appears it may be related to vmotion happening at a bad time in the process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From a few posts on the forums and with the help of Onyx, I think I have some working code but I'm afraid to try it in case I mess up my cluster settings. Can someone take a look and let me know what they think?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Onyx generated code has a lot more (shown at the end for referece) options. If I don't include those options, will all my cluster settings be reset when trying to adjust one vm?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set drs settings on vm to manual:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var myKey = System.getModule("com.mycompany.actions").getVmIdByName("VM123") //this returns the .id property, as a string, of a VcVirtualMachine when passed the name&lt;BR /&gt;var spec = new VcClusterConfigSpecEx();&lt;BR /&gt;spec.drsVmConfigSpec = new Array(VcClusterDrsVmConfigSpec, 1);&lt;BR /&gt;spec.drsVmConfigSpec[0] = new VcClusterDrsVmConfigSpec();&lt;BR /&gt;spec.drsVmConfigSpec[0].operation = VcArrayUpdateOperation.add;&lt;BR /&gt;spec.drsVmConfigSpec[0].info = new VcClusterDrsVmConfigInfo();&lt;BR /&gt;spec.drsVmConfigSpec[0].info.key = Server.findForType("VC:VirtualMachine", managedObject.vimHost.id + "/"+myKey+"\"");;&lt;BR /&gt;spec.drsVmConfigSpec[0].info.behavior = VcDrsBehavior.manual;&lt;/P&gt;&lt;P&gt;managedObject.reconfigureComputeResource_Task(spec, true);&amp;nbsp; // ClusterComputeResource&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;to remove the custom setting:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var myKey = System.getModule("com.mycompany.actions").getVmIdByName("VM123") //this returns the .id property, as a string, of a VcVirtualMachine when passed the name&lt;BR /&gt;var spec = new VcClusterConfigSpecEx();&lt;BR /&gt;spec.drsVmConfigSpec = new Array(VcClusterDrsVmConfigSpec, 1);&lt;BR /&gt;spec.drsVmConfigSpec[0] = new VcClusterDrsVmConfigSpec();&lt;BR /&gt;spec.drsVmConfigSpec[0].operation = VcArrayUpdateOperation.remove;&lt;BR /&gt;spec.drsVmConfigSpec[0].removeKey = myKey;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code generated by onyx &lt;BR /&gt;var spec = new VcClusterConfigSpecEx();&lt;BR /&gt;spec.vmSwapPlacement = "vmDirectory";&lt;BR /&gt;spec.dasConfig = new VcClusterDasConfigInfo();&lt;BR /&gt;spec.dasConfig.vmMonitoring = "vmMonitoringDisabled";&lt;BR /&gt;spec.dasConfig.defaultVmSettings = new VcClusterDasVmSettings();&lt;BR /&gt;spec.dasConfig.defaultVmSettings.restartPriority = "medium";&lt;BR /&gt;spec.dasConfig.defaultVmSettings.isolationResponse = "none";&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings = new VcClusterVmToolsMonitoringSettings();&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.enabled = true;&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.vmMonitoring = "vmMonitoringDisabled";&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.failureInterval = 30;&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.minUpTime = 120;&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.maxFailures = 3;&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.maxFailureWindow = 3600;&lt;BR /&gt;spec.dasConfig.option = System.getModule("com.vmware.onyx").array(VcOptionValue, 1);&lt;BR /&gt;spec.dasConfig.option[0] = new VcOptionValue();&lt;BR /&gt;spec.dasConfig.option[0].key = "das.ignoreRedundantNetWarning";&lt;BR /&gt;spec.dasConfig.option[0].value = true;&lt;BR /&gt;spec.drsConfig = new VcClusterDrsConfigInfo();&lt;BR /&gt;spec.drsConfig.enabled = true;&lt;BR /&gt;spec.drsConfig.defaultVmBehavior = VcDrsBehavior.fullyAutomated;&lt;BR /&gt;spec.drsConfig.vmotionRate = 2;&lt;BR /&gt;spec.drsVmConfigSpec = System.getModule("com.vmware.onyx").array(VcClusterDrsVmConfigSpec, 1);&lt;BR /&gt;spec.drsVmConfigSpec[0] = new VcClusterDrsVmConfigSpec();&lt;BR /&gt;spec.drsVmConfigSpec[0].operation = VcArrayUpdateOperation.add;&lt;BR /&gt;spec.drsVmConfigSpec[0].info = new VcClusterDrsVmConfigInfo();&lt;BR /&gt;spec.drsVmConfigSpec[0].info.key = Server.findForType("VC:VirtualMachine", managedObject.vimHost.id + "/vm-1598");;&lt;BR /&gt;spec.drsVmConfigSpec[0].info.enabled = true;&lt;BR /&gt;spec.drsVmConfigSpec[0].info.behavior = VcDrsBehavior.manual;&lt;BR /&gt;spec.dpmConfig = new VcClusterDpmConfigInfo();&lt;BR /&gt;spec.dpmConfig.enabled = false;&lt;BR /&gt;spec.dpmConfig.hostPowerActionRate = 3;&lt;/P&gt;&lt;P&gt;managedObject.reconfigureComputeResource_Task(spec, true);&amp;nbsp; // ClusterComputeResource&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 16:43:02 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389049#M1232</guid>
      <dc:creator>FreddyFredFred</dc:creator>
      <dc:date>2013-10-04T16:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: change drs settings for a specific vm</title>
      <link>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389050#M1233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;STRONG style="font-family: proxima-nova, Arial, sans-serif; color: #666666;"&gt;&lt;A href="https://communities.vmware.com/people/FreddyFredFred"&gt;FreddyFredFred&lt;/A&gt;,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tested you scripts on my test environment. The set DRS to manual should work without problems, I had to change something, cause I don't have your action "&lt;SPAN style="color: #666666; font-family: proxima-nova, Arial, sans-serif; font-size: 14px;"&gt;getVmIdByName&lt;/SPAN&gt;" but here my working code:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13811556232393374" jivemacro_uid="_13811556232393374"&gt;
&lt;P&gt;var myVcClusterComputeResource = myVcVirtualMachine.runtime.host.parent; //myVcVirtualMachine as Workflow/Scriptable Task input&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;var myVcClusterDrsVmConfigInfo = new VcClusterDrsVmConfigInfo() ;&lt;/P&gt;
&lt;P&gt;myVcClusterDrsVmConfigInfo.key = myVcVirtualMachine; //myVcVirtualMachine as Workflow/Scriptable Task input&lt;/P&gt;
&lt;P&gt;myVcClusterDrsVmConfigInfo.behavior = VcDrsBehavior.manual;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;var myVcClusterDrsVmConfigSpec = new VcClusterDrsVmConfigSpec() ;&lt;/P&gt;
&lt;P&gt;myVcClusterDrsVmConfigSpec.operation = VcArrayUpdateOperation.add;&lt;/P&gt;
&lt;P&gt;myVcClusterDrsVmConfigSpec.info = myVcClusterDrsVmConfigInfo;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;var myVcClusterDrsVmConfigSpecArray = new Array() ;&lt;/P&gt;
&lt;P&gt;myVcClusterDrsVmConfigSpecArray.push( myVcClusterDrsVmConfigSpec );&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;var myVcClusterConfigSpecEx = new VcClusterConfigSpecEx() ;&lt;/P&gt;
&lt;P&gt;myVcClusterConfigSpecEx.drsVmConfigSpec = myVcClusterDrsVmConfigSpecArray;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;myVcClusterComputeResource.reconfigureComputeResource_Task( myVcClusterConfigSpecEx, true );&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interesting fact: DRS is set to disabled and not to manual, but I think this works fine for you too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The set DRS to default again wont work for me. I tried it with this code:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13811557196852460" jivemacro_uid="_13811557196852460"&gt;
&lt;P&gt;var myVcClusterComputeResource = myVcVirtualMachine.runtime.host.parent; //myVcVirtualMachine as Workflow/Scriptable Task input&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;var myVcClusterDrsVmConfigSpec = new VcClusterDrsVmConfigSpec() ;&lt;/P&gt;
&lt;P&gt;myVcClusterDrsVmConfigSpec.operation = VcArrayUpdateOperation.remove;&lt;/P&gt;
&lt;P&gt;myVcClusterDrsVmConfigSpec.removeKey = myVcVirtualMachine.id; //myVcVirtualMachine as Workflow/Scriptable Task input&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;var myVcClusterDrsVmConfigSpecArray = new Array() ;&lt;/P&gt;
&lt;P&gt;myVcClusterDrsVmConfigSpecArray.push( myVcClusterDrsVmConfigSpec );&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;var myVcClusterConfigSpecEx = new VcClusterConfigSpecEx() ;&lt;/P&gt;
&lt;P&gt;myVcClusterConfigSpecEx.drsVmConfigSpec = myVcClusterDrsVmConfigSpecArray;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;myVcClusterComputeResource.reconfigureComputeResource_Task( myVcClusterConfigSpecEx, false );&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works in vCO but in vCenter there is an error which says: A specified parameter was not correct. Maybe your try it with a new onyx session, post the code and I will test it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 14:23:49 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389050#M1233</guid>
      <dc:creator>ChristianWehner</dc:creator>
      <dc:date>2013-10-07T14:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: change drs settings for a specific vm</title>
      <link>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389051#M1234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, how do I get that pretty numbered line code in my post? &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.vmware.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm having trouble getting your code to work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added this line at the top&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var myVcVirtualMachine = System.getModule("org.mycompany.actions").getVmIdByName(in1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my getVmIdByName (modified to work with your code) is basically just&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;return System.getModule("com.vmware.library.vc.vm").getAllVMsMatchingRegexp(vmname);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I run it, i get he following error:&lt;/P&gt;&lt;P&gt;TypeError: Cannot read property "parent" from undefined (Workflow:testing 2 / Scriptable task (item0)#4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I can't figure it why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the Onyx code to remove the custom option&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// ------- ReconfigureComputeResource_Task -------&lt;/P&gt;&lt;P&gt;var spec = new VcClusterConfigSpecEx();&lt;BR /&gt;spec.vmSwapPlacement = "vmDirectory";&lt;BR /&gt;spec.dasConfig = new VcClusterDasConfigInfo();&lt;BR /&gt;spec.dasConfig.vmMonitoring = "vmMonitoringDisabled";&lt;BR /&gt;spec.dasConfig.defaultVmSettings = new VcClusterDasVmSettings();&lt;BR /&gt;spec.dasConfig.defaultVmSettings.restartPriority = "medium";&lt;BR /&gt;spec.dasConfig.defaultVmSettings.isolationResponse = "none";&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings = new VcClusterVmToolsMonitoringSettings();&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.enabled = true;&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.vmMonitoring = "vmMonitoringDisabled";&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.failureInterval = 30;&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.minUpTime = 120;&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.maxFailures = 3;&lt;BR /&gt;spec.dasConfig.defaultVmSettings.vmToolsMonitoringSettings.maxFailureWindow = 3600;&lt;BR /&gt;spec.dasConfig.option = System.getModule("com.vmware.onyx").array(VcOptionValue, 1);&lt;BR /&gt;spec.dasConfig.option[0] = new VcOptionValue();&lt;BR /&gt;spec.dasConfig.option[0].key = "das.ignoreRedundantNetWarning";&lt;BR /&gt;spec.dasConfig.option[0].value = true;&lt;BR /&gt;spec.drsConfig = new VcClusterDrsConfigInfo();&lt;BR /&gt;spec.drsConfig.enabled = true;&lt;BR /&gt;spec.drsConfig.defaultVmBehavior = VcDrsBehavior.fullyAutomated;&lt;BR /&gt;spec.drsConfig.vmotionRate = 2;&lt;BR /&gt;spec.drsVmConfigSpec = System.getModule("com.vmware.onyx").array(VcClusterDrsVmConfigSpec, 1);&lt;BR /&gt;spec.drsVmConfigSpec[0] = new VcClusterDrsVmConfigSpec();&lt;BR /&gt;spec.drsVmConfigSpec[0].operation = VcArrayUpdateOperation.remove;&lt;BR /&gt;spec.drsVmConfigSpec[0].removeKey = vm-1598;&lt;BR /&gt;spec.dpmConfig = new VcClusterDpmConfigInfo();&lt;BR /&gt;spec.dpmConfig.enabled = false;&lt;BR /&gt;spec.dpmConfig.hostPowerActionRate = 3;&lt;/P&gt;&lt;P&gt;managedObject.reconfigureComputeResource_Task(spec, true);&amp;nbsp; // ClusterComputeResource&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 20:13:35 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389051#M1234</guid>
      <dc:creator>FreddyFredFred</dc:creator>
      <dc:date>2013-10-07T20:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: change drs settings for a specific vm</title>
      <link>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389052#M1235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parent is only working on a VcVirtualMachine and not on a VcVirtualMachine.key thats your problem. If you give a VcVirtualMachine as Input its working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code to set it default again will I test later this day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 09:29:03 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389052#M1235</guid>
      <dc:creator>ChristianWehner</dc:creator>
      <dc:date>2013-10-08T09:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: change drs settings for a specific vm</title>
      <link>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389053#M1236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's what I figured based on the comment in your code. Below is the exact code I'm running and I still get the error about parent being undefined. I even changed it so I select the virtual machine (VC:VirtualMachine) for input but I still get the same error: cannot read property "parent" from undefinied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the workflow, in1 is a string and I type in the name of the VM I want to adjust.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var myVcVirtualMachineArray = System.getModule("com.vmware.library.vc.vm").getAllVMsMatchingRegexp(in1);&lt;/P&gt;&lt;P&gt;var myVcVirtualMachine=myVcVirtualMachineArray[0];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;var myVcClusterComputeResource = myVcVirtualMachine.runtime.host.parent; //myVcVirtualMachine as Workflow/Scriptable Task input&amp;nbsp; &lt;/P&gt;&lt;P&gt;var myVcClusterDrsVmConfigInfo = new VcClusterDrsVmConfigInfo() ;&amp;nbsp; &lt;BR /&gt;myVcClusterDrsVmConfigInfo.key = myVcVirtualMachine; //myVcVirtualMachine as Workflow/Scriptable Task input&amp;nbsp; &lt;BR /&gt;myVcClusterDrsVmConfigInfo.behavior = VcDrsBehavior.manual;&amp;nbsp; &lt;BR /&gt;var myVcClusterDrsVmConfigSpec = new VcClusterDrsVmConfigSpec() ;&amp;nbsp; &lt;BR /&gt;myVcClusterDrsVmConfigSpec.operation = VcArrayUpdateOperation.add;&amp;nbsp; &lt;BR /&gt;myVcClusterDrsVmConfigSpec.info = myVcClusterDrsVmConfigInfo;&amp;nbsp; &lt;BR /&gt;var myVcClusterDrsVmConfigSpecArray = new Array() ;&amp;nbsp; &lt;BR /&gt;myVcClusterDrsVmConfigSpecArray.push( myVcClusterDrsVmConfigSpec );&amp;nbsp; &lt;BR /&gt;var myVcClusterConfigSpecEx = new VcClusterConfigSpecEx() ;&amp;nbsp; &lt;BR /&gt;myVcClusterConfigSpecEx.drsVmConfigSpec = myVcClusterDrsVmConfigSpecArray;&amp;nbsp; &lt;BR /&gt;myVcClusterComputeResource.reconfigureComputeResource_Task( myVcClusterConfigSpecEx, true );&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added the following to see what vCO was getting:&lt;/P&gt;&lt;P&gt;System.log(myVcVirtualMachine.runtime);&lt;/P&gt;&lt;P&gt;System.log(myVcVirtualMachine.runtime.host);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this is what is says&lt;/P&gt;&lt;P&gt;[I] DynamicWrapper (Instance&lt;/P&gt;&lt;P&gt;) : [VcVirtualMachineRuntimeInfo]-[class com.vmware.vim.vi4.VirtualMachineRuntimeInfo] -- VALUE : com.vmware.vim.vi4.VirtualMachineRuntimeInfo@b2eded3f&lt;/P&gt;&lt;P&gt;[I] undefined&lt;/P&gt;&lt;P&gt;[I] TypeError: Cannot read property "parent" from undefined (Workflow:testing 2 / Scriptable task (item0)#8)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so it can't even figure out the host in this case&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 14:00:49 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389053#M1236</guid>
      <dc:creator>FreddyFredFred</dc:creator>
      <dc:date>2013-10-08T14:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: change drs settings for a specific vm</title>
      <link>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389054#M1237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you take a look to &lt;A href="https://yourvcenter.domain.com/mob"&gt;https://yourvcenter.domain.com/mob&lt;/A&gt; navigate to the VM you want to reconfigure and take a look to the runtime information?! &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I see there the host system the VM is registered on.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 10:16:01 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389054#M1237</guid>
      <dc:creator>ChristianWehner</dc:creator>
      <dc:date>2013-10-09T10:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: change drs settings for a specific vm</title>
      <link>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389055#M1238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The set DRS to fully automated part is still not running. It seems like I've been missing something. Here the code I test, maybe it is running on your environment:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13813195646493091" jivemacro_uid="_13813195646493091"&gt;
&lt;P&gt;var myVcClusterComputeResource = myVcVirtualMachine.runtime.host.parent; //myVcVirtualMachine as Workflow/Scriptable Task input&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;var myVcClusterDrsConfigInfo = new VcClusterDrsConfigInfo() ;&lt;/P&gt;
&lt;P&gt;myVcClusterDrsConfigInfo.enabled = true;&lt;/P&gt;
&lt;P&gt;myVcClusterDrsConfigInfo.defaultVmBehavior = VcDrsBehavior.fullyAutomated;&lt;/P&gt;
&lt;P&gt;myVcClusterDrsConfigInfo.vmotionRate = 2;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;var myVcClusterDrsVmConfigSpec = new VcClusterDrsVmConfigSpec() ;&lt;/P&gt;
&lt;P&gt;myVcClusterDrsVmConfigSpec.operation = VcArrayUpdateOperation.remove;&lt;/P&gt;
&lt;P&gt;myVcClusterDrsVmConfigSpec.removeKey = myVcVirtualMachine.id; //myVcVirtualMachine as Workflow/Scriptable Task input&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;var myVcClusterDrsVmConfigSpecArray = new Array() ;&lt;/P&gt;
&lt;P&gt;myVcClusterDrsVmConfigSpecArray.push( myVcClusterDrsVmConfigSpec );&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;var myVcClusterConfigSpecEx = new VcClusterConfigSpecEx() ;&lt;/P&gt;
&lt;P&gt;myVcClusterConfigSpecEx.drsConfig = myVcClusterDrsConfigInfo;&lt;/P&gt;
&lt;P&gt;myVcClusterConfigSpecEx.drsVmConfigSpec = myVcClusterDrsVmConfigSpecArray;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;myVcClusterComputeResource.reconfigureComputeResource_Task( myVcClusterConfigSpecEx, true );&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you get the problem with the parent running &lt;img class="lia-deferred-image lia-image-emoji" src="https://communities.vmware.com/html/@DCF4E2F7991292CEECF250394DB2C2BC/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt; Please let me know the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 11:53:11 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389055#M1238</guid>
      <dc:creator>ChristianWehner</dc:creator>
      <dc:date>2013-10-09T11:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: change drs settings for a specific vm</title>
      <link>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389056#M1239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good news, bad news.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bad news is I still can't get the .parent to work and I'm not sure where to look with that /mob url you have me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The good news is it's working &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.vmware.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; Even the disable part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To work around the problem of finding the cluster, I used the following code. I use it elsewhere in my deploy workflow so I already have the cluster. I just need to make a small adjustment to get access to the variable (You may have been the one to give me the code below in one of my earlier posts actually)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var vCenters=VcPlugin.allSdkConnections;&lt;/P&gt;&lt;P&gt;//System.log (vCenters[0].name);&lt;/P&gt;&lt;P&gt;for each (vCenter in vCenters){&lt;/P&gt;&lt;P&gt; var clusters = vCenter.getAllClusterComputeResources();&lt;/P&gt;&lt;P&gt; for each (mycluster in clusters)&lt;/P&gt;&lt;P&gt; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; System.log(mycluster.name);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (mycluster.name=="Cluster02") //check included for future use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; cluster=mycluster; &lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for removing the key, I found the answer in this thread: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.vmware.com/thread/439832" title="https://communities.vmware.com/thread/439832"&gt;https://communities.vmware.com/thread/439832&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the code which seems to work (I commented out your DRSConfigInfo and it seems to work without that. I just don't want to set any DRS stuff in the workflow and forget about it one day if I reconfigure my cluster options)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var mo = new VcManagedObjectReference();&lt;BR /&gt;mo.type="VirtualMachine";&lt;BR /&gt;mo.value=myVcVirtualMachine.id;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var myVcClusterComputeResource = cluster; //myVcVirtualMachine as Workflow/Scriptable Task input&amp;nbsp; &lt;BR /&gt;var myVcClusterDrsConfigInfo = new VcClusterDrsConfigInfo() ;&amp;nbsp; &lt;BR /&gt;//myVcClusterDrsConfigInfo.enabled = true;&amp;nbsp; &lt;BR /&gt;//myVcClusterDrsConfigInfo.defaultVmBehavior = VcDrsBehavior.fullyAutomated;&amp;nbsp; &lt;BR /&gt;//myVcClusterDrsConfigInfo.vmotionRate = 2;&amp;nbsp; &lt;BR /&gt;var myVcClusterDrsVmConfigSpec = new VcClusterDrsVmConfigSpec() ;&amp;nbsp; &lt;BR /&gt;myVcClusterDrsVmConfigSpec.operation = VcArrayUpdateOperation.remove;&amp;nbsp; &lt;BR /&gt;myVcClusterDrsVmConfigSpec.removeKey = mo; &lt;BR /&gt;//myVcClusterDrsVmConfigSpec.removeKey = myVcVirtualMachine.id; //myVcVirtualMachine as Workflow/Scriptable Task input&amp;nbsp; &lt;BR /&gt;var myVcClusterDrsVmConfigSpecArray = new Array() ;&amp;nbsp; &lt;BR /&gt;myVcClusterDrsVmConfigSpecArray.push( myVcClusterDrsVmConfigSpec );&amp;nbsp; &lt;BR /&gt;var myVcClusterConfigSpecEx = new VcClusterConfigSpecEx() ;&amp;nbsp; &lt;BR /&gt;myVcClusterConfigSpecEx.drsConfig = myVcClusterDrsConfigInfo;&amp;nbsp; &lt;BR /&gt;myVcClusterConfigSpecEx.drsVmConfigSpec = myVcClusterDrsVmConfigSpecArray;&amp;nbsp; &lt;BR /&gt;myVcClusterComputeResource.reconfigureComputeResource_Task( myVcClusterConfigSpecEx, true );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for all your help Christian. Now to clean everything, integrate it and hope it still works. I will need to run two workflows in parallel to get this to work with my current setup due to using the built-in clone workflow. I'll be sure to post again if I have trouble &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.vmware.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 15:05:26 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389056#M1239</guid>
      <dc:creator>FreddyFredFred</dc:creator>
      <dc:date>2013-10-09T15:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: change drs settings for a specific vm</title>
      <link>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389057#M1240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;and a little followup.... my cluster workaround turned into a problem for my workflow. Turns out there's an action under com.vmware.library.vc.cluster called getComputeResourceOfVm which seems to be returning the cluster after I pass the VCVirtualMachine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 16:32:40 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389057#M1240</guid>
      <dc:creator>FreddyFredFred</dc:creator>
      <dc:date>2013-10-09T16:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: change drs settings for a specific vm</title>
      <link>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389058#M1241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice you got it running! *like* &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.vmware.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2013 08:17:31 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389058#M1241</guid>
      <dc:creator>ChristianWehner</dc:creator>
      <dc:date>2013-10-10T08:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: change drs settings for a specific vm</title>
      <link>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389059#M1242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm actually NOT getting your script to work...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="dp-highlighter"&gt;&lt;DIV class="bar"&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;OL class="dp-c" start="1"&gt;&lt;LI class="alt"&gt;&lt;SPAN&gt;&lt;SPAN class="keyword"&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; myVcClusterComputeResource = myVcVirtualMachine.runtime.host.parent; &lt;/SPAN&gt;&lt;SPAN class="comment"&gt;//myVcVirtualMachine as Workflow/Scriptable Task input&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN class="keyword"&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; myVcClusterDrsVmConfigInfo = &lt;/SPAN&gt;&lt;SPAN class="keyword"&gt;new&lt;/SPAN&gt;&lt;SPAN&gt; VcClusterDrsVmConfigInfo() ;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt"&gt;&lt;SPAN&gt;myVcClusterDrsVmConfigInfo.key = myVcVirtualMachine; &lt;SPAN class="comment"&gt;//myVcVirtualMachine as Workflow/Scriptable Task input&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;myVcClusterDrsVmConfigInfo.behavior = VcDrsBehavior.manual;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt"&gt;&lt;SPAN&gt;&lt;SPAN class="keyword"&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; myVcClusterDrsVmConfigSpec = &lt;/SPAN&gt;&lt;SPAN class="keyword"&gt;new&lt;/SPAN&gt;&lt;SPAN&gt; VcClusterDrsVmConfigSpec() ;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;myVcClusterDrsVmConfigSpec.operation = VcArrayUpdateOperation.add;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt"&gt;&lt;SPAN&gt;myVcClusterDrsVmConfigSpec.info = myVcClusterDrsVmConfigInfo;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN class="keyword"&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; myVcClusterDrsVmConfigSpecArray = &lt;/SPAN&gt;&lt;SPAN class="keyword"&gt;new&lt;/SPAN&gt;&lt;SPAN&gt; Array() ;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt"&gt;&lt;SPAN&gt;myVcClusterDrsVmConfigSpecArray.push( myVcClusterDrsVmConfigSpec );&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN class="keyword"&gt;var&lt;/SPAN&gt;&lt;SPAN&gt; myVcClusterConfigSpecEx = &lt;/SPAN&gt;&lt;SPAN class="keyword"&gt;new&lt;/SPAN&gt;&lt;SPAN&gt; VcClusterConfigSpecEx() ;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt"&gt;&lt;SPAN&gt;myVcClusterConfigSpecEx.drsVmConfigSpec = myVcClusterDrsVmConfigSpecArray;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;myVcClusterComputeResource.reconfigureComputeResource_Task( myVcClusterConfigSpecEx, &lt;SPAN class="keyword"&gt;true&lt;/SPAN&gt;&lt;SPAN&gt; );&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;PRE class="javascript" style="display: none;"&gt;var myVcClusterComputeResource = myVcVirtualMachine.runtime.host.parent; //myVcVirtualMachine as Workflow/Scriptable Task input
var myVcClusterDrsVmConfigInfo = new VcClusterDrsVmConfigInfo() ;
myVcClusterDrsVmConfigInfo.key = myVcVirtualMachine; //myVcVirtualMachine as Workflow/Scriptable Task input
myVcClusterDrsVmConfigInfo.behavior = VcDrsBehavior.manual;
var myVcClusterDrsVmConfigSpec = new VcClusterDrsVmConfigSpec() ;
myVcClusterDrsVmConfigSpec.operation = VcArrayUpdateOperation.add;
myVcClusterDrsVmConfigSpec.info = myVcClusterDrsVmConfigInfo;
var myVcClusterDrsVmConfigSpecArray = new Array() ;
myVcClusterDrsVmConfigSpecArray.push( myVcClusterDrsVmConfigSpec );
var myVcClusterConfigSpecEx = new VcClusterConfigSpecEx() ;
myVcClusterConfigSpecEx.drsVmConfigSpec = myVcClusterDrsVmConfigSpecArray;
myVcClusterComputeResource.reconfigureComputeResource_Task( myVcClusterConfigSpecEx, true );&lt;/PRE&gt;&lt;DIV style="display: none;"&gt; &lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I input the Cluster directly as well as the VM but what I get is :"Property or method 'key' not found on object VcClusterDrsVmConfigInfo"&lt;/P&gt;&lt;P&gt;which is BS as "key" is an Property of VcClusterDrsVmConfigInfo....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 10:47:11 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-Aria-Automation/change-drs-settings-for-a-specific-vm/m-p/389059#M1242</guid>
      <dc:creator>Windspirit</dc:creator>
      <dc:date>2014-01-10T10:47:11Z</dc:date>
    </item>
  </channel>
</rss>

