VMware Cloud Community
RanjnaAggarwal
VMware Employee
VMware Employee

Reduce the CPU and Memory Resources of Recovered VM in Recovery Site

How to reduce the CPU and Memory Resources of Recovered VM in Recovery Site in SRM automatically? is it possible?

Regards, Ranjna Aggarwal
0 Kudos
3 Replies
grace27
Enthusiast
Enthusiast

Hi

Welcome to communities.

You can limit CPU  by running esxtop and looking at %RDY and %MLMTD..

0 Kudos
RanjnaAggarwal
VMware Employee
VMware Employee

esxtop is not changing the vm configuration in recovery site it is only used to check the existing configuration.

Regards, Ranjna Aggarwal
0 Kudos
vNEX
Expert
Expert

Hello Ranjna,

this is possible by creating additional step inside desired Recovery Plan. It must be placed before any power-on steps for VMs...

Select RP click on Recovery steps tab ->  Select step 5. Power on Priority 1 VMs click Add step and configure it as below:

Image 10.png

In the PowerCLI script "Resource_change.ps1" specify which resources for which VMs have to be changed e.g.:

connect-viserver XZY --user XZY --password XZY get-vm <part or full name>* | Set-VM -MemoryMB "2048" -Confirm:$FALSE Disconnect-VIServer –Server XYZ-Confirm:$FALSE

All the files listed in "Content" window must be accessible on SRM server local drive so doublecheck the path...and files.

Ensure you have properly installed PowerShell (3.0) and PowerCLI (5.5) on the SRM server.

If you are uncomfortable to insert your credentials into the script as plaintext check this blog post:

Step 3: Decide on an authentication strategy.

How to run PowerCLI scripts from vCenter Alarms. | VMware PowerCLI Blog - VMware Blogs

Message was edited by: vNEX

_________________________________________________________________________________________ If you found this or any other answer helpful, please consider to award points. (use Correct or Helpful buttons) Regards, P.
0 Kudos