---
title: What about rebalancing virtual machines?
exercise: 4
date: '2024-04-05'
tags: ['openshift','virtualisation','kubernetes','kubevirt']
draft: false
authors: ['default']
summary: "How do we optimally balance vm workloads across an OpenShift cluster?"
---

Acme Financial Services have agreed to run a small scale proof of concept for OpenShift Virtualisation.

They have spun up a bare metal OpenShift cluster, installed OpenShift Virtualisation and now have a small number of virtual machines running.

One of the goals of the pilot is to ensure their virtual machine workloads will run efficiently on their new infrastructure and continually auto balance over time based on available underlying infrastructure capacity so they don't have some nodes much busier than others.

The Acme team are stuck on how they might implement this goal within the poc. They told you they found some documentation online on this thing called "deschedular" but didn't have any luck setting it up.

Your pre-sales team have offered to setup an example environment for them and give them a quick demo on how it works.


## 3.1 - Enabling virtual machine balancing profiles

Your challenge for this task is to enable the Technology Preview feature for Virtual Machine workload balancing in OpenShift.

You'll need to make some changes at both the cluster and virtual machine level.

Documentation you may find helpful is:
- https://docs.openshift.com/container-platform/4.15/virt/virtual_machines/advanced_vm_management/virt-enabling-descheduler-evictions.html


## 3.2 - Check your work

If you've successfully enabled deschedular evictions for a virtual machine please post a message in `#event-anz-ocp-virt-hackathon` with the message:

> Please review team [name] solution for exercise 4.

This exercise is worth 25 points. The event team will reply in slack to confirm your updated team total score.
