Link to home
Start Free TrialLog in
Avatar of Mark Kaczowski
Mark Kaczowski

asked on

Running out of space on Hyper-V host hard drive

Hyper-V ran out of space so I deleted a total of 300gb of old SQL transaction log files and old database.
I now have 300Gb of free space on the Hyper-V but the physical host drive is still out of space. Why and how do I get the 300gb of free space back on the physical disk.  FYI. The host server has a total of 900gb. The drive is partitioned into a C: drive for Windows OS (200gb) and a D: drive for the Hyper-Vs
(700gb). The D drive keeps running out of space and then shuts down my Hyper-Vs. I thought after deleting 300gb off the Hyper-V that it would also give the 300gb back to the host D drive. Desperately need help and please give step by step instructions.
Avatar of arnold
arnold
Flag of United States of America image

Can you increase the number of drives in the host.
Make sure to avoid this situation by setting up sql jobs to maintain the space usage by sql transaction log.../backups ...
(sql server management studio, setup a maintenance job with subplans that backup the transaction log, and a process that removes transaction log backups after a certain number of days, based on you database backup plan)

Please clarify how much remaining space do you have on the hyper-v host and what the impact you are seeing.
I.e. the 300 GB freed up on the VM, will mean when the vm needs additional space, it will use what it has and will not hit the host for additional allocation.

make sure to consider whetther ..
make sure you have a good backup of the Vm (meaning you backed it up, and you tested to make sure you are familiar with the restore process and when tried in a LAB, the restore worked.)

https://www.altaro.com/hyper-v/compact-hyper-v-virtual-disks-vhdx/
ASKER CERTIFIED SOLUTION
Avatar of Member_2_231077
Member_2_231077

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In the guest open Disk Management and right click on the partition that had its data volume reduced. If Shrink is available then do that to the maximum amount.

Once done, in Hyper-V Manager on the host click Edit Disk and select the reduced partition size VHDX file. See if Reduce/Shrink is an option.

Bump the host OS partition down to 100GB. That's more than enough. Then use a partition tool to expand the data volume by that much.

Make sure a known good backup is done before all of the above.