Automation

 View Only
  • 1.  Edit settings for several VMs

    Posted Jul 12, 2010 12:08 PM

    Hi,

    I am searching for a script capable of changing a specific setting for several VM, do you know if someone has already developed something like that? I posted into the PowerCLI forum but if it's possible in another language, i am interested :smileyhappy:

    Thanks,

    Syl



  • 2.  RE: Edit settings for several VMs

    Posted Jul 12, 2010 12:19 PM

    Hi Syl,

    you can use PowerCLI to change a specific setting on multiple VM's. For example to change the number of virtual CPU's from one to two on all VM's in cluster MyCluster you can do something like:

    Get-Cluster MyCluster | Get-VM | Where-Object {$_.NumCPU -eq 1} | Set-VM -NumCPU 2
    

    Which setting do you want to change?

    Regards, Robert



  • 3.  RE: Edit settings for several VMs

    Posted Jul 12, 2010 12:28 PM

    Thanks you for your quick reply, in fact I would like to not select all the VM of a cluster... maybe this command is working with a ressource pool?

    I would like to change:

    -Number of vCPU

    -Memory

    CPU and RAM affinity in the Ressources tab:

    -Advanced CPU

    -Advanced Memory

    Regards, Syl



  • 4.  RE: Edit settings for several VMs

    Posted Jul 12, 2010 01:38 PM

    I found the way to change vCPU and memory to a ressource pool and it works perfectly thanks :smileyhappy:

    Now I just miss the CPU/memory affiinity setting...



  • 5.  RE: Edit settings for several VMs

    Posted Jul 12, 2010 01:49 PM

    Have a look at the Set-VMResourceConfiguration cmdlet for the CPU affinity.

    ____________

    Blog: LucD notes

    Twitter: lucd22



  • 6.  RE: Edit settings for several VMs

    Posted Jul 12, 2010 12:20 PM

    Not sure what settings you'd like to change, but here's a link to changing a VMs advance settings. Sites of interest might be:

    http://wannemacher.us/

    http://www.lucd.info/

    Community Supported, Community Rewarded - Please consider marking questions answered and awarding points to the correct post. It helps us all.