The new free VMware tool, Virtual Machine Desired State Configuration (VMDSC), allows you to optimize the performance of your virtual infrastructure without impacting business-critical VMs. You can modify the configuration of VMs that need vCPU or memory changes without rebooting them. The changes are stored in the VM's VMX configuration file and then used for reconfiguration at the next reboot. The next reboot is usually scheduled a long time in advance during application upgrades or cumulative patch installs.
Avatar

VMDSC itself is just an API, so integration with automation tools is preferable for effective workloads. Then, those changes are pushed via API calls into the VM that has to be resized.

You can deploy the tool to your vSphere 7 environment from an OVA file that you download from the VMware Fling site under a Tech Preview license.

VMDSC configuration

The software is able to interrupt the boot sequence of a VM. When you create a new desired state configuration for a VM, the VM is forced to boot into BIOS mode. Once in this mode, it powers off the VM, implements the desired state configuration for the CPU and memory, and powers up the VM.

These are the main features of the VMDSC:

  • Reconfigure VM(s) at the next reboot to the desired state
  • Deployed from an OVA file
  • VMware Web-Based Management Interface (VAMI) performance monitoring
  • Persistent storage of desired state configuration via the Postgres database
  • HTTP REST API
  • Possible integration with vRealize Suite

Here are the system requirements:

  • vCenter Server 7.x and above
  • A vSphere service account
  • A DNS record (forward and reverse A record)
Creating VMDSC DNS records

Creating VMDSC DNS records

The OVA appliance also needs to be configured. Some fields need to be filled in during the initial deployment. Here are the OVA requirements:

  • Root password
  • Hostname
  • Ipv4 IP address
  • Netmask
  • Gateway
  • DNS servers
  • Domain name
  • vSphere service account

Deploying VMDSC

The process of deploying the appliance starts with creating a custom role and service account in your vCenter Server 7. Let's create the role first.

Connect to your vCenter Server via the vSphere client and go to Administration > Roles > Add Role.

Use a meaningful name and description, then select Virtual machine and check some of the required boxes as privileges:

  • Virtual machine / Interaction / Power off
  • Virtual machine / Interaction / Power on
  • Virtual machine / Interaction / Reset
  • Virtual machine / Change Configuration / Advanced configuration
  • Virtual machine / Change Configuration / Change CPU count
  • Virtual machine / Change Configuration / Change Memory
  • Sessions / Validate session

This is shown in the screenshot from the lab.

Create new role for VMDSC

Create new role for VMDSC

Then, create a service account. Select Host and Clusters > select your vCenter Server > Administration > Users and groups > Add.

Again, add a name so that you can easily recognize this user in the future.

Create a service account in vCenter Server

Create a service account in vCenter Server

Then go back and select your vCenter Server > Permissions > Add permission. Select the user previously created. In the second field, scroll down until you find the role you created in the previous step.

Add permission to your vCenter Server object

Add permission to your vCenter Server object

Note that you have to check the Propagate to children check box.

Propagate to children

Propagate to children

Now we can finally start deploying the product from the OVA file. Log in to your vCenter Server via the vSphere web client, and select Hosts and clusters. Then right-click and select Deploy OVF template.

Deploy the OVF template

Deploy the OVF template

Continue the assistant as you usually do when deploying other OVFs, accept the license agreement, and specify the storage and network that will be used. In the Customize Template section, enter all the required details (password, FQDN of the vCenter Server, hostname, vCenter Server credentials, etc.).

Customize the OVF Template

Customize the OVF Template

After this, your VMDSC VM should be up and running. Let a couple of minutes pass to finish the configuration. Then you're given the choice to integrate it with the VMware automating tools.

VMDSC API is a tool used by other tools that deliver the final result, such as resizing VM(s). You can use many automation frameworks and tools capable of leveraging HTTP REST API calls.

VMware Realize Orchestrator (vRO), including its automation engine, is one of those. It is able to automate API calls as needed. vRealize Operations (vROps) can be used together with vRO to fetch the recommended CPU/memory that provides vROps.

With that integration in place, you can use vRO workflows within vROps. You'll see Folders, Resource Pools, and Clusters within vROps, and you can right-size those directly from vROps.

If you don't want to install and configure vRO and vROps, you can use the PostMan tool to manually execute REST API calls. However, you would have to create the right configuration for your VMs by yourself. Don't just take the values that vROps suggests. This setup is part of the detailed user guide, which you can download with the VMDSC OVA file.

This integration is detailed with step-by-step instructions in the VMDSC user guide, and it is outside the scope of this post. I highly recommend watching the video from Steve Tilkens, which provides additional details.

Final words

With VMDSC, you can get an automatic solution where the integration of vROps and vRO allows you to configure the right size of your VMS (CPU/memory) in a way that doesn't impact availability. VMDSC prepares the VMs for changes for the next reboot, which you can perform outside of business hours. You can leverage vROps to apply the resizing of individual VMs or even a whole cluster.

Production VMs cannot be powered off or rebooted easily, so having them preconfigured and ready for change on the reboot is a good way to make the necessary changes to optimize your environment.

Subscribe to 4sysops newsletter!

As we saw, integration with other software tools from VMware is necessary as there is no simple UI where you can make the changes for your VM(s) within VMDSC.

avatar
1 Comment
  1. Avatar
    Terry Kirschner 2 years ago

    Very helpful and useful. Thank you.

Leave a reply

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2023

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account