VmWare vSphere Library - Modify CPU and Memory on an existing VM #399
Replies: 3 comments
-
Hi Jeremy,
Thank you for this post! We just last week implemented this feature in a function, but we used the DoPowerShell method since we couldn't find the pre-built method. We'll try out this way, which is preferable.
However, before we can edit the NumCPUs or Memory on a powered-up VM, we need to set Memory/CPU Hotplug to Enabled for CPU and/or Memory. Is this same method used for that.
One last question related to this: Is there a method that we can pull to get the current settings for a VM, including CPU, memory, hard disk, etc., as well as which server and datastore the VM is running on? Thanks,
/Mike
undefined (Quali) - 01/27/2014 10:54 AM
|
Beta Was this translation helpful? Give feedback.
-
Hi Mike, Thank you for the feedback! In case you would like to get the current settings for a VM, including CPU, memory, hard disk, etc you may use the function "Get Entity - VM Host" as seen in the example below. As far as the hotplug settings go, I will check on this and get back to you. Thanks, Jeremy Jeremy Gerson (Jeremy.G) - 01/30/2014 10:19 AM
|
Beta Was this translation helpful? Give feedback.
-
Hi Mike, In reference to the hotplug settings, currently we do not have a function to support modifying them. However, if this is important to your test, you can always modify these settings using DoPowerShell (example https://communities.vmware.com/message/2258550). If having this function added to the library is important to you, please open a feature request and let us know the use case so that we can evaluate adding this to our library.
Thanks, Jeremy Jeremy Gerson (Jeremy.G) - 02/03/2014 10:14 AM
|
Beta Was this translation helpful? Give feedback.
-
The VmWare vSphere library function Set_VM can be used to modify attributes of a VM such as memory or hard disk space. The following example will demonstrate how to use the Set_VM function.
By first viewing the summary tab of an existing VM in the VSphere client it is seen that the memory is currently 200mb.
Step 1: After setting the session and connecting to a VI server, retrieve the Parameters Matrix for SetVM_HW.
Step 2: Modify the value of MemoryMB to 400.
Step 3: Apply the parameters matrix to the Set_VM function and choose type of SetHW.
By viewing the summary tab of an the same VM in the VSphere client it is seen that the memory is now 400mb.
Attachments:
Jeremy Gerson (Jeremy.G) - 01/23/2014 10:51 PM
· 2653 ·
Beta Was this translation helpful? Give feedback.
All reactions