• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Hyper-V: Automate maintenance?

  • Thread starter Deleted member 12106
  • Start date
D

Deleted member 12106

Guest
So I am wondering what you guys do or use to automate maintenance on your hyper-v hosts. We all know with windows guests, that the VHDs have a tendency to grow over time. I have a few hosts I'd like to setup something to run on a schedule that requires no intervention.

Inside the guest, I can kick off a basic batch file to remove vss shadows, and then silently compact.

Generally when this finishes, I would shut down the guest, and then do a compact on the VHD.

I looked at a couple of blogs that reference using powershell, and even a java script version. These don't appear to be current so thought I would ask in hopes of someone having a simple solution.

I have 4 hosts I would like to implement this on. Putting them down at 2am on a Saturday isn't an issue.

TIA.
 
Good Question, I'd be curious if anyone else have some scripts for automated maintenance. All I've done so far is adapt a couple PS scripts I found on the web to check the status of a VM and then start any that were off. I haven't looked into the idea of an Auto-compact script, but to be really effective, it'll need to have maintenance run inside the VM on the partitions first. specifically defragmentation and consolidation of freespace. Only then will the Compaction routine have something to trim. I'm assuming that's what you mean when you mentioned "silently compact" within the guest.

Maybe it's just me, but I'm slightly nervous about an automated compact routine for regular use. Unless it's just scripting a manual process that you'd babysit for biyearly usage.
 
Do you have system center? You could set something up with a runbook through operations manager.
 
Back
Top