---
title: How do I resize virtual machine disks again?
exercise: 5
date: '2024-04-14'
tags: ['openshift','virtualisation','kubernetes','kubevirt']
draft: false
authors: ['default']
summary: "Persistent volume what??"
---

The proof of concept has been going well at Acme Financial Services. Their team are a few sprints in and have just pinged you an email out of the blue:


> Subject: Quick Help Needed: Expanding Storage for VM!
> 
> Hey Red Hat Pre-Sales Team,
> 
> Hope you're doing awesome! 🚀
> 
> I'm the storage guru over at Acme Financial Services, we met last sprint review. I need your brainpower to help with a little incident. One of our virtual machines in our Red Hat playground will run out of disk in 2 hours based on current rates.
> 
> Are you free to jump on a call, like nowish so we can fix it???
> 
> Would not be a good look if this thing blows up 😅
>  
> Thanks a ton for your help!
> 
> Cheers,
>
> Chad McStorageGuy<br />
> Chief Principal Lead Strategic Storage Architect Engineer<br />
> Acme Financial Services

Ruh roh. Normally this would just be handled via support but you know it might take longer for a response as this isn't technically a production environment. You agree to help Chad to try and prevent any bad news for the proof of concept.

Time to roll up your sleeves, join the Acme Skype for Business™ video call and get it sorted. Tick tock...


## 5.1 - Expand the vm storage

For this task your team's challenge is to increase the storage of an existing virtual machine `cryto-carnivore-cpuminer3000` in the `super-important-dont-deleteme` namespace.

The virtual machine currently has a root disk of `30GiB` of storage. This needs to be increased to `60GiB`. No command line is required, though you will need to investigate potential storage misconfigurations and verify that your additional storage is now presented to the virtual machine operating system.

Documentation you may find helpful is:
- https://docs.openshift.com/container-platform/4.15/virt/virtual_machines/virtual_disks/virt-expanding-vm-disks.html
- https://docs.openshift.com/container-platform/4.15/storage/expanding-persistent-volumes.html#expanding-csi-volumes_expanding-persistent-volumes


## 5.2 - But wait there's more!

While you're on the Skype for Business™ video call with Chad fixing the `crypto-carnivore-cpuminer3000` storage incident he also puts you on the spot and asks for some guidance on how to add an additional disk to the vm for a new ~~cve-ridden-literal-malware~~workload that Acme is developing.

This is a straightforward table stakes procedure for any virtualisation platform so you offer to step Chad through it then and there and get it out of the way.

Your task is to add an additional `20GiB` disk labelled `wannacry` to the virtual machine. No command line is required, however you may have to get creative and manually create the volume and update the virtual machine spec if your OpenShift console "Configure --> Add Disk" functionality isn't working.

Documentation you may find helpful is:
- https://docs.openshift.com/container-platform/4.15/virt/virtual_machines/virtual_disks/virt-hot-plugging-virtual-disks.html
- https://access.redhat.com/documentation/en-us/red_hat_openshift_data_foundation/4.15/html/managing_and_allocating_storage_resources/managing-persistent-volume-claims_rhodf#configuring-application-pods-to-use-openshift-data-foundation_rhodf


## 5.3 - Check your work

If you've successfully resolved Chad's storage concerns please post a message in `#event-anz-ocp-virt-hackathon` with the message:

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

Both exercises 5.1 and 5.2 are worth 15 points each for a total of 30 points. The event team will reply in slack to confirm your updated team total score.
