Configuring VM hardware

Occasionally, you will find that the initial configuration for a virtual machine needs to change to continue to support its role. Sometimes this is because the hardware is undersized and needs to be increased to meet the needs. Other times this is because the hardware is too big and needs to be decreased to free up resources for other VMs.

Getting ready

In this example we will be reconfiguring the hardware of our Accounting02 virtual machine from the Creating virtual machines recipe. Specifically, we will be changing the memory configuration, adding additional hard drives, and changing the number of virtual CPUs on the VM.

Note

Most of these commands can only be performed while the VM is switched off.

How to do it...

Carry out ...

Get Windows Server 2012 Automation with PowerShell Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.