question

PietrLangevoort-0860 avatar image
0 Votes"
PietrLangevoort-0860 asked Maverrick-0395 commented

What is the proper way to cleanup excess .avhdx files created by Hyper-V?

I am working with a Hyper-V server hosting two VMs. The production VM is backed up by a scheduled job in Veeam Backup & Replication program.

I started receiving warnings from Veeam about low disk space. I am attempting to resolve the warning by freeing up some disk space.
It appears most of the disk space is being taken up by .avhdx files approximately 1GB in size, 6 per month, going back almost one year.

Hyper-V manager does not show any open snapshots. I believe the only open snapshots are temporary and occur during the backup job.
It seems snapshots are being created during the backup process and offloaded to cloud storage on Backblaze and each time a .avhdx file is left behind.
I also ran Get-VMSnapshot in powershell, still no snapshots shown.

What is the proper course of action to remove or cleanup the excess .avhdx files?

windows-server-hyper-v
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

I would like to check if the reply could be of help? If yes, please help accept answer, so that others meet a similar issue can find useful information quickly. If you have any other concerns or questions, please feel free to feedback.

Best Regards,
Joan

0 Votes 0 ·
jiayaozhu-MSFT avatar image
0 Votes"
jiayaozhu-MSFT answered

Hi,

Thank you for your posting!

Firstly, I suppose your issue is related to backup. This happens pretty often and it is due to VM backups being ran and "something" happened along the way that caused the automated merge to not take place. If you use Altaro or Veeam, you can recreate the issue by taking a backup, watch the differencing disk get created and towards the end of the backup, cancel it and reboot the host server. The avhd(x) doesn't get removed, but the server starts to run off of it from then on. This is typical when a host update occurs, the backup is running and somewhere it gets restarted due to the updates and the backups were not completed yet. The only way I can find now is to manually merge your excess avhd. files:

https://social.technet.microsoft.com/wiki/contents/articles/6257.manually-merge-avhd-to-vhd-in-hyper-v.aspx

https://www.altaro.com/hyper-v/how-to-merge-hyper-v-checkpoints//

(Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.)

Thank you for your support! Wish you have a wonderful day! : )

BR,
Joan


If the Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Joel-65098 avatar image
1 Vote"
Joel-65098 answered fl00blab-6229 published

I had same issue, Veeam is somehow related to it.

The solution was too simple and hassle-free:
Shut down the problematic virtual server as you normally do: Start > Shut Down.
Then start the server from the Hyper-V Manager by clicking Start on the server.
The merge process starts and merges all avhdx drives into one vhdx file.
The process takes time, depending on the number of avhdx files.

PS. Restarting virtual server does not start the merge process.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you! This helped me. I got this issue the week after upgrading from Veeam 9.5 to 10.

0 Votes 0 ·
JamesRenz-1109 avatar image
0 Votes"
JamesRenz-1109 answered Maverrick-0395 commented

I am in the middle of this issue now, I have shut down the VM, and waited, haven't seen any merge process take place. Then I booted it backup, I still don't see any merge take place. Tons of avhdx files still around everywhere in that VM VHD directory, meanwhile the Hyper V Manager shows zero checkpoints. When I check the settings of the VM in question, there are no avhdx files that are pointed to in the settings, just the original VHDX for that VM. Is it safe to move the AVHDX file to another partition?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

i have moved all those AVHDX files into a seperate folder while the VM was shut down .. if you start it up again it will throw an error for each missing file it needs .. i have moved them back into place and tried to start it again till it started without asking for another file ..
if you have files left over (like me) they are probably garbage left from failed operations ..
i have kept the ones left over in a seperate folder and diddnt experience any ill effects.
- i plan to keep them around for a while and will eventually delete them.
(they have grown to hundsreds of gigabytes and im not doing much with those VMs .. everything they do ultimately happens on network-shares)

0 Votes 0 ·