VMware Cloud Community
mumford
Contributor
Contributor
Jump to solution

VM Configuration Parameters

Is there any way to configure virtual machines configuration parameters globally? Instead of going into the VIC and changing each one? I have a lot of rules that need to apply to every VM in my environment.

Thanks,

Ryan

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You could do this for all your guests in the VC this way:

get-vm | %{
  $vm = $_ | Get-View

  $vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
  $vmConfigSpec.extraconfig += New-Object VMware.Vim.optionvalue
  $vmConfigSpec.extraconfig[0].Key = "isolation.tools.paste.disable"
  $vmConfigSpec.extraconfig[0].Value = "True"
  $vm.ReconfigVM($vmConfigSpec)
}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
7 Replies
paul_xtravirt
Expert
Expert
Jump to solution

You can use the VI Perl toolkit or powershell to easily script changes such as the ones you are likely wanting to make.

The powershell toolkit is probably the easiest to start with:

Perl Toolkit can be found here:

If you found this helpful, please consider awarding points

If you found this helpful, please consider awarding some points
0 Kudos
Troy_Clavell
Immortal
Immortal
Jump to solution

can you be a little more detailed. What exactly are you trying to accomplish?

0 Kudos
mumford
Contributor
Contributor
Jump to solution

One example would be to set the configuration parameter 'isolation.tools.paste.disable' with a value of 'true' for all VM's.

0 Kudos
mumford
Contributor
Contributor
Jump to solution

Does anyone have any insight on this?

0 Kudos
depping
Leadership
Leadership
Jump to solution

I will move your topic to the powershell section where LucD will be able to answer your question within 60 seconds...

Duncan

VMware Communities User Moderator

-


Blogging:

Twitter:

If you find this information useful, please award points for "correct" or "helpful".

LucD
Leadership
Leadership
Jump to solution

You could do this for all your guests in the VC this way:

get-vm | %{
  $vm = $_ | Get-View

  $vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
  $vmConfigSpec.extraconfig += New-Object VMware.Vim.optionvalue
  $vmConfigSpec.extraconfig[0].Key = "isolation.tools.paste.disable"
  $vmConfigSpec.extraconfig[0].Value = "True"
  $vm.ReconfigVM($vmConfigSpec)
}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
mumford
Contributor
Contributor
Jump to solution

Amazing.

Thank you so much.

0 Kudos